Compute Shader Debugging options

Hi TD community,

Are there any options out there for debugging glsl compute shaders?

Every tool I have come across is woefully out of date or does everything except compute shaders.

Its a big ask as I have discovered after days of trolling though the docs for both TD and glsl/ogl; but trying to find bugs using only TDs basic error reporting is huge time sink that could be resolved some sort of debug tooling.

Also It would be good to have a real documentation for the TD glsl system, the current doc is very overview in nature and could use some more elaborate example code to explain the ideal TD glsl compute pipeline. If there is something already out there, I am yet to find it so please feel free to reply with any links.

thank you very much

In the upcoming 2023 series, we will have support for RenderDoc shader debugging, so you’ll be able to do line-by-line debugging of your compute shaders.
Can you elaborate on your other issues though? What are you looking for in terms of ‘ideal compute pipeline’?
I often use TOP To CHOP as a way of debugging shader values, and early writing out the values into pixels to see the state of the program at given points.

1 Like

This is great news, I had actually already tried to use RenderDoc but it of course didn’t work. Looking forward to seeing that happen.

As for ideal pipeline questions, it would be good to know how TD works with UBO/SSBO, for example:
given the following in a multi pass shader

struct Particle{
	vec4 color;
	vec3 position;
	vec3 velocity;
	float age;
	float lifeSpan;
};

layout(std140, shared,  binding = 0)coherent buffer bufferParticles{
	Particle particle [];
};

can buffers be passed between glslmulti TOPS and if so how? is it automatic or is there some TD specific mechanism that needs to be used. I admit this starts to get a bit esoteric but It would be good to know just how closely one can work with the glsl docs and books and how much is going to be TD specific.

Its still early days for compute shaders in general and its great that Renderdoc will come to TD as that would make TD a great tool for shader development in general.

I am still learning and not any sort of expert so forgive me if this sounded silly.

Thanks.

Currently you don’t have access to SSBOs unfortunately. You need to read/write all of your data from the image inputs and outputs.

1 Like

I see, thanks for the quick replies, literally just saved me hours of building that out only to have it not be viable.

It would be great to be able to pass buffers around like we currently pass sTD2DInputs/sTD3DInputs and sTDComputeOutputs avoiding the step and processing costs of writing out multiple images to represent raw data only to immediately read them back into another pass.

thanks again for the quick replies.