@@ -470,12 +470,12 @@ void process_dxgi_error(HRESULT hr) {
470470 int32 LastCompletedOp = *node->pLastBreadcrumbValue ;
471471 if (LastCompletedOp != node->BreadcrumbCount && LastCompletedOp != 0 ) {
472472 if (node->pCommandListDebugNameW ) {
473- result += luisa::format<luisa::wstring>( L" Command list debug name: {}\n " , node->pCommandListDebugNameW );
473+ luisa::format_to ( std::back_inserter (result), L" Command list debug name: {}\n " , node->pCommandListDebugNameW );
474474 }
475475 if (node->pCommandQueueDebugNameW ) {
476- result += luisa::format<luisa::wstring>( L" Command queue debug name: {}\n " , node->pCommandQueueDebugNameW );
476+ luisa::format_to ( std::back_inserter (result), L" Command queue debug name: {}\n " , node->pCommandQueueDebugNameW );
477477 }
478- result += luisa::format ( L" DRED: {} completed of {}\n " , LastCompletedOp, node->BreadcrumbCount );
478+ luisa::format_to ( std::back_inserter (result), L" DRED: {} completed of {}\n " , LastCompletedOp, node->BreadcrumbCount );
479479 TracedCommandLists++;
480480 int32 FirstOp = std::max (LastCompletedOp - 100 , 0 );
481481 int32 LastOp = std::min (LastCompletedOp + 20 , int32 (node->BreadcrumbCount ) - 1 );
@@ -493,26 +493,27 @@ void process_dxgi_error(HRESULT hr) {
493493 }
494494 luisa::wstring OpName = (BreadcrumbOp < std::size (OpNames)) ? OpNames[BreadcrumbOp] : L" Unknown Op" ;
495495 luisa::wstring State = Op < LastCompletedOp ? L" [ok]" : (Op == LastCompletedOp ? L" [Active]" : L" [ ]" );
496- result += luisa::format ( L" \t {} Op: {}, {} {} {}\n " , State, Op, OpName, ContextStr, (Op + 1 == LastCompletedOp) ? L" - LAST COMPLETED" : L" " );
496+ luisa::format_to ( std::back_inserter (result), L" \t {} Op: {}, {} {} {}\n " , State, Op, OpName, ContextStr, (Op + 1 == LastCompletedOp) ? L" - LAST COMPLETED" : L" " );
497497 }
498498 }
499499 node = node->pNext ;
500500 }
501501 if (TracedCommandLists == 0 ) {
502502 result += L" DRED: No command list found with active outstanding operations (all finished or not started yet)\n " ;
503503 }
504- result += luisa::format ( L" page fault VA: {}\n " , DredPageFaultOutput.PageFaultVA );
504+ luisa::format_to ( std::back_inserter (result), L" page fault VA: {}\n " , DredPageFaultOutput.PageFaultVA );
505505
506506 for (auto node = DredPageFaultOutput.pHeadExistingAllocationNode ; node != nullptr ; node = node->pNext ) {
507507 if (node->ObjectNameW ) {
508- result += luisa::format<luisa::wstring>( L" Exists object name {}\n " , node->ObjectNameW );
508+ luisa::format_to ( std::back_inserter (result), L" Exists object name {}\n " , node->ObjectNameW );
509509 }
510510 }
511511 for (auto node = DredPageFaultOutput.pHeadRecentFreedAllocationNode ; node != nullptr ; node = node->pNext ) {
512512 if (node->ObjectNameW ) {
513- result += luisa::format<luisa::wstring>( L" Freed object name {}\n " , node->ObjectNameW );
513+ luisa::format_to ( std::back_inserter (result), L" Freed object name {}\n " , node->ObjectNameW );
514514 }
515515 }
516516 LUISA_WARNING (luisa::string (result.begin (), result.end ()));
517517}
518- }// namespace lc::dx
518+
519+ }// namespace lc::dx
0 commit comments