summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/genhw
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-08-21 12:51:08 +0800
committerChia-I Wu <[email protected]>2014-08-26 14:11:02 +0800
commite3c251071b0c9396c3ec76d1cf943c60ae297281 (patch)
tree559dd3ad1f8355a50ca53b701e107948cd409c8b /src/gallium/drivers/ilo/genhw
parent6c73478223a0ed76e54f14c46831974c3efaacdf (diff)
ilo: use genhw command opcodes
Replace ILO_GPE_MI and ILO_GPE_CMD with magic values by descriptive genhw macros.
Diffstat (limited to 'src/gallium/drivers/ilo/genhw')
-rw-r--r--src/gallium/drivers/ilo/genhw/genhw.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/gallium/drivers/ilo/genhw/genhw.h b/src/gallium/drivers/ilo/genhw/genhw.h
index 59160bed847..d341ede8d15 100644
--- a/src/gallium/drivers/ilo/genhw/genhw.h
+++ b/src/gallium/drivers/ilo/genhw/genhw.h
@@ -37,15 +37,21 @@
#include "gen_eu_isa.xml.h"
#include "gen_eu_message.xml.h"
-#define GEN_MI_CMD(op) (GEN6_MI_TYPE_MI | GEN6_MI_OPCODE_ ## op)
-
-#define GEN_BLITTER_CMD(op) \
- (GEN6_BLITTER_TYPE_BLITTER | GEN6_BLITTER_OPCODE_ ## op)
-
-#define GEN_RENDER_CMD(subtype, op) \
- (GEN6_RENDER_TYPE_RENDER | \
- GEN6_RENDER_SUBTYPE_ ## subtype | \
- GEN6_RENDER_OPCODE_ ## op)
+#define GEN_MI_CMD(gen, op) (GEN6_MI_TYPE_MI | gen ## _MI_OPCODE_ ## op)
+#define GEN6_MI_CMD(op) GEN_MI_CMD(GEN6, op)
+#define GEN7_MI_CMD(op) GEN_MI_CMD(GEN7, op)
+
+#define GEN_BLITTER_CMD(gen, op) \
+ (GEN6_BLITTER_TYPE_BLITTER | gen ## _BLITTER_OPCODE_ ## op)
+#define GEN6_BLITTER_CMD(op) GEN_BLITTER_CMD(GEN6, op)
+
+#define GEN_RENDER_CMD(subtype, gen, op) \
+ (GEN6_RENDER_TYPE_RENDER | \
+ GEN6_RENDER_SUBTYPE_ ## subtype | \
+ gen ## _RENDER_OPCODE_ ## op)
+#define GEN6_RENDER_CMD(subtype, op) GEN_RENDER_CMD(subtype, GEN6, op)
+#define GEN7_RENDER_CMD(subtype, op) GEN_RENDER_CMD(subtype, GEN7, op)
+#define GEN75_RENDER_CMD(subtype, op) GEN_RENDER_CMD(subtype, GEN75, op)
static inline bool
gen_is_snb(int devid)