summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2010-03-25 14:31:12 +0100
committerMatthias Hopf <mhopf@suse.de>2010-03-25 14:31:12 +0100
commit54ca9630e35278e9626e32d9b45140931fd4333b (patch)
treecba885ce3114d853e59f8409866535ecc2b564f5
parentca01b10b6df02e8e805cf2806c58356cbfc7fdd4 (diff)
Silence gcc 4.5.0 (enum comparisons).
-rw-r--r--src/r600_state.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/r600_state.h b/src/r600_state.h
index 4339665..1aced9c 100644
--- a/src/r600_state.h
+++ b/src/r600_state.h
@@ -204,28 +204,36 @@ do { \
/* If register falls in a special area, special commands are issued */
#define PACK0(ib, reg, num) \
do { \
- if ((reg) >= SET_CONFIG_REG_offset && (reg) < SET_CONFIG_REG_end) { \
+ if ((int)(reg) >= (int)SET_CONFIG_REG_offset && \
+ (int)(reg) < (int)SET_CONFIG_REG_end) { \
PACK3((ib), IT_SET_CONFIG_REG, (num) + 1); \
E32(ib, ((reg) - SET_CONFIG_REG_offset) >> 2); \
- } else if ((reg) >= SET_CONTEXT_REG_offset && (reg) < SET_CONTEXT_REG_end) { \
+ } else if ((int)(reg) >= (int)SET_CONTEXT_REG_offset && \
+ (int)(reg) < (int)SET_CONTEXT_REG_end) { \
PACK3((ib), IT_SET_CONTEXT_REG, (num) + 1); \
E32(ib, ((reg) - 0x28000) >> 2); \
- } else if ((reg) >= SET_ALU_CONST_offset && (reg) < SET_ALU_CONST_end) { \
+ } else if ((int)(reg) >= (int)SET_ALU_CONST_offset && \
+ (int)(reg) < (int)SET_ALU_CONST_end) { \
PACK3((ib), IT_SET_ALU_CONST, (num) + 1); \
E32(ib, ((reg) - SET_ALU_CONST_offset) >> 2); \
- } else if ((reg) >= SET_RESOURCE_offset && (reg) < SET_RESOURCE_end) { \
+ } else if ((int)(reg) >= (int)SET_RESOURCE_offset && \
+ (int)(reg) < (int)SET_RESOURCE_end) { \
PACK3((ib), IT_SET_RESOURCE, num + 1); \
E32((ib), ((reg) - SET_RESOURCE_offset) >> 2); \
- } else if ((reg) >= SET_SAMPLER_offset && (reg) < SET_SAMPLER_end) { \
+ } else if ((int)(reg) >= (int)SET_SAMPLER_offset && \
+ (int)(reg) < (int)SET_SAMPLER_end) { \
PACK3((ib), IT_SET_SAMPLER, (num) + 1); \
E32((ib), (reg - SET_SAMPLER_offset) >> 2); \
- } else if ((reg) >= SET_CTL_CONST_offset && (reg) < SET_CTL_CONST_end) { \
+ } else if ((int)(reg) >= (int)SET_CTL_CONST_offset && \
+ (int)(reg) < (int)SET_CTL_CONST_end) { \
PACK3((ib), IT_SET_CTL_CONST, (num) + 1); \
- E32((ib), ((reg) - SET_CTL_CONST_offset) >> 2); \
- } else if ((reg) >= SET_LOOP_CONST_offset && (reg) < SET_LOOP_CONST_end) { \
+ E32((ib), ((reg) - SET_CTL_CONST_offset) >> 2); \
+ } else if ((int)(reg) >= (int)SET_LOOP_CONST_offset && \
+ (int)(reg) < (int)SET_LOOP_CONST_end) { \
PACK3((ib), IT_SET_LOOP_CONST, (num) + 1); \
E32((ib), ((reg) - SET_LOOP_CONST_offset) >> 2); \
- } else if ((reg) >= SET_BOOL_CONST_offset && (reg) < SET_BOOL_CONST_end) { \
+ } else if ((int)(reg) >= (int)SET_BOOL_CONST_offset && \
+ (int)(reg) < (int)SET_BOOL_CONST_end) { \
PACK3((ib), IT_SET_BOOL_CONST, (num) + 1); \
E32((ib), ((reg) - SET_BOOL_CONST_offset) >> 2); \
} else { \