On 05/03/2018 08:49 PM, Emil Velikov wrote:
On 2 May 2018 at 17:23, Juan A. Suarez Romero <[email protected]> wrote:
According to EGL 1.4 spec, section 3.5.1 ("Creating On-Screen Rendering
Surfaces"), if config does not support the colorspace or alpha format
attributes specified in attrib_list (as defined for
eglCreateWindowSurface), an EGL_BAD_MATCH error is generated.
This fixes dEQP-EGL.functional.wide_color.*_888_colorspace_srgb (still
not merged,
https://android-review.googlesource.com/c/platform/external/deqp/+/667322),
which is crashing when trying to create a windows surface with RGB888
configuration and sRGB colorspace.
v2: Handle the fix in other backends (Tapani)
---
src/egl/drivers/dri2/platform_drm.c | 5 +++++
src/egl/drivers/dri2/platform_wayland.c | 6 ++++++
src/egl/drivers/dri2/platform_x11.c | 5 +++++
src/egl/drivers/dri2/platform_x11_dri3.c | 5 +++++
4 files changed, 21 insertions(+)
diff --git a/src/egl/drivers/dri2/platform_drm.c
b/src/egl/drivers/dri2/platform_drm.c
index dc4efea9103..35bc4b5b1ac 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -155,6 +155,11 @@ dri2_drm_create_window_surface(_EGLDriver *drv,
_EGLDisplay *disp,
config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
dri2_surf->base.GLColorspace);
+ if (!config) {
+ _eglError(EGL_BAD_MATCH, "Unsupported surfacetype/colorspace
configuration");
Seems like android and surfaceless are missing the EGL_BAD_MATCH bit.
AFAICT they need it right?
That is true, I've sent a patch to add the error case.
BTW there seems something wrong in dEQP surfaceless support (?) Are you
guys able to run it? For me it says EGL is not supported.
// Tapani
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev