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

remove CONVERT_EXPERIMENTAL_D3D12 and always support D3D12 in convert #1691

Merged
Show file tree
Hide file tree
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
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 0 additions & 3 deletions tools/convert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
17 changes: 8 additions & 9 deletions tools/convert/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<gfxrecon::decode::VulkanExportJsonConsumer>>;
#if defined(CONVERT_EXPERIMENTAL_D3D12)
#if defined(D3D12_SUPPORT)
using Dx12JsonConsumer =
gfxrecon::decode::MetadataJsonConsumer<gfxrecon::decode::MarkerJsonConsumer<gfxrecon::decode::Dx12JsonConsumer>>;
#endif
Expand Down Expand Up @@ -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.");
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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)
Expand Down
Loading