I have made a simple application using SDL 2 which I want to debug with NVidia NSight. It creates a 960x540 window and executes renderInit() before the main loop, render() on every cycle and renderFin() when the application exits. On every render it is supposed to display a tesselated triangle. The source code for these 3 functions and shader code can be found here.
However, when I try to run the application, it crashes.
seems I can’t download the mindump file you uploaded to http://www.mediafire.com/, actually, we do received the email from your gmail, could you re-send with minidump attached?
on the other hand, I need more info for investigate:
nsight version
OS version, driver version, GPU
it’s better to have your sample’s binary exe file to do investigate, with source code is even better.
I have resent the email with the minidump, info and the source code. I couldn’t send the binaries, because gmail doesn’t accept executables and I am on a slow, hotel internet right now.
I got your dmp file and source files. but hard to say that I can repro your issues locally. Maybe you can package your run-able sample [which crash at startup with nsight] in a zip file, rename it like *.zip_, then send it to me with your gmail. Sorry that I can’t access your google drive. Please note, the zip file should include all exe, dll, and resources files for run it standalone in another machine, like my test machine, otherwise, it will be difficult for me to investigate.
I also checked the source codes you posted here, this really reminds me another case, that may be similar to yours. Previously, a sample create a OGL ES compatible context [WGL_CONTEXT_ES2_PROFILE_BIT_EXT], when launch with nsight, it will also crash at glLinkProgram, since Nsight don’t support ES context. What’s the version of OGL context you are creating and using? Do you add some special tag/attribute for it?
I’ve also attempted setting the context through OpenGL.
However, I think I might have found a potential issue - my laptop has two graphics devices (one Intel HD Graphics 4600 and one GT 750M). It is possible (judging from querying the OpenGL Renderer: Screenshot - aefeb70d0b0cf523f52e036466d2d17a - Gyazo ) that this may be causing the crash (since shader compiling and linking is a GPU-dependent task). I’ll attempt to force the GT 750M to run, and I’ll edit/post the results here.
EDIT: It appears that fixed the issue, though it’d still be useful to know how to do this from VS2013 instead of forcing it globally.
EDIT 2: I’ve figured that out too, from the “Program Settings” :)
Seems you are using Laptop with Optimus system, although you can force use NV gpu by setting Program Settings, but I have to say Nsight don’t support Optimus system official right now, we have some feature request to support that system in our database.
When I run your sample locally on a desktop machine, it seems using glPolygonMode with mode=0x00000009, which should not be OGL 4.2 core, glPolygonMode’s mode only support GL_POINT[0x1B00], GL_LINE[0x1B01], GL_FILL[0x1B02], 0x0009 seems like GL_POLYGON: glPolygonMode - OpenGL 4 Reference Pages