Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
locke-lunarg committed Jan 14, 2025
1 parent 61c775c commit 3d9589d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 23 deletions.
4 changes: 2 additions & 2 deletions framework/decode/vulkan_replay_dump_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ GFXRECON_BEGIN_NAMESPACE(decode)

VulkanReplayDumpResourcesBase::VulkanReplayDumpResourcesBase(const VulkanReplayOptions& options,
CommonObjectInfoTable* object_info_table) :
QueueSubmit_indices_(options.QueueSubmit_Indices),
recording_(false), dump_resources_before_(options.dump_resources_before), object_info_table_(object_info_table),
QueueSubmit_indices_(options.QueueSubmit_Indices), recording_(false),
dump_resources_before_(options.dump_resources_before), object_info_table_(object_info_table),
output_json_per_command(options.dump_resources_json_per_command), user_delegate_(nullptr),
active_delegate_(nullptr), default_delegate_(nullptr)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ DispatchTraceRaysDumpingContext::DispatchTraceRaysDumpingContext(const std::vect
CommonObjectInfoTable& object_info_table,
const VulkanReplayOptions& options,
VulkanDumpResourcesDelegate& delegate) :
original_command_buffer_info(nullptr),
DR_command_buffer(VK_NULL_HANDLE), dispatch_indices(dispatch_indices),
original_command_buffer_info(nullptr), DR_command_buffer(VK_NULL_HANDLE), dispatch_indices(dispatch_indices),
trace_rays_indices(trace_rays_indices), bound_pipelines{ nullptr },
dump_resources_before(options.dump_resources_before), device_table(nullptr), parent_device(VK_NULL_HANDLE),
instance_table(nullptr), object_info_table(object_info_table), replay_device_phys_mem_props(nullptr),
Expand Down
26 changes: 12 additions & 14 deletions framework/decode/vulkan_replay_dump_resources_delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,8 @@ DefaultVulkanDumpResourcesDelegate::GenerateBufferDescriptorFilename(const Vulka
{
std::stringstream filename;

filename << capture_filename_ << "_"
<< "buffer_" << resource_info.buffer_info->capture_id << "_qs_" << resource_info.qs_index << "_bcb_"
<< resource_info.bcb_index << "_rp_" << resource_info.rp << ".bin";
filename << capture_filename_ << "_" << "buffer_" << resource_info.buffer_info->capture_id << "_qs_"
<< resource_info.qs_index << "_bcb_" << resource_info.bcb_index << "_rp_" << resource_info.rp << ".bin";

std::filesystem::path filedirname(options_.dump_resources_output_dir);
std::filesystem::path filebasename(filename.str());
Expand All @@ -380,9 +379,9 @@ std::string DefaultVulkanDumpResourcesDelegate::GenerateInlineUniformBufferDescr
const VulkanDumpResourceInfo& resource_info) const
{
std::stringstream filename;
filename << capture_filename_ << "_"
<< "inlineUniformBlock_set_" << resource_info.set << "_binding_" << resource_info.binding << "_qs_"
<< resource_info.qs_index << "_bcb_" << resource_info.bcb_index << ".bin";
filename << capture_filename_ << "_" << "inlineUniformBlock_set_" << resource_info.set << "_binding_"
<< resource_info.binding << "_qs_" << resource_info.qs_index << "_bcb_" << resource_info.bcb_index
<< ".bin";

std::filesystem::path filedirname(options_.dump_resources_output_dir);
std::filesystem::path filebasename(filename.str());
Expand All @@ -401,10 +400,9 @@ std::string
DefaultVulkanDumpResourcesDelegate::GenerateVertexBufferFilename(const VulkanDumpResourceInfo& resource_info) const
{
std::stringstream filename;
filename << capture_filename_ << "_"
<< "vertexBuffers_"
<< "qs_" << resource_info.qs_index << "_bcb_" << resource_info.bcb_index << "_dc_"
<< resource_info.cmd_index << "_binding_" << resource_info.binding << ".bin";
filename << capture_filename_ << "_" << "vertexBuffers_" << "qs_" << resource_info.qs_index << "_bcb_"
<< resource_info.bcb_index << "_dc_" << resource_info.cmd_index << "_binding_" << resource_info.binding
<< ".bin";

std::filesystem::path filedirname(options_.dump_resources_output_dir);
std::filesystem::path filebasename(filename.str());
Expand All @@ -425,8 +423,7 @@ DefaultVulkanDumpResourcesDelegate::GenerateIndexBufferFilename(const VulkanDump
std::stringstream filename;
filename << capture_filename_ << "_";
std::string index_type_name = IndexTypeToStr(resource_info.index_type);
filename << "indexBuffer_"
<< "qs_" << resource_info.qs_index << "_bcb_" << resource_info.bcb_index << "_dc_"
filename << "indexBuffer_" << "qs_" << resource_info.qs_index << "_bcb_" << resource_info.bcb_index << "_dc_"
<< resource_info.cmd_index << index_type_name << ".bin";

std::filesystem::path filedirname(options_.dump_resources_output_dir);
Expand Down Expand Up @@ -1275,7 +1272,7 @@ void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonDispatchInfo(const Vu
!options_.dump_resources_json_per_command ? current_block["dispatchCommands"] : dump_json_.GetData();

static uint64_t unique_json_entry = 0;
auto& dispatch_json_entry =
auto& dispatch_json_entry =
!options_.dump_resources_json_per_command ? dispatch_json_entries[unique_json_entry++] : dump_json_.GetData();

dispatch_json_entry["dispatchIndex"] = draw_call_info.cmd_index;
Expand Down Expand Up @@ -1740,7 +1737,8 @@ void DefaultVulkanDumpResourcesDelegate::GenerateOutputJsonTraceRaysIndex(const
}

static uint64_t unique_json_entry = 0;
auto& tr_entry = !options_.dump_resources_json_per_command ? tr_json_entries[unique_json_entry++] : dump_json_.GetData();
auto& tr_entry =
!options_.dump_resources_json_per_command ? tr_json_entries[unique_json_entry++] : dump_json_.GetData();

tr_entry["traceRaysIndex"] = draw_call_info.cmd_index;
tr_entry["beginCommandBufferIndex"] = draw_call_info.bcb_index;
Expand Down
9 changes: 4 additions & 5 deletions framework/decode/vulkan_replay_dump_resources_draw_calls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ DrawCallsDumpingContext::DrawCallsDumpingContext(const std::vector<uint64_t>&
CommonObjectInfoTable& object_info_table,
const VulkanReplayOptions& options,
VulkanDumpResourcesDelegate& delegate) :
original_command_buffer_info(nullptr),
current_cb_index(0), dc_indices(dc_indices), RP_indices(rp_indices), active_renderpass(nullptr),
active_framebuffer(nullptr), bound_pipelines{ nullptr }, current_renderpass(0), current_subpass(0),
dump_resources_before(options.dump_resources_before), aux_command_buffer(VK_NULL_HANDLE), aux_fence(VK_NULL_HANDLE),
device_table(nullptr), instance_table(nullptr), object_info_table(object_info_table),
original_command_buffer_info(nullptr), current_cb_index(0), dc_indices(dc_indices), RP_indices(rp_indices),
active_renderpass(nullptr), active_framebuffer(nullptr), bound_pipelines{ nullptr }, current_renderpass(0),
current_subpass(0), dump_resources_before(options.dump_resources_before), aux_command_buffer(VK_NULL_HANDLE),
aux_fence(VK_NULL_HANDLE), device_table(nullptr), instance_table(nullptr), object_info_table(object_info_table),
replay_device_phys_mem_props(nullptr), delegate_(delegate), dump_depth(options.dump_resources_dump_depth),
color_attachment_to_dump(options.dump_resources_color_attachment_index),
dump_vertex_index_buffers(options.dump_resources_dump_vertex_index_buffer),
Expand Down

0 comments on commit 3d9589d

Please sign in to comment.