[Piglit] glsl-const-builtin-*: Fix GLSL compilation errors on Mac OS X.

Ian Romanick idr at freedesktop.org
Thu Jul 15 12:57:26 PDT 2010


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

Vinson Lee wrote:
>> -----Original Message-----
>> From: Ian Romanick [mailto:idr at freedesktop.org]
>>
>> I believe that commit 14277414 is not correct.  As far as I can tell, in
>> GLSL 1.20 the call 'acos(1)' should automatically convert the int(1) to
>> float(1.0).  Page 20 (26 of the PDF) of the GLSL 1.20 spec lists an
>> implicit conversion for int->float.  Page 43 (49 of the PDF) says:
>>
>>     "Otherwise, if no exact match is found, then the implicit
>>     conversions in Section 4.1.10 "Implicit Conversions" will
>>     be applied to the calling arguments if this can make their
>>     types match a signature."
>>
>> If Apple's compiler doesn't compile this code, then it's a bug in their
>> compiler.
>>
>> On a side note, those aren't very good execution tests anyway.  All of
>> them will produce "correct" results even if the value generate for the
>> 'one' variable is 6.02e23 due to clamping of color outputs to [0,1].
> 
>>From the specification it appears that the Apple compiler does not handle implicit conversions correctly.
> 
> Perhaps we should add some implicit conversions tests in the piglit
> glsl2 section. The glsl-const-builtin tests appear to target testing
> builtin functions and not intended to test implicit conversions. I
> think that there is some value in getting tests running on as many
> platforms as possible for comparison.

That's a fair point.  Let's leave your changes and add something to
tests/glslparsertests/glsl2/ to exercise implicit conversions.

> Since the original tests are correct please feel free to revert the
> commit too.


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

iEYEARECAAYFAkw/aCUACgkQX1gOwKyEAw+ZrwCggua3c4WXOhg7Ek7zYXyMvxqX
V3gAoJiRA6o8xiEgw8lVgOUNkEskLvel
=zwvm
-----END PGP SIGNATURE-----


More information about the Piglit mailing list