3 ms·
Step-through shader debugging has been available since DirectX 9 or earlier. Microsoft shipped a debugger called PIX and a reference shader rasterizer that PIX
by kevingadd 4y ago
Step-through shader debugging has been available since DirectX 9 or earlier. Microsoft shipped a debugger called PIX and a reference shader rasterizer that PIX would use to generate a reference image and let you step through how the shader should behave. I used it extensively.
Reference rasterizers also exist for D3D11 (Windows ships with one called WARP and it's fast enough to actually use for many workloads). I think there might be one for D3D12 as well but I'm not sure.
The dark ages 'printf with colors' stuff they describe is somewhat unique to GLSL and is just a smaller example of how the entire OpenGL ecosystem was horrible for debugging and not well designed. These days people can use Vulkan or D3D11 if they want an ecosystem that was designed intentionally and has good tooling (D3D12 is more comparable to Vulkan but is honestly not worth the trouble for most people yet). For a taste of what good modern graphics debugging looks like, run a modern game in Renderdoc and you can take a snapshot and then pick a random pixel on-screen and step-through debug the shader.
Naturally, game consoles have even better tooling. The PS4 SDK let you step through the actual low level instructions running on the GPU (I'm not sure if they were simulating execution or not though...)
- pjmlp 4y agoUnfortunately in what concerns the 3D Web, hardly anything changed. The easiest way is to consider it as a target platform and do everything native during development and deploy to Web as last step. From the last WebGL + WebGPU meeting, the answer given to the state of GPU debugging, it seems nothing better than SpectorJS is expected in years to come. A bit sad when browser vendors don't see it as a priority, no wonder Indies rather go mobile native instead, or nowadays streaming, better APIs and tooling out of the box.