Bug 29052

Summary: [egl] eglGetConfigs should return num of available configs when parameter configs = NULL
Product: Mesa Reporter: Shuang He <shuang.he>
Component: Mesa coreAssignee: mesa-dev
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium CC: eric, idr, krh
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: piglit case
Seems this patch works for me

Description Shuang He 2010-07-13 18:58:39 UTC
Created attachment 37007 [details]
piglit case

System Environment:
--------------------------
Libdrm:		(master)2.4.21-13-gb803918f3f77c62edf22e78cb2095be399753423
Mesa:		(master)mesa_7_6_1_rc1-9251-gc4066b78c0aad41c199eb27157538c2ec9ab5bfd
Xserver:		(master)xorg-server-1.8.99.904-26-g3209b094a3b1466b579e8020e12a4f3fa78a5f3f
Xf86_video_intel:		(master)2.12.0-28-g2267e5928bd90a6997970584462bd97df447e819
Kernel:       (for-linus)6f772d7e2f4105470b9f3d0f0b26f06f61b1278d

Bug detailed description:
-------------------------
The attached piglit test case could be used to reproduce this issue.

According to egl 1.4 spec, "if eglGetConfigs is called with configs = NULL, then no configurations are returned, but the total number of configurations available will be returned in num_config"
Comment 1 Shuang He 2010-07-13 18:59:58 UTC
Created attachment 37008 [details] [review]
Seems this patch works for me
Comment 2 Shuang He 2010-07-14 17:59:11 UTC
We met this issue when trying to run OpenGL ES conformance test suite
Comment 3 Chia-I Wu 2010-07-14 19:09:57 UTC
This is a bug introduced by me when switching to use a dynamic array to manage EGLConfigs and EGLScreens.  I've committed an alternative fix (d7284b) to fix both eglGetConfigs and eglGetScreens.
Comment 4 Shuang He 2010-07-19 19:14:00 UTC
(In reply to comment #3)
> This is a bug introduced by me when switching to use a dynamic array to manage
> EGLConfigs and EGLScreens.  I've committed an alternative fix (d7284b) to fix
> both eglGetConfigs and eglGetScreens.

yes, this issue has been fixed
Comment 5 Shuang He 2010-07-19 19:16:41 UTC
Thanks, verified against:
Libdrm:		(master)2.4.21-13-gb803918f3f77c62edf22e78cb2095be399753423
Mesa:		(master)mesa_7_6_1_rc1-9338-g4eaf591d1504f61e131f77f01711d27a75d02e90
Xserver:		(master)xorg-server-1.8.99.905
Xf86_video_intel:		(master)2.12.0-30-gd48d584a822ae5adae64f6d5f09faa4ac9b8de73
Kernel:       (for-linus)6f772d7e2f4105470b9f3d0f0b26f06f61b1278d

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.