diff --git a/CMakeLists.txt b/CMakeLists.txt index 59ddb67bc2..1c683ade0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,14 +167,8 @@ if(MSVC) # Add option to enable/disable launcher and interceptor. option(BUILD_LAUNCHER_AND_INTERCEPTOR "Build launcher and interceptor" OFF) - # Add option to enable/disable D3D12 gfxrecon-convert support. - option(CONVERT_EXPERIMENTAL_D3D12 "Build with convert DX12 enabled" OFF) - if(${D3D12_SUPPORT}) add_definitions(-DD3D12_SUPPORT) - if(${CONVERT_EXPERIMENTAL_D3D12}) - add_definitions(-DCONVERT_EXPERIMENTAL_D3D12) - endif() # Check Windows SDK version and print warning if there is a mismatch. set(EXPECTED_WIN_SDK_VER "10.0.20348.0") diff --git a/tools/convert/README.md b/tools/convert/README.md index 7d610105ea..bbf9a7c872 100644 --- a/tools/convert/README.md +++ b/tools/convert/README.md @@ -8,9 +8,6 @@ The text output is written by default to a .json file in the directory of the specified GFXReconstruct capture file. Use `--output` to override the default filename for the output. -Configure with the CONVERT_EXPERIMENTAL_D3D12 flag in order to enable conversion of D3D12 captures. - - ```text gfxrecon-convert - A tool to convert GFXReconstruct capture files to text. diff --git a/tools/convert/main.cpp b/tools/convert/main.cpp index 2d74c9933f..b7528d0836 100644 --- a/tools/convert/main.cpp +++ b/tools/convert/main.cpp @@ -33,14 +33,14 @@ #include "generated/generated_vulkan_json_consumer.h" #include "decode/marker_json_consumer.h" #include "decode/metadata_json_consumer.h" -#if defined(CONVERT_EXPERIMENTAL_D3D12) +#if defined(D3D12_SUPPORT) #include "generated/generated_dx12_json_consumer.h" #endif using gfxrecon::util::JsonFormat; using VulkanJsonConsumer = gfxrecon::decode::MetadataJsonConsumer< gfxrecon::decode::MarkerJsonConsumer>; -#if defined(CONVERT_EXPERIMENTAL_D3D12) +#if defined(D3D12_SUPPORT) using Dx12JsonConsumer = gfxrecon::decode::MetadataJsonConsumer>; #endif @@ -175,19 +175,18 @@ int main(int argc, const char** argv) gfxrecon::decode::FileProcessor file_processor; -#ifndef CONVERT_EXPERIMENTAL_D3D12 +#ifndef D3D12_SUPPORT bool detected_d3d12 = false; bool detected_vulkan = false; gfxrecon::decode::DetectAPIs(input_filename, detected_d3d12, detected_vulkan); - if (detected_d3d12) + if (!detected_vulkan) { - GFXRECON_LOG_INFO("D3D12 support for gfxrecon-convert is currently experimental."); - GFXRECON_LOG_INFO("To enable it, run cmake again with switch -DCONVERT_EXPERIMENTAL_D3D12"); + GFXRECON_LOG_INFO("Capture file does not contain Vulkan content. D3D12 content may be present but " + "gfxrecon-convert is not compiled with D3D12 support."); goto exit; } #endif - if (file_per_frame && output_to_stdout) { GFXRECON_LOG_WARNING("Outputting a file per frame is not consistent with outputting to stdout."); @@ -253,7 +252,7 @@ int main(int argc, const char** argv) json_writer.StartStream(&out_stream); // If CONVERT_EXPERIMENTAL_D3D12 was set, then add DX12 consumer/decoder -#ifdef CONVERT_EXPERIMENTAL_D3D12 +#ifdef D3D12_SUPPORT Dx12JsonConsumer dx12_json_consumer; gfxrecon::decode::Dx12Decoder dx12_decoder; @@ -289,7 +288,7 @@ int main(int argc, const char** argv) } json_consumer.Destroy(); // If CONVERT_EXPERIMENTAL_D3D12 was set, then cleanup DX12 consumer -#ifdef CONVERT_EXPERIMENTAL_D3D12 +#ifdef D3D12_SUPPORT dx12_json_consumer.Destroy(); #endif if (!output_to_stdout)