Debugging DirectCompute Shader with NVIDIA NSight

Started by
1 comment, last by Tim Coolman 11 years, 4 months ago
I would like to debug my DirectCompute shader. NVIDIA's NSight website claims that it supports DirectCompute for GPGPU debugging, but their documentation only shows how to debug CUDA C++ code. I have successfully used NSight to do graphics debugging and it works great - I run NSight on my laptop, which copies and launches my application on my desktop PC, and allows me to debug remotely. I can't seem to figure out how to get compute shader debugging to work, though. I tried putting a breakpoint inside the compute shader function of my .fx file, but it doesn't trigger when my C++ application calls Dispatch for that shader. Could it have something to do with the fact that my application compiles all my shaders at runtime?

Has anyone had any success debugging their DirectCompute HLSL code using NVIDIA NSight? If so, any guidance would be much appreciated!

Thanks,
Tim
Advertisement
I will also ask if anyone can recommend other methods of compute shader debugging. If possible, I'd really like to be able to debug my shader in the context of my application so that I can see for certain the data and parameters it has been given from my application.
I posted this question to the nVidia developer forum under NSight Visual Studio, and I got this response from a moderator.

Debugging DirectCompute shaders is the similar process as to debugging any other shader. Please take a look at the user's guide, under Graphics Debugger > Shader Debugger.[/quote]

Simple answer, I just overlooked this assuming compute debugging would be more like CUDA debugging. Followed these instructions and it works great.

This topic is closed to new replies.

Advertisement