@@ -470,12 +470,12 @@ void process_dxgi_error(HRESULT hr) {
470
470
int32 LastCompletedOp = *node->pLastBreadcrumbValue ;
471
471
if (LastCompletedOp != node->BreadcrumbCount && LastCompletedOp != 0 ) {
472
472
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 );
474
474
}
475
475
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 );
477
477
}
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 );
479
479
TracedCommandLists++;
480
480
int32 FirstOp = std::max (LastCompletedOp - 100 , 0 );
481
481
int32 LastOp = std::min (LastCompletedOp + 20 , int32 (node->BreadcrumbCount ) - 1 );
@@ -493,26 +493,27 @@ void process_dxgi_error(HRESULT hr) {
493
493
}
494
494
luisa::wstring OpName = (BreadcrumbOp < std::size (OpNames)) ? OpNames[BreadcrumbOp] : L" Unknown Op" ;
495
495
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" " );
497
497
}
498
498
}
499
499
node = node->pNext ;
500
500
}
501
501
if (TracedCommandLists == 0 ) {
502
502
result += L" DRED: No command list found with active outstanding operations (all finished or not started yet)\n " ;
503
503
}
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 );
505
505
506
506
for (auto node = DredPageFaultOutput.pHeadExistingAllocationNode ; node != nullptr ; node = node->pNext ) {
507
507
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 );
509
509
}
510
510
}
511
511
for (auto node = DredPageFaultOutput.pHeadRecentFreedAllocationNode ; node != nullptr ; node = node->pNext ) {
512
512
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 );
514
514
}
515
515
}
516
516
LUISA_WARNING (luisa::string (result.begin (), result.end ()));
517
517
}
518
- }// namespace lc::dx
518
+
519
+ }// namespace lc::dx
0 commit comments