Mesa (staging/19.1): egl: Make the 565 pbuffer-only config single buffered.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 23 11:52:26 UTC 2019
Module: Mesa
Branch: staging/19.1
Commit: f8c0b90f993ff5277ed90bb59da31648fcd5dd4e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8c0b90f993ff5277ed90bb59da31648fcd5dd4e
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Mar 22 18:00:55 2019 -0700
egl: Make the 565 pbuffer-only config single buffered.
In commit dacb11a585face5ca179c34cfc588a71a425c1e0, Eric found the first
matching 565 pbuffer config, and stopped. Our double-buffered configs
come first in the list, so we added that, making a pbuffer-only config
that claimed to be double buffered. This doesn't make sense, since
pixmaps/pbuffers are fundamentally not double buffered.
When using that config, every call to eglCreatePbufferSurface would fail
with EGL_BAD_MATCH. The call chain looks like this:
- eglCreatePbufferSurface
- dri3_create_pbuffer_surface
- dri3_create_surface
- dri2_get_dri_config
which eventually does:
const bool double_buffer = surface_type == EGL_WINDOW_BIT;
and then fails to find a matching config, because it ends up looking
for a single-buffered config - and there aren't any.
To fix this, make the 565 pbuffer config single-buffered. This fixes
at least 51 dEQP-EGL.* tests.
Fixes: dacb11a585f ("egl: Add a 565 pbuffer-only EGL config under X11.")
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
(cherry picked from commit 6ad31c4ff33d92f6359b196a94ace99682272111)
---
src/egl/drivers/dri2/platform_x11.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 081c9c8f219..c30b8ea085d 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -861,13 +861,17 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
0,
};
- /* Check that we've found single-sample, no depth, no stencil. */
+ /* Check that we've found single-sample, no depth, no stencil,
+ * and single-buffered.
+ */
if (!dri2_x11_config_match_attrib(dri2_dpy, config,
__DRI_ATTRIB_DEPTH_SIZE, 0) ||
!dri2_x11_config_match_attrib(dri2_dpy, config,
__DRI_ATTRIB_STENCIL_SIZE, 0) ||
!dri2_x11_config_match_attrib(dri2_dpy, config,
- __DRI_ATTRIB_SAMPLES, 0)) {
+ __DRI_ATTRIB_SAMPLES, 0) ||
+ !dri2_x11_config_match_attrib(dri2_dpy, config,
+ __DRI_ATTRIB_DOUBLE_BUFFER, 0)) {
continue;
}
More information about the mesa-commit
mailing list