[Mesa-dev] [PATCH 1/2] egl/dri2: set max values for pbuffer width and height
Tapani Pälli
tapani.palli at intel.com
Thu Oct 20 11:16:17 UTC 2016
On 10/20/2016 02:10 PM, Eric Engestrom wrote:
> On Thursday, 2016-10-20 12:02:15 +0300, Tapani Pälli wrote:
>> 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 <tapani.palli at intel.com>
>> 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..d9e2ad7 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:
>> + _eglSetConfigKey(&base, EGL_MAX_PBUFFER_WIDTH,
>> + _EGL_MAX_PBUFFER_WIDTH);
>> + break;
>
> Nit: newline between the two cases
>
>> + case __DRI_ATTRIB_MAX_PBUFFER_HEIGHT:
>> + _eglSetConfigKey(&base, EGL_MAX_PBUFFER_HEIGHT,
>> + _EGL_MAX_PBUFFER_HEIGHT);
>
> Shouldn't these set them to `value` instead of the defines?
then I would need to fallthrough to default to set the value ... and it
seems somewhat more messy to fall through from both than just calling
set here
> EGL_MAX_PBUFFER_PIXELS is also missing here and should be added too,
> even if it didn't break any dEQP test :)
hmm true .. maybe a separate followup commit for this? I'd like to
isolate the patch that fixes particular tests. I'm planning anyway to
send more fixes for the EGL area.
> With that fixed:
> Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
>
>> + break;
>> +
>> default:
>> key = dri2_to_egl_attribute_map[attrib];
>> if (key != 0)
>> --
>> 2.7.4
More information about the mesa-dev
mailing list