mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
iris: Add _MI_ALU helpers that don't paste
This lets you pass arguments as function parameters
This commit is contained in:
parent
5094062bbe
commit
754d678b0a
1 changed files with 9 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue