OSDN Git Service

i965: Replace incorrect use of GLboolean with enum brw_compression.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 7 Oct 2011 19:32:52 +0000 (12:32 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 11 Oct 2011 17:26:52 +0000 (10:26 -0700)
commit3f5e938a9ded42ae8dc9ae2486e8d5c8b64cfe07
tree5d29867af2f8a8c10ac83aacac6cc523b1013d87
parentda2e41cd88dd68b658534390ed69dd422172d07b
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 <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad@chad-versace.us>
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_eu.c
src/mesa/drivers/dri/i965/brw_eu.h