summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_query.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c
index a50d919d366..e07aea5dc47 100644
--- a/src/gallium/drivers/iris/iris_query.c
+++ b/src/gallium/drivers/iris/iris_query.c
@@ -83,10 +83,15 @@
#define MI_ALU_ZF 0x32
#define MI_ALU_CF 0x33
-#define MI_ALU0(op) ((MI_ALU_##op << 20))
-#define MI_ALU1(op, x) ((MI_ALU_##op << 20) | (MI_ALU_##x << 10))
-#define MI_ALU2(op, x, y) \
- ((MI_ALU_##op << 20) | (MI_ALU_##x << 10) | (MI_ALU_##y))
+#define _MI_ALU(op, x, y) (((op) << 20) | ((x) << 10) | (y))
+
+#define _MI_ALU0(op) _MI_ALU(MI_ALU_##op, 0, 0)
+#define _MI_ALU1(op, x) _MI_ALU(MI_ALU_##op, x, 0)
+#define _MI_ALU2(op, x, y) _MI_ALU(MI_ALU_##op, x, y)
+
+#define MI_ALU0(op) _MI_ALU0(op)
+#define MI_ALU1(op, x) _MI_ALU1(op, MI_ALU_##x)
+#define MI_ALU2(op, x, y) _MI_ALU2(op, MI_ALU_##x, MI_ALU_##y)
struct iris_query {
enum pipe_query_type type;