Nsight shader debugging in OpenGL not working.

Hi there,

I am trying to debug my OpenGL program with Nsight on 3 computer, but all of them are not working.

The first computer is a notebook computer with GTX 950M, WIN8.1 64bit, VS2015 Community, NSight 5.0294, driver version 355.98, when I press Graphics Debugging,the HUD shows up on my app, the screen turns to blue, totally dead. I tried Nsight 4.5, same prolbem.

The second computer is a notebook computer with GTX 525M, WIN7 64bit, VS2015 Community, NSight 5.0294, driver version 361.43, when I press Graphics Debugging, the HUD shows up on my app, I follow the step in “Nsight3_2_Debug-OGL-4_2.mp4” video, I press ctrl+Z -> drag the bar below ->program-> some shader->source, when I press “source” button, nothing happend but VS window freezed, and I try again, same problem. Later, I run the same program(IslandGL4) in VS2012 with Nsight 4.5 and 3.2, when I press the “source” button, I can go inside the shader, but after I set a breakpoint in the shader, it never hits the breakpoint.

The third computer is a GTX TITAN X , WIN10 64bit, VS2015 Community, NSight 5.0294, driver version 361.43, when I press Graphics Debugging,the HUD shows up on my app, when I press “source” button, nothing happend but VS window freezed, and I try again, same problem.

All steps and app I tried just following the video from nvidia. I very worry about how to debug in OpenGL shader. Please help.

Thanks.
Gordon

Hi Gordon125,

The GTX 950M and Titan X are all Maxwell GPU, unfortunately, Nsight don’t support shader debugging on Maxwell GPU, you should need to use Fermi or Kepler GPUs.

In your GTX 525M machine, please make sure you enter the pause&capture mode [ctrl-z and space] at first. If your laptop also has a iGPU, please make sure your OGL sample runs on dGPU actually. Could you just try to do ctrl-z and space, open the last drawcall’s fragment shader, set bp on color.1 == 1, and you will see the bp hit as expected. That works fine on my side.

Thanks
An

Hi An,
On my GTX 525M machine, I did [ctrl-z and space] at first every time, but what is last drawcall? Is that the call in the end of the bar? And where is “color.1 == 1”, I only found “color.a = 1” in IslandGL4. I set bp in anywhere it doesn’t hit.

Thanks.
Gordon

Hi Gordon125,

Yes, the last drawcall is in the end of the bar. sorry, ‘color.1 = 1’ is a typo, that should be ‘color.a = 1’.

It don’t hit the bp is weird, after you set bp on that line, you got a cycle or a red point? Does Nsight prompt any msg in the Nsight output window? I notice you are GT 525M GPU, can you confirm your GL_RENDERER and GL_VENDOR is your dGPU when launch with Nsight?

Thanks
An

Hi An,
My bp is red point. GL_RENDERER and GL_VENDOR is alright. Please see my recorded video on youtube.

Thanks.
Gordon

Hi Gordon125,

Could you show me the contents of the Output window of visual studio? There should be something related with Nsight.

Thanks
An

Hi An,
My output window of visual studio in nsight section:

Nsight Debug
The remote system’s TDR delay is set to 2 seconds. This will timeout when setting breakpoints on the target. Please modify the system’s TDR setting.

That’s all. It’s same as the popup window when I launch debugging.

Thanks.
Gordon

Hi Gordon125,

Could you confirm something:

  • your Nsight version is 5.0294, but Nsight’s version should be something like 5.0.0.15294, you can get it from ‘Nsight->Help->About Nsight’. Could you confirm?
  • check Nsight->Graphics->Shader debugging preference doesn’t set to ‘disable’
  • are you using some remote desktop app to do shader debug remotely? please try to turn off these and try shader debug directly in front of your laptop.

Thanks
An

Hi An,

The previous video I made is using Nsight 3.2.2.13351 and VS2012, this video is using 5.0.0.15294 and VS2015, but when I hit “source” button, nothing happened but VS window freezed. I have confirmed the things you mentioned above, and this is my local desktop app.

https://youtu.be/U00ZwAOatG4

Thanks.
Gordon

I’m very worry about how to debug in OpenGL shader. Please help.

Hi Gordon125,

Your output of Nsight looks weird, here is mine:

Nsight Debug
The target system’s TDR delay is set to 2 seconds. This may timeout when setting breakpoints. Please increase the system’s TDR timeout setting in Nsight Monitor options to at least 30 seconds.
Shader created : 6000000100000001 3
Shader created : 5000000100000002 3
Shader created : 6000000100000003 3
Shader created : 5000000100000004 3
Shader created : 6000000100000005 3
Shader created : 4000000100000006 3
Shader created : 2000000100000007 3
Shader created : 5000000100000008 3
Shader created : 6000000100000009 3
Shader created : 400000010000000a 3
Shader created : 200000010000000b 3
Shader created : 500000010000000c 3
Shader created : 600000010000000d 3
Shader created : 400000010000000e 3
Shader created : 200000010000000f 3
Shader created : 5000000100000010 3
CreateGpuCoordinateResource - Shader: 5000000100000004 3 - GpuCoord 0.0.24.0

After the IslandGL launch, I got some log like ‘Shader created’, after I set bp and bp hit, I got ‘CreateGpuCoordinateResource’.

In your youtub video, it’s just only some information about TDR. I am using the same driver 361.43 as you, and I am Win10 th2. My GPU is Quadro K4000.

Could you take a same try on some Kepler GPU? I don’t have your GPU GT 525M on hand, but I will try to find some Fermi GPU to take another shot.

Thanks
An

Hi Gordon125,

I just find a GT 610, and that also works fine on my side. I am sorry that’s the most similar GPU on my hand, but Shader Debugging still works fine on it.

Could you try to find another desktop GPU with Kepler or Fermi GPU and take another try?

Thanks
An

Hi An,

Thanks for helping. I will try another card. By the way, when will Nsight support Maxwell?

Thanks.
Gordon

Hi An,

I tried GTX480 and it works, but sometime I triggered the TDR, a wrong message shows up, where to change TDR setting?

Thanks.
Gordon

Hi Gordon125,

Nsight do support Maxwell GPU, just Nsight’s Shader Debugging doesn’t support Maxwell GPU.

Just right click on the monitor, choose General, set WDDM TDR Delay to the value you want, and restart your machine to make your long TDR timeout value work.

Thanks
An