Compute shader debugger

2020-10-04 12:07:31

I've took a break from programming and now I am back; SHADERed development continues. Today I am releasing a small update with somewhat big features. Here's what's new in this update:

Compute shader debugger

Up until now you could only debug pixel and vertex shaders in SHADERed. Today I am expanding that list by adding support for debugging compute shaders.

The debugger executes other threads in the workgroup only when necessary and synchronizes the memory between the threads. This means that functions such as atomicAdd, barrier, etc... (and their HLSL counterparts) should work in the debugger as they would on the GPU.

To start debugging the compute shader you can either right click on the ComputePass object -> Debug -> enter the thread ID or you can initiate the compute shader debugger through the newly added suggestion feature in the "Pixel Inspect" window.
Debugging compute shader

Vector watches

"Vector watch" window is a new addition to the debugger's toolset - it allows you to visualize expressions and variables in 3D space. It's a step towards making the debugger more useful. I plan to add similar features to the debugger in the future.

You can check the documentation to see how to use this new feature.

Vector watch window

Web

The Lite version of SHADERed has no new features and is still stuck at v1.3.6 . Though, I've updated the .wasm files - I've compiled SHADERed Lite with size optimization flags. The web version of IDE is now 4x times smaller then before so it should probably load faster.

With the Lite version you can create your own shaders and upload them to the website (you have to create an account).

Other changes

The first person camera can now move faster around the scene - just hold the SHIFT key while moving.
First person camera fast movement

You can paste full file path in the file dialog's textbox.
File dialog

There are also some other changes and fixes which you can check out in the changelog.

SPIRV-VM progress

These new features in SHADERed required some improvments in the SPIRV-VM library (the engine behind SHADERed's debugger). SPIRV-VM now supports atomic operations and handles the Workgroup memory differently. SPIRV-VM calls a callback function each time the shader writes to the workgroup memory or when an atomic operation is reached. It's up to the user to properly handle storing and writing to shared memory though.
SPIRV-VM progress

New sponsor - DigitalOcean

I'd like to thank DigitalOcean for sponsoring SHADERed. Thanks to them, SHADERed's web servers will keep running for a long time. I highly recommend their services.

If you or your company uses SHADERed and also want to support its development, you can either contact me on dfranx@shadered.org or you can become a patron.