From b454eade00e06ba6c45a822682ee2c68afafc3ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Thu, 20 Oct 2016 10:33:33 +0300 Subject: [PATCH] egl/dri2: set max values for pbuffer width and height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While these max values were previously fixed for pbuffer creation, this change makes also eglGetConfigAttrib() return correct values. Fixes following dEQP tests: dEQP-EGL.functional.create_surface.pbuffer.rgb888_no_depth_no_stencil dEQP-EGL.functional.create_surface.pbuffer.rgb888_depth_stencil dEQP-EGL.functional.create_surface.pbuffer.rgba8888_no_depth_no_stencil dEQP-EGL.functional.create_surface.pbuffer.rgba8888_depth_stencil Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98326 --- src/egl/drivers/dri2/egl_dri2.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 4ed8c12..a14fc5e 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -241,6 +241,15 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, return NULL; break; + case __DRI_ATTRIB_MAX_PBUFFER_WIDTH: + value = _EGL_MAX_PBUFFER_WIDTH; + _eglSetConfigKey(&base, EGL_MAX_PBUFFER_WIDTH, value); + break; + case __DRI_ATTRIB_MAX_PBUFFER_HEIGHT: + value = _EGL_MAX_PBUFFER_HEIGHT; + _eglSetConfigKey(&base, EGL_MAX_PBUFFER_HEIGHT, value); + break; + default: key = dri2_to_egl_attribute_map[attrib]; if (key != 0) -- 2.7.4