diff options
author | Kenneth Graunke <[email protected]> | 2018-12-04 22:04:16 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:10 -0800 |
commit | 754d678b0ab894c4427d5181c17f02e11e2dc715 (patch) | |
tree | 375f23300ca7f9ce9a8f76d7b1a1c92cf35abbbf /src | |
parent | 5094062bbeeb78aa9ea38c8986adff465b12db52 (diff) |
iris: Add _MI_ALU helpers that don't paste
This lets you pass arguments as function parameters
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_query.c | 13 |
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; |