diff --git a/docs/imgs/Screenshots/ShaderDisassembly.png b/docs/imgs/Screenshots/ShaderDisassembly.png new file mode 100644 index 000000000..4afde128d Binary files /dev/null and b/docs/imgs/Screenshots/ShaderDisassembly.png differ diff --git a/docs/imgs/Screenshots/ShaderViewer.png b/docs/imgs/Screenshots/ShaderViewer.png new file mode 100644 index 000000000..209ddfa5c Binary files /dev/null and b/docs/imgs/Screenshots/ShaderViewer.png differ diff --git a/docs/renderdoc.hhk b/docs/renderdoc.hhk index 95ee1c95d..a1dd87bfe 100644 --- a/docs/renderdoc.hhk +++ b/docs/renderdoc.hhk @@ -362,6 +362,10 @@ +
  • + + +
  • diff --git a/docs/window/index.rst b/docs/window/index.rst index 6459d08eb..00a610335 100644 --- a/docs/window/index.rst +++ b/docs/window/index.rst @@ -9,6 +9,7 @@ Window reference event_browser settings_window pipeline_state + shader_viewer timeline_bar capture_connection debug_messages diff --git a/docs/window/settings_window.rst b/docs/window/settings_window.rst index 679f6e179..b30ecc732 100644 --- a/docs/window/settings_window.rst +++ b/docs/window/settings_window.rst @@ -181,6 +181,8 @@ This option tries to make the disassembly of shaders easier to read by substitut | :guilabel:`Vulkan Disassemblers` +.. _vulkan-disassem: + Here you can configure external tools that disassemble binary SPIR-V into a human-readable representation. Some built-in tools are supported such as SPIRV-Cross and spirv-dis, for these tools if they can be auto-detected they will already be present, and they may be distributed with RenderDoc builds in case a version isn't installed on the system. diff --git a/docs/window/shader_viewer.rst b/docs/window/shader_viewer.rst new file mode 100644 index 000000000..b7d043e52 --- /dev/null +++ b/docs/window/shader_viewer.rst @@ -0,0 +1,27 @@ +Shader Viewer +============= + +The Shader Viewer is used for displaying, editing, and debugging shaders. + +Information about editing shaders can be found in other documents such as :doc:`../how/how_edit_shader` and :doc:`../how/how_custom_visualisation`. + +Debugging shaders is documented in :doc:`../how/how_debug_shader`. + +Overview +-------- + +.. figure:: ../imgs/Screenshots/ShaderViewer.png + + The shader viewer displaying a D3D11 shader + +When opened from the :doc:`pipeline_state` for a given shader stage, the shader viewer display the shader itself as well as the input and output signatures. These signatures form the interface between this shader stage and the previous and next parts of the rendering pipeline. For example a vertex shader will list the fixed function vertex inputs, and the interpolated values that are passed to the next stage. + +The shader viewer displays the source code in the formats that are available. When debugging information has embedded it there will be tabs for each original source file. For APIs using a bytecode IR the disassembly of that bytecode will also be displayed in a separate tab. + +Several different disassembly forms are possible, depending on the API and available plugins and hardware support. Above the disassembly tab will be a drop-down listing the possible representations including hardware specific ISA formats like AMD GCN. + +For Vulkan SPIR-V shaders, you can configure custom disassemblers :ref:`in the settings window ` which allows for various customised disassemblers such as SPIRV-Cross and spirv-dis. + +.. figure:: ../imgs/Screenshots/ShaderDisassembly.png + + The disassembly options for a Vulkan SPIR-V shader