OpenGL robustness reset status and verification of recovered context data
0 reputation · 15 Dec 2020, 11:55 UTC
OpenGL 4.5 core includes ARB_robustness with glGetGraphicsResetStatus reporting GL_NO_ERROR, GL_GUILTY_CONTEXT_RESET, GL_INNOCENT_CONTEXT_RESET or GL_UNKNOWN_CONTEXT_RESET for the current context.
The specification declares context contents undefined once the status is not GL_NO_ERROR and provides no portable query to determine which buffers, textures, programs or state survived. Reset notification strategy is fixed at context creation and detection is per-context, with no guarantee about other contexts in the process.
GL_UNKNOWN_CONTEXT_RESET is the ambiguous case where the application cannot distinguish its own fault from an OS or driver-initiated reset, and no further diagnostic token is defined.
Given these constraints, can any context state be considered trustworthy after a non-GL_NO_ERROR reset without full recreation? Does GL_UNKNOWN_CONTEXT_RESET require treating the context as total loss for portable behavior? Must multi-context applications independently assess each context for reset status?