[Mesa-dev] [PATCH] i965: Replace incorrect use of GLboolean with enum brw_compression.

Chad Versace chad at chad-versace.us
Mon Oct 10 10:22:22 PDT 2011


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

On 10/07/2011 08:28 PM, Kenneth Graunke wrote:
> brw_set_compression_control took a GLboolean as an argument, then
> promptly used a switch statement to compare it with various enumeration
> values.  Clearly it's not actually a boolean.
> 
> Introduce a new enumeration type, enum brw_compression, and use that.
> 
> Found by converting GLboolean to bool; clang then gave warnings about
> switching on a boolean and ultimately duplicated case errors.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/brw_defines.h |    8 +++++---
>  src/mesa/drivers/dri/i965/brw_eu.c      |    4 +++-
>  src/mesa/drivers/dri/i965/brw_eu.h      |    2 +-
>  3 files changed, 9 insertions(+), 5 deletions(-)

Reviewed-by: Chad Versace <chad at chad-versace.us>

- -- 
Chad Versace
chad at chad-versace.us
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOkynLAAoJEAIvNt057x8ivg0P/2iEPIREnHsRu8ESPFYEkW6N
Ws13EbfJYmPqGaIoOKycF0bnGqnxRlXz8Wsmnz38q49CFoYpdlSnCW6NUTbrgUmS
Ink+hPe+qfk5aXXPmyOow+mfzPUOiXy9iTIb2eagH/0H2CUeRy8qVwjflxfuziPt
fJpb4/Ku8W1ZG87tJEmyaswgV3xwXeoo+QdQ9El1Pk9izQM/M8YTM5tXdTG9AFBr
BIryxGs67eYaKfN++j/zHx0hKXls17dDb5NKdIFTFNlthq8Me7L0bSLAzjG14wKT
VhccyY6IMoEgSssV74bH7xLgYir5NIsxwiKea0d2H8ZUWj+9NyBCzyyqYRhDM+UA
y3g3yt+/tjVS/nWY3lb6nmwlRELQbDUf7nFSPPjIjEE32/dKnc2LkOUQ8LYMdWH/
cAhBAQP3EYUGFFwFt3BhgtYO1yzndrvyrcGWjKd7OS1ZNEB3ekTTd8Y9sSXSqUBF
1z9aTyQ6WFBT0iI4jm1pFZD35VW/U2vXXVLtClXp9VzDkcZ2P91e7GSPCkJ2NREt
VyMgNlLJTtfCTiLW0Z25EUzIxAaHt1C0CSG51C76/8ZlastZc6Z7YebhqTibu9lx
7ocX5AYEV81stbkE5/vF0rq7tmyyFYKoVJ7y0qtvjkBCL+7X8VXFph+MPvxP9TUc
DTInTP/4iHvu0jjGkWTX
=3KOh
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list