[Piglit] [PATCH 06/29] util: Check that glx is supported in the selected platform

Chad Versace chad.versace at linux.intel.com
Wed May 23 13:38:28 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/23/2012 07:39 AM, Pauli Nieminen wrote:
> On Tue, May 22, 2012 at 03:20:51PM -0700, Chad Versace wrote:
>> On 05/21/2012 11:08 AM, Pauli Nieminen wrote:
>>> Check in runtime if current platform is glx before trying to check glX
>>> versions or extensions.
>>>
>>> Signed-off-by: Pauli Nieminen <pauli.nieminen at linux.intel.com>
>>> ---
>>>  tests/util/piglit-glx-util.c |   22 ++++++++++++++++++++++
>>>  1 files changed, 22 insertions(+), 0 deletions(-)
>>
>> Is the idea for this patch to protect against accidental misuse
>> of these functions when running tests under X11/EGL? That's the
>> use scenario I can think of. If that is the use case for this
>> patch, do any future patches rely on this behavior?
> 
> It is more like for consistency with EGL counterparts that require
> checking for dispatch to make sure that we don't try to call
> eglQueryString without egl present. But those changes would anyway
> need to some more work
> 
>>
>> I thought that these functions were only used by tests located in the
>> tests/glx directory, though I could be mistaken. If the Waffle
>> platform is not GLX, then the Piglit framework should ensure
>> that tests in the glx directory are never ran. I don't believe
>> that it should be test's responsiblity to skip in this case;
>> the process should have never been started in the first place.
>>
> 
> What about tests that are writen for both glx and egl? There is a lot
> of overlapping functionality that could be tested with same tests
> having different code paths for GLX and EGL while sharing GL code.

I agree that it might make sense to generalize some glx tests to run
under glx and egl. But I don't understand how this patch helps that
situation.

If a test is written for both glx and egl, then it should
call the piglit_glx functions only if it is running under glx, and
this decision should be handled by some dispatch mechanism.
Any other behavior I consider to be broken design.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPvUrCAAoJEAIvNt057x8iB5YP/i16uOniG6irUQk1zACbsmIV
UfyX/qdM4q6scLEbzgHkEizN65WlIb5zYv3YfnkcJriSW49KpDu8+rtcQsIkyyRU
FQfCEcVUQiR0glJuoRVIR03Idz8+S+Am5vEaUOWUv55GrIN+b1TEaX6mY3FLndbB
6+6iwWTbEY5CCSvwKYaJwrgfHDNgYEul3HeqtZBxKBq1hqo+GGJRe82x2AZ6xqAQ
p+qhQYDuHQOLYDNlYKu5F7spIwUVxbSlWMiZHgwMis8Y7Ks7Qdv23Rpm1XjyrGy0
Q+MFEnzOfYvIVcYUzAlB1zRdDn4+FYrnyVzOwKRaeUQCBROQrawz4gBwZFshFSHg
yJ1v6iq1RC1wUdk8OsZP87jKLwTENu2/VOD38IwJaW6rpO37w6VfvcmYro8scRUa
+Cj9GyEdP0I06a96QOJRaiD9abRDKvPccs3xLRGZvBnS6BPzVzvmVOS3FhPozbam
D6RmoDSZgRELfCkq7ji5sKaLx6XUqdzdidjchJHuauTjk4JeLTKd66POVzPgh5nU
917hqgmPiZcaHroANTukpfaOc1qafBSB9hm6WmYmFZ4+fNLTvLiC9GIUv8eLodZO
m5S68VeQvTA+ZefB2+Cv2TYIUFw9CKj8CvCxQ2emsjwUC4eNoF07qnjBRJKDV5oL
i1d1mI0azr/HOsFT9B3C
=C8Vs
-----END PGP SIGNATURE-----


More information about the Piglit mailing list