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

Ian Romanick idr at freedesktop.org
Thu Jul 15 11:54:08 PDT 2010


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

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].
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw/WU0ACgkQX1gOwKyEAw+ukwCfYyRXuIEO5Hx6FBeQYy7RVLyb
jicAn1K+Red0oa0q4bshepqdAKTkZ0rJ
=9Bh7
-----END PGP SIGNATURE-----


More information about the Piglit mailing list