Visual Graphics Diagnostics

Started by
4 comments, last by Aclard 4 years, 11 months ago

Hi everyone,

I'm working on a Unity compute shader and using Visual Studio Graphics Diagnostics for debugging (see here), and having some troubles with it.

You can see that when i start step by step in shader I've access to almost all data (local,external buffer,intrinsic) but my temp buffer (which is group shared) is "Unused". Is there a way for me to see those data ?? 

 

Thanks for your answers !!

 

PS: Visual is in french ... sry for that ^^'

Shaderlocal.PNG

Extern Buffer.PNG

Advertisement

VSGD and even PIX For Windows (I believe) have great difficulty in debugging Compute Shaders that use LDS.

The most obvious reason for this is the fact that values written to LDS typically come from the execution of threads other than the one you're debugging. So in order to be able to debug thread 0 the debugger also needs to be executing all other threads in the thread group and safely respecting any barriers that may exist in the code.

For this reason I think you're going to be out of luck as far as debugging compute shaders with LDS goes. I haven't checked, but you might find the IHV's own tools do a better job in this regard (but I wouldn't bet on it).

Adam Miles - Principal Software Development Engineer - Microsoft Xbox Advanced Technology Group

Even if i do pass barrier in my code in step by step mode ? That's a bit weird no ?

1 hour ago, Aclard said:

Even if i do pass barrier in my code in step by step mode ? That's a bit weird no ?

Even if you step over a barrier you're still relying on all the other threads having executed up to that point. And since the debuggers are designed to only follow execution of one thread you can't assume that any values you read from LDS have been written by the other threads.

None of this is impossible to solve, but today the tools aren't capable of doing it.

Adam Miles - Principal Software Development Engineer - Microsoft Xbox Advanced Technology Group

I'll try to transfer shared to an external buffer between 2 barriers, it'll slow down the execution but I should be able to access data.

This topic is closed to new replies.

Advertisement