From: Emma Anholt Date: Wed, 30 Nov 2022 23:23:56 +0000 (-0800) Subject: egl: Replace the robustness DRI2 ext check with a pipe cap query. X-Git-Tag: upstream/23.3.3~15813 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e6285ea55fb2abf3b38f40ea0c3a69c2b6d7d8e5;p=platform%2Fupstream%2Fmesa.git egl: Replace the robustness DRI2 ext check with a pipe cap query. This means that swkms will now report it with llvmpipe. drisw reported it with llvmpipe, and it appears to have been an oversight that got refactored into an obvious "if !swkms" check later. Reviewed-by: Adam Jackson Reviewed-by: Marek Olšák Part-of: --- diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 95052cb..9321e60 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -736,7 +736,6 @@ static const struct dri_extension_match swrast_core_extensions[] = { }; static const struct dri_extension_match optional_core_extensions[] = { - { __DRI2_ROBUSTNESS, 1, offsetof(struct dri2_egl_display, robustness), true }, { __DRI2_CONFIG_QUERY, 1, offsetof(struct dri2_egl_display, config), true }, { __DRI2_FENCE, 2, offsetof(struct dri2_egl_display, fence), true }, { __DRI2_BUFFER_DAMAGE, 1, offsetof(struct dri2_egl_display, buffer_damage), true }, @@ -892,8 +891,7 @@ dri2_setup_screen(_EGLDisplay *disp) __DRI2_RENDERER_HAS_FRAMEBUFFER_SRGB)) disp->Extensions.KHR_gl_colorspace = EGL_TRUE; - if (dri2_dpy->robustness) - disp->Extensions.EXT_create_context_robustness = EGL_TRUE; + disp->Extensions.EXT_create_context_robustness = get_screen_param(disp, PIPE_CAP_DEVICE_RESET_STATUS_QUERY); if (dri2_dpy->fence) { disp->Extensions.KHR_fence_sync = EGL_TRUE; diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index e4c1587..6d206d3 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -236,7 +236,6 @@ struct dri2_egl_display const __DRI2flushControlExtension *flush_control; const __DRItexBufferExtension *tex_buffer; const __DRIimageExtension *image; - const __DRIrobustnessExtension *robustness; const __DRI2configQueryExtension *config; const __DRI2fenceExtension *fence; const __DRI2bufferDamageExtension *buffer_damage;