In the driver after version 536.23 a regression was introduced that causes query buffers to crash semi-randomly. The more frequently they are used the sooner it crashes, with heavy use it crashes almost immediately.
All versions of glGetQueryBufferObject and glBindBuffer(GL_QUERY_BUFFER) + glGetQueryObject are affected.
There is no error or debug message generated when this happens, however if GL_RESET_NOTIFICATION_STRATEGY_ARB is set to GL_LOSE_CONTEXT_ON_RESET then glGetGraphicsResetStatus returns GL_UNKNOWN_CONTEXT_RESET.
Changing query type (GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED, GL_TIME_ELAPSED…) does not stop the crash from happening.
Changing how the buffer was created (size, flags, glBufferStorage vs glBufferData…) does not stop the crash from happening.
Every time this happens there are multiple events in the Event Viewer:
- there is always a warning event saying that “Display driver nvlddmkm stopped responding and has successfully recovered.”.
- there are one or more error events with varying errors. These are some of the errors I’ve seen:
Error occurred on GPUID: 100
Graphics Exception: ESR 0x404600=0x80000001
Graphics Exception: EXTRA_INLINE_DATA
Graphics Exception: ESR 0x405848=0x80000000
Graphics Exception: ESR 0x405840=0xa0040a06
Graphics Exception: Shader Program Header 18 Error
Graphics Exception: Shader Program Header 1 Error
It happens on every PC I’ve tried it on (tested on GPUs: 1070, 1080Ti, 2080, 4090 and CPUs: Intel 7700k, AMD 5950x, AMD 7950x).
Every driver after 536.23 is affected, up to and including 545.84. In versions before 545.84 swapping nvoglv64.dll with the one from 536.23 would fix the crash but in 545.84 there are other changes which stop this from working.