目录

Vulkan Shader Debug

The Vulkan shader debug (vulkan-spirv) supports only Vulkan keyframe debug analysis. Ray tracing, meshes, geometry, tessellation, cluster culling, and subpass shaders are not supported. Only fragment shaders, compute shaders, and vertex shaders are supported.

Before using the Vulkan shader debug (vulkan-spirv) function, choose Tools > Settings > Core > Config Editor > Vulkan > Debug and select GPUShaderDebugging.

Debug Vertex Shader:

  1. Choose File > Open Capture, and open an .rdc file. In Event Browser, select a draw index.

  2. Choose Window > Mesh Viewer to access the mesh viewer. Right-click a vertex and choose Debug this Vertex. The shader module debug view is automatically displayed.

Debug Fragment Shader:

  1. Choose File > Open Capture, and open an .rdc file. In Event Browser, select a draw index.

  2. Choose Window > Texture Viewer to access the texture viewer. Right-click to select a pixel and then click Debug in the lower right corner of the window. By default, the last call that has passed the depth test is debugged and the debug view of the shader module is automatically displayed. If the pixel contains contributions from different primitives (redraws) and you want to select a specific call for debugging, click History to select the call first. Note that if the selected draw call does not contribute to the pixel, the pixel history view will be opened instead of the shader debug view.

    The shader debugger supports all basic debugging functions, such as step-forward and step-backward execution, running to a specified location, breakpoint setting, and inspection of registers and variables.

Debug Compute Shader:

  1. Choose File > Open Capture, and open an .rdc file. Search for dispatch in the search box on Event Browser, and select a dispatch.

  2. Choose Window > Pipeline State to access the Pipeline State page, click CS, and click Debug.

  3. Enter a group ID and thread ID, and click Debug. The debug view of the shader module is automatically displayed.