diff options
author | Kenneth Graunke <[email protected]> | 2011-10-07 12:32:52 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-10-11 10:26:52 -0700 |
commit | 3f5e938a9ded42ae8dc9ae2486e8d5c8b64cfe07 (patch) | |
tree | 5d29867af2f8a8c10ac83aacac6cc523b1013d87 /src/mesa/drivers/dri/i965/brw_defines.h | |
parent | da2e41cd88dd68b658534390ed69dd422172d07b (diff) |
i965: Replace incorrect use of GLboolean with enum brw_compression.
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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_defines.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_defines.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index a11163093a3..21a115b799b 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -486,9 +486,11 @@ #define BRW_CHANNEL_Z 2 #define BRW_CHANNEL_W 3 -#define BRW_COMPRESSION_NONE 0 -#define BRW_COMPRESSION_2NDHALF 1 -#define BRW_COMPRESSION_COMPRESSED 2 +enum brw_compression { + BRW_COMPRESSION_NONE = 0, + BRW_COMPRESSION_2NDHALF = 1, + BRW_COMPRESSION_COMPRESSED = 2, +}; #define GEN6_COMPRESSION_1Q 0 #define GEN6_COMPRESSION_2Q 1 |