Skip to content

Commit

Permalink
Complete ExeFileInfo json consumer path for Vulkan and D3D12
Browse files Browse the repository at this point in the history
  • Loading branch information
beau-lunarg committed May 15, 2024
1 parent e8afdb4 commit 8e59703
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
17 changes: 17 additions & 0 deletions framework/decode/metadata_json_consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define GFXRECON_DECODE_METADATA_JSON_CONSUMER_H

#include "util/defines.h"
#include "util/file_path.h"
#include "format/format_json.h"

GFXRECON_BEGIN_NAMESPACE(gfxrecon)
Expand Down Expand Up @@ -78,6 +79,22 @@ class MetadataJsonConsumer : public Base
WriteBlockEnd();
}

virtual void Process_ExeFileInfo(gfxrecon::util::filepath::FileInfo& info) override
{
const util::JsonOptions& json_options = GetOptions();
auto& jdata = WriteMetaCommandStart("ExeFileInfo");
FieldToJson(jdata["product_version"], info.ProductVersion, json_options);
FieldToJson(jdata["file_version"], info.FileVersion, json_options);
FieldToJson(jdata["app_version"], info.AppVersion, json_options);
FieldToJson(jdata["app_name"], info.AppName, json_options);
FieldToJson(jdata["company_name"], info.CompanyName, json_options);
FieldToJson(jdata["file_description"], info.FileDescription, json_options);
FieldToJson(jdata["internal_name"], info.InternalName, json_options);
FieldToJson(jdata["original_filename"], info.OriginalFilename, json_options);
FieldToJson(jdata["product_name"], info.ProductName, json_options);
WriteBlockEnd();
}

virtual void ProcessResizeWindowCommand(format::HandleId surface_id, uint32_t width, uint32_t height) override
{
using namespace util;
Expand Down
7 changes: 7 additions & 0 deletions framework/decode/vulkan_decoder_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ void VulkanDecoderBase::DispatchFillMemoryCommand(
}
}

void VulkanDecoderBase::DispatchExeFileInfo(format::ThreadId thread_id, format::ExeFileInfoBlock& info)
{
for (auto consumer: consumers_) {
consumer->Process_ExeFileInfo(info.info_record);
}
}

void VulkanDecoderBase::DispatchFillMemoryResourceValueCommand(
const format::FillMemoryResourceValueCommandHeader& command_header, const uint8_t* data)
{
Expand Down
2 changes: 1 addition & 1 deletion framework/decode/vulkan_decoder_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class VulkanDecoderBase : public ApiDecoder

virtual void DispatchDriverInfo(format::ThreadId thread_id, format::DriverInfoBlock& info) override {}

virtual void DispatchExeFileInfo(format::ThreadId thread_id, format::ExeFileInfoBlock& info) override {}
virtual void DispatchExeFileInfo(format::ThreadId thread_id, format::ExeFileInfoBlock& info) override;

virtual void SetCurrentBlockIndex(uint64_t block_index) override;

Expand Down

0 comments on commit 8e59703

Please sign in to comment.