mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
egl: Fixes for eglQueryContext and RESET_NOTIFICATION_STRATEGY
Streamline the conditions for when `RESET_NOTIFICATION_STRATEGY_EXT` can be queried to match the conditions when it can be set - notably only with GLES. While on it, add support to query the KHR and suffix-less versions. Cc: mesa-stable Signed-off-by: Robert Mader <robert.mader@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35242>
This commit is contained in:
parent
ba1bd9aed8
commit
afd6788036
1 changed files with 9 additions and 1 deletions
|
|
@ -765,6 +765,7 @@ EGLBoolean
|
|||
_eglQueryContext(_EGLContext *c, EGLint attribute, EGLint *value)
|
||||
{
|
||||
_EGLDisplay *disp = c->Resource.Display;
|
||||
EGLenum api = c->ClientAPI;
|
||||
|
||||
if (!value)
|
||||
return _eglError(EGL_BAD_PARAMETER, "eglQueryContext");
|
||||
|
|
@ -798,7 +799,14 @@ _eglQueryContext(_EGLContext *c, EGLint attribute, EGLint *value)
|
|||
*value = c->Protected;
|
||||
break;
|
||||
case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT:
|
||||
if (!disp->Extensions.EXT_query_reset_notification_strategy)
|
||||
if (!disp->Extensions.EXT_create_context_robustness ||
|
||||
api != EGL_OPENGL_ES_API)
|
||||
return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext");
|
||||
*value = c->ResetNotificationStrategy;
|
||||
break;
|
||||
case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR:
|
||||
if (!(disp->Extensions.KHR_create_context && api == EGL_OPENGL_API) &&
|
||||
disp->Version < 15)
|
||||
return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext");
|
||||
*value = c->ResetNotificationStrategy;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue