Skip to content

Converts RenderDoc Vulkan capture to compilable and executable C++ code.

License

Notifications You must be signed in to change notification settings

Jason2013/RDCtoVkCpp

 
 

Repository files navigation

Windows Build Linux Build

Converts RenderDoc Vulkan capture to compilable and executable C++ code.
Work in progress.

How to use

  1. Export RenderDoc capture to XML + ZIP.
  2. Build RDCtoVkCpp or use prebuild binaries.
  3. Run console application RdConverter.exe with -i path/to/exported/rdc.zip -o folder/name/for/cpp/code

Other command line arguments:

-h, --help              - show help
--build                 - build project
--configure             - generate project
--clean                 - clean output folder before converting
--div-by-cmdbuf [bool]  - group api calls by command buffers, default = true
-i, --input [filename]  - open RenderDoc capture, must be *.zip or *.zip.xml file
-o, --output [folder]   - save c++ code into output directory

Warning: console application and converted sources from capture is not portable! You should rebuild and run converter again on new environment or fix pathes to files.

Features

  • Produces readable C++ code.
  • Code validation to fix unsignaled fences/semaphores/events and reset they before next frame.
  • Frame played in infinite loop.
  • Used resource debug name if possible.
  • SPIR-V decompiled to GLSL.
  • Resizable window.

Tested on

  • Doom (2016)
  • Wolfenstein 2 - incorrect rendering
  • X4 - incorrect rendering
  • Dota 2
  • Rage 2 - incorrect rendering
  • RDR 2 - incorrect rendering
  • 3DMark api overhead test
  • No Man's Sky

TODO

  • Immutable samplers
  • Measure frame time
  • Portability (remap queue family and memory types)
  • Upload multisampled image
  • Sparse memory
  • 2nd plane formats
  • Fix validation errors.

Building

Requires C++17 and CMake 3.10+

Dependencies:
FrameGraph - only stl and vulkan helpers.
VulkanMemoryAllocator - required.
glfw or SDL2 - required.
glslang - compile glsl to spirv.
SPIRV-Cross - converts spirv to glsl.
rapidxml - for RDC parsing.
miniz - for RDC content loading.
RenderDoc - some code to generate parser.

About

Converts RenderDoc Vulkan capture to compilable and executable C++ code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 65.6%
  • C 33.2%
  • CMake 1.2%