summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2011-08-18 19:11:08 +0200
committerMichel Dänzer <michel@daenzer.net>2011-08-18 19:11:08 +0200
commit64f237a4cf3ef5bcb3163e88e1447ff275a1eefa (patch)
tree1f7a5ecaa5c52ba8126530889c458ce6d66b7a97
parent95991fcce45f0dd904f76b9f98f9c7ed5708e4fa (diff)
Convert register ranges for >= r6xx from enums to defines.
Avoids lots of "comparison between 'enum <anonymous>' and 'enum <anonymous>'" warnings with newer versions of gcc. See https://bugs.freedesktop.org/show_bug.cgi?id=38238 . Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r--src/cayman_reg.h31
-rw-r--r--src/evergreen_reg.h31
-rw-r--r--src/r600_reg.h35
3 files changed, 47 insertions, 50 deletions
diff --git a/src/cayman_reg.h b/src/cayman_reg.h
index 25bd4b10..e994d607 100644
--- a/src/cayman_reg.h
+++ b/src/cayman_reg.h
@@ -42,22 +42,21 @@ enum {
/* SET_*_REG offsets + ends */
-enum {
- SET_CONFIG_REG_offset = 0x00008000,
- SET_CONFIG_REG_end = 0x0000ac00,
- SET_CONTEXT_REG_offset = 0x00028000,
- SET_CONTEXT_REG_end = 0x00029000,
- SET_RESOURCE_offset = 0x00030000,
- SET_RESOURCE_end = 0x00038000,
- SET_SAMPLER_offset = 0x0003c000,
- SET_SAMPLER_end = 0x0003c600,
- SET_CTL_CONST_offset = 0x0003cff0,
- SET_CTL_CONST_end = 0x0003ff0c,
- SET_LOOP_CONST_offset = 0x0003a200,
- SET_LOOP_CONST_end = 0x0003a500,
- SET_BOOL_CONST_offset = 0x0003a500,
- SET_BOOL_CONST_end = 0x0003a518,
-};
+#define SET_CONFIG_REG_offset 0x00008000
+#define SET_CONFIG_REG_end 0x0000ac00
+#define SET_CONTEXT_REG_offset 0x00028000
+#define SET_CONTEXT_REG_end 0x00029000
+#define SET_RESOURCE_offset 0x00030000
+#define SET_RESOURCE_end 0x00038000
+#define SET_SAMPLER_offset 0x0003c000
+#define SET_SAMPLER_end 0x0003c600
+#define SET_CTL_CONST_offset 0x0003cff0
+#define SET_CTL_CONST_end 0x0003ff0c
+#define SET_LOOP_CONST_offset 0x0003a200
+#define SET_LOOP_CONST_end 0x0003a500
+#define SET_BOOL_CONST_offset 0x0003a500
+#define SET_BOOL_CONST_end 0x0003a518
+
/* Packet3 commands */
enum {
diff --git a/src/evergreen_reg.h b/src/evergreen_reg.h
index 96a243fe..23d6c74c 100644
--- a/src/evergreen_reg.h
+++ b/src/evergreen_reg.h
@@ -42,22 +42,21 @@ enum {
/* SET_*_REG offsets + ends */
-enum {
- SET_CONFIG_REG_offset = 0x00008000,
- SET_CONFIG_REG_end = 0x0000ac00,
- SET_CONTEXT_REG_offset = 0x00028000,
- SET_CONTEXT_REG_end = 0x00029000,
- SET_RESOURCE_offset = 0x00030000,
- SET_RESOURCE_end = 0x00038000,
- SET_SAMPLER_offset = 0x0003c000,
- SET_SAMPLER_end = 0x0003c600,
- SET_CTL_CONST_offset = 0x0003cff0,
- SET_CTL_CONST_end = 0x0003ff0c,
- SET_LOOP_CONST_offset = 0x0003a200,
- SET_LOOP_CONST_end = 0x0003a500,
- SET_BOOL_CONST_offset = 0x0003a500,
- SET_BOOL_CONST_end = 0x0003a518,
-};
+#define SET_CONFIG_REG_offset 0x00008000
+#define SET_CONFIG_REG_end 0x0000ac00
+#define SET_CONTEXT_REG_offset 0x00028000
+#define SET_CONTEXT_REG_end 0x00029000
+#define SET_RESOURCE_offset 0x00030000
+#define SET_RESOURCE_end 0x00038000
+#define SET_SAMPLER_offset 0x0003c000
+#define SET_SAMPLER_end 0x0003c600
+#define SET_CTL_CONST_offset 0x0003cff0
+#define SET_CTL_CONST_end 0x0003ff0c
+#define SET_LOOP_CONST_offset 0x0003a200
+#define SET_LOOP_CONST_end 0x0003a500
+#define SET_BOOL_CONST_offset 0x0003a500
+#define SET_BOOL_CONST_end 0x0003a518
+
/* Packet3 commands */
enum {
diff --git a/src/r600_reg.h b/src/r600_reg.h
index 95c924f5..8f17e148 100644
--- a/src/r600_reg.h
+++ b/src/r600_reg.h
@@ -35,24 +35,23 @@
/* SET_*_REG offsets + ends */
-enum {
- SET_CONFIG_REG_offset = 0x00008000,
- SET_CONFIG_REG_end = 0x0000ac00,
- SET_CONTEXT_REG_offset = 0x00028000,
- SET_CONTEXT_REG_end = 0x00029000,
- SET_ALU_CONST_offset = 0x00030000,
- SET_ALU_CONST_end = 0x00032000,
- SET_RESOURCE_offset = 0x00038000,
- SET_RESOURCE_end = 0x0003c000,
- SET_SAMPLER_offset = 0x0003c000,
- SET_SAMPLER_end = 0x0003cff0,
- SET_CTL_CONST_offset = 0x0003cff0,
- SET_CTL_CONST_end = 0x0003e200,
- SET_LOOP_CONST_offset = 0x0003e200,
- SET_LOOP_CONST_end = 0x0003e380,
- SET_BOOL_CONST_offset = 0x0003e380,
- SET_BOOL_CONST_end = 0x0003e38c,
-};
+#define SET_CONFIG_REG_offset 0x00008000
+#define SET_CONFIG_REG_end 0x0000ac00
+#define SET_CONTEXT_REG_offset 0x00028000
+#define SET_CONTEXT_REG_end 0x00029000
+#define SET_ALU_CONST_offset 0x00030000
+#define SET_ALU_CONST_end 0x00032000
+#define SET_RESOURCE_offset 0x00038000
+#define SET_RESOURCE_end 0x0003c000
+#define SET_SAMPLER_offset 0x0003c000
+#define SET_SAMPLER_end 0x0003cff0
+#define SET_CTL_CONST_offset 0x0003cff0
+#define SET_CTL_CONST_end 0x0003e200
+#define SET_LOOP_CONST_offset 0x0003e200
+#define SET_LOOP_CONST_end 0x0003e380
+#define SET_BOOL_CONST_offset 0x0003e380
+#define SET_BOOL_CONST_end 0x0003e38c
+
/* packet3 IT_SURFACE_BASE_UPDATE bits */
enum {