27
27
GFXRECON_BEGIN_NAMESPACE (gfxrecon)
28
28
GFXRECON_BEGIN_NAMESPACE(decode)
29
29
30
- void DefaultVulkanDumpResourcesDelegate::DumpDrawCallInfo(const VulkanDumpDrawCallInfo& draw_call_info, size_t index )
30
+ void DefaultVulkanDumpResourcesDelegate::DumpDrawCallInfo(const VulkanDumpDrawCallInfo& draw_call_info)
31
31
{
32
32
switch (draw_call_info.type )
33
33
{
34
34
case DumpResourceType::kDrawCallInfo :
35
- GenerateOutputJsonDrawCallInfo (draw_call_info, index );
35
+ GenerateOutputJsonDrawCallInfo (draw_call_info);
36
36
break ;
37
37
case DumpResourceType::kDispatchInfo :
38
- GenerateOutputJsonDispatchInfo (draw_call_info, index );
38
+ GenerateOutputJsonDispatchInfo (draw_call_info);
39
39
break ;
40
40
case DumpResourceType::kTraceRaysIndex :
41
- GenerateOutputJsonTraceRaysIndex (draw_call_info, index );
41
+ GenerateOutputJsonTraceRaysIndex (draw_call_info);
42
42
break ;
43
43
default :
44
44
break ;
@@ -434,8 +434,7 @@ DefaultVulkanDumpResourcesDelegate::GenerateIndexBufferFilename(const VulkanDump
434
434
return (filedirname / filebasename).string ();
435
435
}
436
436
437
- void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonDrawCallInfo (const VulkanDumpDrawCallInfo& draw_call_info,
438
- size_t index)
437
+ void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonDrawCallInfo (const VulkanDumpDrawCallInfo& draw_call_info)
439
438
{
440
439
if (options_.dump_resources_json_per_command )
441
440
{
@@ -1251,8 +1250,7 @@ std::string DefaultVulkanDumpResourcesDelegate::GenerateDispatchTraceRaysInlineU
1251
1250
return (filedirname / filebasename).string ();
1252
1251
}
1253
1252
1254
- void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonDispatchInfo (const VulkanDumpDrawCallInfo& draw_call_info,
1255
- size_t index)
1253
+ void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonDispatchInfo (const VulkanDumpDrawCallInfo& draw_call_info)
1256
1254
{
1257
1255
if (draw_call_info.disp_param == nullptr )
1258
1256
{
@@ -1275,8 +1273,10 @@ void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonDispatchInfo(const Vu
1275
1273
auto & current_block = dump_json_.GetCurrentSubEntry ();
1276
1274
auto & dispatch_json_entries =
1277
1275
!options_.dump_resources_json_per_command ? current_block[" dispatchCommands" ] : dump_json_.GetData ();
1276
+
1277
+ static uint64_t unique_json_entry = 0 ;
1278
1278
auto & dispatch_json_entry =
1279
- !options_.dump_resources_json_per_command ? dispatch_json_entries[index ] : dump_json_.GetData ();
1279
+ !options_.dump_resources_json_per_command ? dispatch_json_entries[unique_json_entry++ ] : dump_json_.GetData ();
1280
1280
1281
1281
dispatch_json_entry[" dispatchIndex" ] = draw_call_info.cmd_index ;
1282
1282
dispatch_json_entry[" beginCommandBufferIndex" ] = draw_call_info.bcb_index ;
@@ -1715,8 +1715,7 @@ void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonDispatchInfo(const Vu
1715
1715
}
1716
1716
}
1717
1717
1718
- void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonTraceRaysIndex (const VulkanDumpDrawCallInfo& draw_call_info,
1719
- size_t index)
1718
+ void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonTraceRaysIndex (const VulkanDumpDrawCallInfo& draw_call_info)
1720
1719
{
1721
1720
if (draw_call_info.tr_param == nullptr )
1722
1721
{
@@ -1739,7 +1738,9 @@ void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonTraceRaysIndex(const
1739
1738
dump_json_.Open (full_filename);
1740
1739
dump_json_.BlockStart ();
1741
1740
}
1742
- auto & tr_entry = !options_.dump_resources_json_per_command ? tr_json_entries[index ] : dump_json_.GetData ();
1741
+
1742
+ static uint64_t unique_json_entry = 0 ;
1743
+ auto & tr_entry = !options_.dump_resources_json_per_command ? tr_json_entries[unique_json_entry++] : dump_json_.GetData ();
1743
1744
1744
1745
tr_entry[" traceRaysIndex" ] = draw_call_info.cmd_index ;
1745
1746
tr_entry[" beginCommandBufferIndex" ] = draw_call_info.bcb_index ;
0 commit comments