From e6285ea55fb2abf3b38f40ea0c3a69c2b6d7d8e5 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Wed, 30 Nov 2022 15:23:56 -0800 Subject: [PATCH] egl: Replace the robustness DRI2 ext check with a pipe cap query. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: --- src/egl/drivers/dri2/egl_dri2.c | 4 +--- src/egl/drivers/dri2/egl_dri2.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) 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; -- 2.7.4