egl: implement EGL_EXT_query_reset_notification_strategy
`EGL_EXT_query_reset_notification_strategy` complements `EXT_create_context_robustness` and enables an application or framework to retrieve an existing context's reset notification strategy in order to create a compatible shared context. Signed-off-by: Simon Zeni <simon.zeni@collabora.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25996>
This commit is contained in:
@@ -20,3 +20,4 @@ VK_KHR_calibrated_timestamps on RADV
|
||||
VK_KHR_vertex_attribute_divisor on RADV
|
||||
VK_KHR_maintenance6 on RADV
|
||||
VK_KHR_ray_tracing_position_fetch on RADV
|
||||
EGL_EXT_query_reset_notification_strategy
|
||||
|
@@ -893,6 +893,11 @@ dri2_setup_screen(_EGLDisplay *disp)
|
||||
disp->Extensions.EXT_create_context_robustness =
|
||||
get_screen_param(disp, PIPE_CAP_DEVICE_RESET_STATUS_QUERY);
|
||||
|
||||
/* EXT_query_reset_notification_strategy complements and requires
|
||||
* EXT_create_context_robustness. */
|
||||
disp->Extensions.EXT_query_reset_notification_strategy =
|
||||
disp->Extensions.EXT_create_context_robustness;
|
||||
|
||||
if (dri2_dpy->fence) {
|
||||
disp->Extensions.KHR_fence_sync = EGL_TRUE;
|
||||
disp->Extensions.KHR_wait_sync = EGL_TRUE;
|
||||
|
@@ -549,9 +549,10 @@ _eglCreateExtensionsString(_EGLDisplay *disp)
|
||||
_EGL_CHECK_EXTENSION(EXT_create_context_robustness);
|
||||
_EGL_CHECK_EXTENSION(EXT_image_dma_buf_import);
|
||||
_EGL_CHECK_EXTENSION(EXT_image_dma_buf_import_modifiers);
|
||||
_EGL_CHECK_EXTENSION(EXT_present_opaque);
|
||||
_EGL_CHECK_EXTENSION(EXT_protected_content);
|
||||
_EGL_CHECK_EXTENSION(EXT_protected_surface);
|
||||
_EGL_CHECK_EXTENSION(EXT_present_opaque);
|
||||
_EGL_CHECK_EXTENSION(EXT_query_reset_notification_strategy);
|
||||
_EGL_CHECK_EXTENSION(EXT_surface_CTA861_3_metadata);
|
||||
_EGL_CHECK_EXTENSION(EXT_surface_SMPTE2086_metadata);
|
||||
_EGL_CHECK_EXTENSION(EXT_swap_buffers_with_damage);
|
||||
|
@@ -737,6 +737,11 @@ _eglQueryContext(_EGLContext *c, EGLint attribute, EGLint *value)
|
||||
return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext");
|
||||
*value = c->Protected;
|
||||
break;
|
||||
case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT:
|
||||
if (!disp->Extensions.EXT_query_reset_notification_strategy)
|
||||
return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext");
|
||||
*value = c->ResetNotificationStrategy;
|
||||
break;
|
||||
default:
|
||||
return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext");
|
||||
}
|
||||
|
@@ -106,9 +106,10 @@ struct _egl_extensions {
|
||||
EGLBoolean EXT_image_dma_buf_import;
|
||||
EGLBoolean EXT_image_dma_buf_import_modifiers;
|
||||
EGLBoolean EXT_pixel_format_float;
|
||||
EGLBoolean EXT_present_opaque;
|
||||
EGLBoolean EXT_protected_content;
|
||||
EGLBoolean EXT_protected_surface;
|
||||
EGLBoolean EXT_present_opaque;
|
||||
EGLBoolean EXT_query_reset_notification_strategy;
|
||||
EGLBoolean EXT_surface_CTA861_3_metadata;
|
||||
EGLBoolean EXT_surface_SMPTE2086_metadata;
|
||||
EGLBoolean EXT_swap_buffers_with_damage;
|
||||
|
Reference in New Issue
Block a user