diff --git a/framework/decode/dx_replay_options.h b/framework/decode/dx_replay_options.h index 43bd47b58a..af40732ff6 100644 --- a/framework/decode/dx_replay_options.h +++ b/framework/decode/dx_replay_options.h @@ -56,13 +56,7 @@ struct DxReplayOptions : public ReplayOptions bool override_object_names{ false }; bool enable_dump_resources{ false }; DumpResourcesTarget dump_resources_target{}; - - util::ScreenshotFormat screenshot_format{ util::ScreenshotFormat::kBmp }; - std::vector screenshot_ranges; - std::string screenshot_dir; - std::string screenshot_file_prefix{ kDefaultScreenshotFilePrefix }; - std::string replace_dir; - int32_t memory_usage{ kDefaultBatchingMemoryUsage }; + int32_t memory_usage{ kDefaultBatchingMemoryUsage }; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/replay_options.h b/framework/decode/replay_options.h index 1316f7360e..cfdf816b9e 100644 --- a/framework/decode/replay_options.h +++ b/framework/decode/replay_options.h @@ -41,27 +41,34 @@ struct ScreenshotRange struct ReplayOptions { - bool enable_validation_layer{ false }; - bool sync_queue_submissions{ false }; - bool enable_debug_device_lost{ false }; - bool create_dummy_allocations{ false }; - bool omit_null_hardware_buffers{ false }; - bool quit_after_measurement_frame_range{ false }; - bool flush_measurement_frame_range{ false }; - bool flush_inside_measurement_range{ false }; - bool force_windowed{ false }; - uint32_t windowed_width{ 0 }; - uint32_t windowed_height{ 0 }; - bool force_windowed_origin{ false }; - int32_t window_topleft_x{ 0 }; - int32_t window_topleft_y{ 0 }; - int32_t override_gpu_index{ -1 }; - std::string capture_filename; - bool enable_print_block_info{ false }; - int64_t block_index_from{ -1 }; - int64_t block_index_to{ -1 }; - int32_t num_pipeline_creation_jobs{ 0 }; - std::string asset_file_path; + bool enable_validation_layer{ false }; + bool sync_queue_submissions{ false }; + bool enable_debug_device_lost{ false }; + bool create_dummy_allocations{ false }; + bool omit_null_hardware_buffers{ false }; + bool quit_after_measurement_frame_range{ false }; + bool flush_measurement_frame_range{ false }; + bool flush_inside_measurement_range{ false }; + bool force_windowed{ false }; + uint32_t windowed_width{ 0 }; + uint32_t windowed_height{ 0 }; + bool force_windowed_origin{ false }; + int32_t window_topleft_x{ 0 }; + int32_t window_topleft_y{ 0 }; + int32_t override_gpu_index{ -1 }; + std::string capture_filename; + bool enable_print_block_info{ false }; + int64_t block_index_from{ -1 }; + int64_t block_index_to{ -1 }; + bool skip_failed_allocations{ false }; + bool remove_unsupported_features{ false }; + util::ScreenshotFormat screenshot_format{ util::ScreenshotFormat::kBmp }; + std::vector screenshot_ranges; + std::string screenshot_dir; + std::string screenshot_file_prefix{ kDefaultScreenshotFilePrefix }; + uint32_t screenshot_width, screenshot_height; + int32_t num_pipeline_creation_jobs{ 0 }; + std::string asset_file_path; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/vulkan_replay_consumer_base.cpp b/framework/decode/vulkan_replay_consumer_base.cpp index 1e6d324a84..d01a785efd 100644 --- a/framework/decode/vulkan_replay_consumer_base.cpp +++ b/framework/decode/vulkan_replay_consumer_base.cpp @@ -5794,7 +5794,7 @@ VkResult VulkanReplayConsumerBase::OverrideCreateShaderModule( (pShaderModule != nullptr) && !pShaderModule->IsNull()); auto original_info = pCreateInfo->GetPointer(); - if (original_result < 0 || options_.replace_dir.empty()) + if (original_result < 0 || options_.replace_shader_dir.empty()) { VkResult vk_res = func( device_info->handle, original_info, GetAllocationCallbacks(pAllocator), pShaderModule->GetHandlePointer()); @@ -5833,7 +5833,7 @@ VkResult VulkanReplayConsumerBase::OverrideCreateShaderModule( const size_t orig_size = original_info->codeSize; uint64_t handle_id = *pShaderModule->GetPointer(); std::string file_name = "sh" + std::to_string(handle_id); - std::string file_path = util::filepath::Join(options_.replace_dir, file_name); + std::string file_path = util::filepath::Join(options_.replace_shader_dir, file_name); FILE* fp = nullptr; int32_t result = util::platform::FileOpen(&fp, file_path.c_str(), "rb"); @@ -9746,7 +9746,7 @@ void VulkanReplayConsumerBase::OverrideUpdateDescriptorSets( uint64_t handle_id = pipelines[i]; std::string file_name = "sh" + std::to_string(handle_id) + "_" + std::to_string(stage_create_info.stage); - std::string file_path = util::filepath::Join(options_.replace_dir, file_name); + std::string file_path = util::filepath::Join(options_.replace_shader_dir, file_name); FILE* fp = nullptr; int32_t result = util::platform::FileOpen(&fp, file_path.c_str(), "rb"); @@ -9794,7 +9794,7 @@ VkResult VulkanReplayConsumerBase::OverrideCreateGraphicsPipelines( std::vector> replaced_file_code; auto* maybe_replaced_create_infos = in_p_create_infos; - if (original_result >= 0 && !options_.replace_dir.empty()) + if (original_result >= 0 && !options_.replace_shader_dir.empty()) { uint32_t num_bytes = graphics::vulkan_struct_deep_copy(in_p_create_infos, create_info_count, nullptr); create_info_data.resize(num_bytes); @@ -9885,7 +9885,7 @@ VkResult VulkanReplayConsumerBase::OverrideCreateComputePipelines( size_t orig_size = create_info->codeSize; uint64_t handle_id = shaders[i]; std::string file_name = "sh" + std::to_string(handle_id); - std::string file_path = util::filepath::Join(options_.replace_dir, file_name); + std::string file_path = util::filepath::Join(options_.replace_shader_dir, file_name); FILE* fp = nullptr; int32_t result = util::platform::FileOpen(&fp, file_path.c_str(), "rb"); @@ -9927,7 +9927,7 @@ VkResult VulkanReplayConsumerBase::OverrideCreateShadersEXT( std::vector> replaced_file_code; auto* maybe_replaced_create_infos = in_p_create_infos; - if (original_result >= 0 && !options_.replace_dir.empty()) + if (original_result >= 0 && !options_.replace_shader_dir.empty()) { uint32_t num_bytes = graphics::vulkan_struct_deep_copy(in_p_create_infos, create_info_count, nullptr); create_info_data.resize(num_bytes); @@ -10098,7 +10098,7 @@ std::function()> VulkanReplayConsumer auto create_infos = reinterpret_cast(create_info_data.data()); std::vector> replaced_file_code; - if (returnValue >= 0 && !options_.replace_dir.empty()) + if (returnValue >= 0 && !options_.replace_shader_dir.empty()) { replaced_file_code = ReplaceShaders(createInfoCount, create_infos, pipelines.data()); } @@ -10233,7 +10233,7 @@ VulkanReplayConsumerBase::AsyncCreateShadersEXT(const ApiCallInfo& auto create_infos = reinterpret_cast(create_info_data.data()); std::vector> replaced_file_code; - if (returnValue >= 0 && !options_.replace_dir.empty()) + if (returnValue >= 0 && !options_.replace_shader_dir.empty()) { replaced_file_code = ReplaceShaders(createInfoCount, create_infos, shaders.data()); } diff --git a/framework/decode/vulkan_replay_options.h b/framework/decode/vulkan_replay_options.h index 7771a66d58..65e6c75f5c 100644 --- a/framework/decode/vulkan_replay_options.h +++ b/framework/decode/vulkan_replay_options.h @@ -57,9 +57,7 @@ static constexpr int kUnspecifiedColorAttachment = -1; struct VulkanReplayOptions : public ReplayOptions { bool enable_vulkan{ true }; - bool skip_failed_allocations{ false }; bool omit_pipeline_cache_data{ false }; - bool remove_unsupported_features{ false }; bool use_colorspace_fallback{ false }; bool offscreen_swapchain_frame_boundary{ false }; util::SwapchainOption swapchain_option{ util::SwapchainOption::kVirtual }; @@ -67,13 +65,9 @@ struct VulkanReplayOptions : public ReplayOptions int32_t override_gpu_group_index{ -1 }; int32_t surface_index{ -1 }; CreateResourceAllocator create_resource_allocator; - util::ScreenshotFormat screenshot_format{ util::ScreenshotFormat::kBmp }; - std::vector screenshot_ranges; - std::string screenshot_dir; - std::string screenshot_file_prefix{ kDefaultScreenshotFilePrefix }; uint32_t screenshot_width, screenshot_height; float screenshot_scale; - std::string replace_dir; + std::string replace_shader_dir; SkipGetFenceStatus skip_get_fence_status{ SkipGetFenceStatus::NoSkip }; std::vector skip_get_fence_ranges; bool wait_before_present{ false }; diff --git a/tools/tool_settings.h b/tools/tool_settings.h index f459f8362a..239d6ec9a0 100644 --- a/tools/tool_settings.h +++ b/tools/tool_settings.h @@ -1019,7 +1019,7 @@ GetVulkanReplayOptions(const gfxrecon::util::ArgumentParser& arg_parse replay_options.virtual_swapchain_skip_blit = true; } - replay_options.replace_dir = arg_parser.GetArgumentValue(kShaderReplaceArgument); + replay_options.replace_shader_dir = arg_parser.GetArgumentValue(kShaderReplaceArgument); replay_options.create_resource_allocator = GetCreateResourceAllocatorFunc(arg_parser, filename, replay_options, tracked_object_info_table);