Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VDR: Fix when dumping images raw #2020

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions framework/decode/vulkan_replay_dump_resources_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,6 @@ VkResult DumpImageToFile(const VulkanImageInfo* image_info,
image_file_format,
dump_image_raw);

const util::imagewriter::DataFormats image_writer_format = VkFormatToImageWriterDataFormat(dst_format);
assert(image_writer_format != util::imagewriter::DataFormats::kFormat_UNSPECIFIED);

for (uint32_t mip = 0; mip < image_info->level_count; ++mip)
{
for (uint32_t layer = 0; layer < image_info->layer_count; ++layer)
Expand All @@ -559,6 +556,10 @@ VkResult DumpImageToFile(const VulkanImageInfo* image_info,

if (output_image_format != KFormatRaw)
{
const util::imagewriter::DataFormats image_writer_format =
VkFormatToImageWriterDataFormat(dst_format);
assert(image_writer_format != util::imagewriter::DataFormats::kFormat_UNSPECIFIED);

VkExtent3D scaled_extent;
if (scale != 1.0f && scaled)
{
Expand Down Expand Up @@ -625,9 +626,12 @@ VkResult DumpImageToFile(const VulkanImageInfo* image_info,
}
else
{
GFXRECON_LOG_WARNING(
"%s format is not handled. Images with that format will be dump as a plain binary file.",
util::ToString<VkFormat>(image_info->format).c_str());
if (!dump_image_raw)
{
GFXRECON_LOG_WARNING(
"%s format is not handled. Images with that format will be dump as a plain binary file.",
util::ToString<VkFormat>(image_info->format).c_str());
}

util::bufferwriter::WriteBuffer(filename, offsetted_data, subresource_sizes[sub_res_idx]);
}
Expand Down
Loading