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_eu.c | |
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_eu.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c index 0e04af99ff9..b5a858b78a4 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.c +++ b/src/mesa/drivers/dri/i965/brw_eu.c @@ -99,7 +99,9 @@ void brw_set_access_mode( struct brw_compile *p, GLuint access_mode ) p->current->header.access_mode = access_mode; } -void brw_set_compression_control( struct brw_compile *p, GLboolean compression_control ) +void +brw_set_compression_control(struct brw_compile *p, + enum brw_compression compression_control) { p->compressed = (compression_control == BRW_COMPRESSION_COMPRESSED); |