PDA

View Full Version : amd: no callstack with debug context



Mikkel Gjoel
10-14-2011, 01:17 PM
I have had this issue for a while: When running on an AMD card with an OpenGL debug context, the callstack is severed at the driver-level, when receiving debug-callbacks. Same code gives a full callstack on Nvidia.

While AMD do mention that it may not be present depending on where the error happens, evidently others are able to get a callstack on AMD-hardware. So I suspect my window- or context-creation may be off.

I have created a small test-program, resulting in a severed callstack on AMD, and a nice full callstack on Nvidia. Tested on latest 11.9 drivers on a 6970, win7-64.

http://pastebin.com/0QViHXhZ

Alfonse Reinheart
10-14-2011, 03:06 PM
You're talking about synchronized ARB_debug_output, right?

carsten neumann
10-14-2011, 03:25 PM
Sounds a bit as if AMD don't put debug info or rather stack unwind info into their drivers? Do they perhaps have separate debug drivers?

Mikkel Gjoel
10-15-2011, 09:55 AM
Alfonse - I am, not just the infolog.

doug65536
10-16-2011, 02:26 PM
I utilized that extension thinking it would be great. I used the async model and got nearly useless callbacks - pretty much just the glGetError() enum and the (human readable) string version of the same. *Nearly* useless, but at least I get to see every gl error, which is normally none. There's a breakpoint watching that line of code like a hawk.

I thought I'd get great info by making it a "debug" device context. Turns out it made barely any difference (that I noticed anyways).

We're supposed to be getting callstacks? I looked over the spec, and (as far as I remember) it was left completely wide open to implementers, meaning implementers did as little as they could get away with, which is just a glGetError enum.

(I'm running nvidia GTX580, latest drivers as of now)

Alfonse Reinheart
10-16-2011, 03:03 PM
Alfonse - I am, not just the infolog.

Then it's an AMD driver bug. The main difference between the AMD and ARB debug_info extensions is that ARB_debug_info has a synchronous mode, while the AMD version does not. So it's likely that AMD just did a short-cut in implementing the ARB version by directly porting it.


I used the async model and got nearly useless callbacks - pretty much just the glGetError() enum and the (human readable) string version of the same.

That's because you're on NVIDIA. AMD basically invented the debug_info extension, and the ARB adopted it. So they provide more useful info.

Also, NVIDIA drivers that support 4.2 apparently provide more useful debug information. So it's just a temporary thing.