Cannot debug OpenGL shaders (Nsight 3.1, Visual Studio 2012)

Hi,

I have an odd problem whereby no matter what I do, the shaders I use for any of my programs do not seem to be available for debug in Nsight. I have attempted all possible set up types (local single GPU debugging, local multi-GPU debugging, remote debugging with all of them running core 4.2 compliant code) and although the program compiles and runs correctly, when I try to see the list of active shaders, I get a blank list. Even if I pause and capture frame, it will still not allow me to debug the shader code (so things like pixel history will not work). Am I missing some sort of important step to make this happen?

I am using the standard glCreateShader, glCompileShader, glAttachShader, etc calls to compile and add the shaders.

Thanks in advance,

Vil

Hi Vil,

Do you get any warnings or error messages when you enter debugging?
What version of the driver are you running and what GPU (or GPUs) is the application running on?

Is there a way that we can get a hold of your binaries to reproduce?

thanks

Hi,

Thank you for the reply. I have tried the following set ups to make this work…

Target and Host:
Target - Windows 8 x64 (i7), Geforce 740M currently running driver version 326.41 as listed in the Nsight download page (I have also tried the latest drivers which made no difference).
Host - Windows 7 x64 (Xeon), Quadro FX 5800 currently running driver version 331.40 (driver listed on the Nsight download page does not install)

Both machines have Nsight version 3.1.0.13233 and VS2012 Ultimate version 11.0.60610.01 and .NET version 4.5.50709

I have attempted various applications in this set up, none of which would debug the shaders, but all of which would run and pause into frame capture with no issues.

I also attempted to reverse this set up and use OpenGL 3.3 and lower, but had the same results.

Target and Host:
Target - Same as above.
Host - Windows 7 x64 (i5), Geforce 480 GTX in SLI driver versions and software is the same as the target machine.

Same issues as before, reversing host also made no difference.

Local debugging also attempted with just the 740M card whilst using an OpenGL 4.2 application. The program would run fine and would also allow frame capture and pause, but no shader debug. I could go to the shader source via the API Inspector → Program → Source and add a breakpoint, but it would never actually hit.

Interestingly the 740M → 5800FX OpenGL 3.3 program has provided me with a little more information. If attempting to place a breakpoint in the shader source the following error is displayed:

At embeddedSource_0.hlsl, line 21(‘main()’, line 4)
The breakpoint will not currently be hit. No source correspondence for breakpoint ID 0ed95ef…etc…

I am now attempting a final target/host setup between the 740M and a completelety clean (just Win7, VS 2012 and Nsight 3.1) 610GT based system using an OpenGL 4.2 based program to see if I can get this to work. I cannot really provide any of the code which I need to debug due to NDA arrangements, but at this point, not even the simplest freely available to download examples (such as the ogl-samples-4.4.0.1 pack) will debug for me.

Any help is greatly appreciated.

Thanks,

Vil

Update:

As described in the earlier post, I’ve set up a target/host with a 610 GT as the target and the 740M as the host. The drivers for both are 326.41 and Nsight version is 3.1.0.13233. Running the same program that would not provide any shaders in the shader list (NSIGHT → Windows → Shaders List) in any of the aforementioned set ups now actually works with the new set up. The list is populated with the shaders and I can debug them with the use of break points.

Perhaps the card compatibility for Nsight is not as big as it would appear from the description? …or could there be other issues (system settings?) preventing shader debugging using the other methods I’ve described?

Thanks,

Vil

Hi Vil,

Sorry for the issues. I believe the issue is that optimus may be interfering when debugging on your 740M. Can you turn off optimus so that the display is driven by the 740M? If so, try that and see if it works for you.

Thanks