Search code examples
c++openglvisual-studio-2012nsight

Unable to debug shaders using Nsight


I wrote an OpenGL Application with 2 shader programs used, both equipped with a vertex shader and a fragment shader The shader programs just worked seemingly fine But when I tried to debug these shader programs with Nsight 4.6 I found that I was unable to find any shaders in the "Shaders list" window. By the way I was using a GPU for notebooks(NVIDIA GeForce GTX760M)


Solution

  • I'm guessing your OGL sample may still running on your Laptop's iGPU, but not NV's dGPU. Please try to add some codes to identify your renderer:

    const GLubyte* glvendro = glGetString(GL_VENDOR);
    const GLubyte* glrenderer = glGetString(GL_RENDERER);
    

    Make sure it's NV's GPU.

    If it shows non NV's GPU, that means driver pick some other GPU, please try to force disable that GPU and make sure driver only find NV's GPU.

    I know your meaning about 'switch the power management state to maxinum power, with GTX760M GPU forced on', but that may not work, you have to disable the non-NV GPU in hardware way, go into your BIOS and disable the iGPU.

    If you can't find that option in BIOS, just find another monitor, connect it to NV's dGPU output [HDMI, or DP], force your sample run on that monitor will make it use dGPU.

    Thanks An

    Seems it's a duplicate of the thread in Nvidia's development forum https://devtalk.nvidia.com/default/topic/830717/nsight-visual-studio-edition/nsight-shader-list-is-empty/