diff options
author | Chia-I Wu <[email protected]> | 2014-08-21 12:51:08 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-08-26 14:11:02 +0800 |
commit | e3c251071b0c9396c3ec76d1cf943c60ae297281 (patch) | |
tree | 559dd3ad1f8355a50ca53b701e107948cd409c8b /src/gallium/drivers/ilo/genhw | |
parent | 6c73478223a0ed76e54f14c46831974c3efaacdf (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.h | 24 |
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) |