summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/opcodes.inc
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-03-08 18:31:53 -0300
committerGravatar ameerj2021-07-22 21:51:23 -0400
commitab463712474de5f99eec137a9c6233e55fe184f0 (patch)
tree30d79ac64dd03d5cfafd07c0c42c2baadc82de98 /src/shader_recompiler/frontend/ir/opcodes.inc
parentshader: Implement R2P (diff)
downloadyuzu-ab463712474de5f99eec137a9c6233e55fe184f0.tar.gz
yuzu-ab463712474de5f99eec137a9c6233e55fe184f0.tar.xz
yuzu-ab463712474de5f99eec137a9c6233e55fe184f0.zip
shader: Initial support for textures and TEX
Diffstat (limited to 'src/shader_recompiler/frontend/ir/opcodes.inc')
-rw-r--r--src/shader_recompiler/frontend/ir/opcodes.inc569
1 files changed, 299 insertions, 270 deletions
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc
index c4e72c84d..aa011fab1 100644
--- a/src/shader_recompiler/frontend/ir/opcodes.inc
+++ b/src/shader_recompiler/frontend/ir/opcodes.inc
@@ -2,301 +2,330 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5// opcode name, return type, arg1 type, arg2 type, arg3 type, arg4 type, ... 5// opcode name, return type, arg1 type, arg2 type, arg3 type, arg4 type, arg4 type, ...
6OPCODE(Phi, Opaque, ) 6OPCODE(Phi, Opaque, )
7OPCODE(Identity, Opaque, Opaque, ) 7OPCODE(Identity, Opaque, Opaque, )
8OPCODE(Void, Void, ) 8OPCODE(Void, Void, )
9 9
10// Control flow 10// Control flow
11OPCODE(Branch, Void, Label, ) 11OPCODE(Branch, Void, Label, )
12OPCODE(BranchConditional, Void, U1, Label, Label, ) 12OPCODE(BranchConditional, Void, U1, Label, Label, )
13OPCODE(LoopMerge, Void, Label, Label, ) 13OPCODE(LoopMerge, Void, Label, Label, )
14OPCODE(SelectionMerge, Void, Label, ) 14OPCODE(SelectionMerge, Void, Label, )
15OPCODE(Return, Void, ) 15OPCODE(Return, Void, )
16 16
17// Context getters/setters 17// Context getters/setters
18OPCODE(GetRegister, U32, Reg, ) 18OPCODE(GetRegister, U32, Reg, )
19OPCODE(SetRegister, Void, Reg, U32, ) 19OPCODE(SetRegister, Void, Reg, U32, )
20OPCODE(GetPred, U1, Pred, ) 20OPCODE(GetPred, U1, Pred, )
21OPCODE(SetPred, Void, Pred, U1, ) 21OPCODE(SetPred, Void, Pred, U1, )
22OPCODE(GetGotoVariable, U1, U32, ) 22OPCODE(GetGotoVariable, U1, U32, )
23OPCODE(SetGotoVariable, Void, U32, U1, ) 23OPCODE(SetGotoVariable, Void, U32, U1, )
24OPCODE(GetCbuf, U32, U32, U32, ) 24OPCODE(GetCbuf, U32, U32, U32, )
25OPCODE(GetAttribute, U32, Attribute, ) 25OPCODE(GetAttribute, U32, Attribute, )
26OPCODE(SetAttribute, Void, Attribute, U32, ) 26OPCODE(SetAttribute, Void, Attribute, U32, )
27OPCODE(GetAttributeIndexed, U32, U32, ) 27OPCODE(GetAttributeIndexed, U32, U32, )
28OPCODE(SetAttributeIndexed, Void, U32, U32, ) 28OPCODE(SetAttributeIndexed, Void, U32, U32, )
29OPCODE(GetZFlag, U1, Void, ) 29OPCODE(GetZFlag, U1, Void, )
30OPCODE(GetSFlag, U1, Void, ) 30OPCODE(GetSFlag, U1, Void, )
31OPCODE(GetCFlag, U1, Void, ) 31OPCODE(GetCFlag, U1, Void, )
32OPCODE(GetOFlag, U1, Void, ) 32OPCODE(GetOFlag, U1, Void, )
33OPCODE(SetZFlag, Void, U1, ) 33OPCODE(SetZFlag, Void, U1, )
34OPCODE(SetSFlag, Void, U1, ) 34OPCODE(SetSFlag, Void, U1, )
35OPCODE(SetCFlag, Void, U1, ) 35OPCODE(SetCFlag, Void, U1, )
36OPCODE(SetOFlag, Void, U1, ) 36OPCODE(SetOFlag, Void, U1, )
37OPCODE(WorkgroupId, U32x3, ) 37OPCODE(WorkgroupId, U32x3, )
38OPCODE(LocalInvocationId, U32x3, ) 38OPCODE(LocalInvocationId, U32x3, )
39 39
40// Undefined 40// Undefined
41OPCODE(UndefU1, U1, ) 41OPCODE(UndefU1, U1, )
42OPCODE(UndefU8, U8, ) 42OPCODE(UndefU8, U8, )
43OPCODE(UndefU16, U16, ) 43OPCODE(UndefU16, U16, )
44OPCODE(UndefU32, U32, ) 44OPCODE(UndefU32, U32, )
45OPCODE(UndefU64, U64, ) 45OPCODE(UndefU64, U64, )
46 46
47// Memory operations 47// Memory operations
48OPCODE(LoadGlobalU8, U32, U64, ) 48OPCODE(LoadGlobalU8, U32, U64, )
49OPCODE(LoadGlobalS8, U32, U64, ) 49OPCODE(LoadGlobalS8, U32, U64, )
50OPCODE(LoadGlobalU16, U32, U64, ) 50OPCODE(LoadGlobalU16, U32, U64, )
51OPCODE(LoadGlobalS16, U32, U64, ) 51OPCODE(LoadGlobalS16, U32, U64, )
52OPCODE(LoadGlobal32, U32, U64, ) 52OPCODE(LoadGlobal32, U32, U64, )
53OPCODE(LoadGlobal64, U32x2, U64, ) 53OPCODE(LoadGlobal64, U32x2, U64, )
54OPCODE(LoadGlobal128, U32x4, U64, ) 54OPCODE(LoadGlobal128, U32x4, U64, )
55OPCODE(WriteGlobalU8, Void, U64, U32, ) 55OPCODE(WriteGlobalU8, Void, U64, U32, )
56OPCODE(WriteGlobalS8, Void, U64, U32, ) 56OPCODE(WriteGlobalS8, Void, U64, U32, )
57OPCODE(WriteGlobalU16, Void, U64, U32, ) 57OPCODE(WriteGlobalU16, Void, U64, U32, )
58OPCODE(WriteGlobalS16, Void, U64, U32, ) 58OPCODE(WriteGlobalS16, Void, U64, U32, )
59OPCODE(WriteGlobal32, Void, U64, U32, ) 59OPCODE(WriteGlobal32, Void, U64, U32, )
60OPCODE(WriteGlobal64, Void, U64, U32x2, ) 60OPCODE(WriteGlobal64, Void, U64, U32x2, )
61OPCODE(WriteGlobal128, Void, U64, U32x4, ) 61OPCODE(WriteGlobal128, Void, U64, U32x4, )
62 62
63// Storage buffer operations 63// Storage buffer operations
64OPCODE(LoadStorageU8, U32, U32, U32, ) 64OPCODE(LoadStorageU8, U32, U32, U32, )
65OPCODE(LoadStorageS8, U32, U32, U32, ) 65OPCODE(LoadStorageS8, U32, U32, U32, )
66OPCODE(LoadStorageU16, U32, U32, U32, ) 66OPCODE(LoadStorageU16, U32, U32, U32, )
67OPCODE(LoadStorageS16, U32, U32, U32, ) 67OPCODE(LoadStorageS16, U32, U32, U32, )
68OPCODE(LoadStorage32, U32, U32, U32, ) 68OPCODE(LoadStorage32, U32, U32, U32, )
69OPCODE(LoadStorage64, U32x2, U32, U32, ) 69OPCODE(LoadStorage64, U32x2, U32, U32, )
70OPCODE(LoadStorage128, U32x4, U32, U32, ) 70OPCODE(LoadStorage128, U32x4, U32, U32, )
71OPCODE(WriteStorageU8, Void, U32, U32, U32, ) 71OPCODE(WriteStorageU8, Void, U32, U32, U32, )
72OPCODE(WriteStorageS8, Void, U32, U32, U32, ) 72OPCODE(WriteStorageS8, Void, U32, U32, U32, )
73OPCODE(WriteStorageU16, Void, U32, U32, U32, ) 73OPCODE(WriteStorageU16, Void, U32, U32, U32, )
74OPCODE(WriteStorageS16, Void, U32, U32, U32, ) 74OPCODE(WriteStorageS16, Void, U32, U32, U32, )
75OPCODE(WriteStorage32, Void, U32, U32, U32, ) 75OPCODE(WriteStorage32, Void, U32, U32, U32, )
76OPCODE(WriteStorage64, Void, U32, U32, U32x2, ) 76OPCODE(WriteStorage64, Void, U32, U32, U32x2, )
77OPCODE(WriteStorage128, Void, U32, U32, U32x4, ) 77OPCODE(WriteStorage128, Void, U32, U32, U32x4, )
78 78
79// Vector utility 79// Vector utility
80OPCODE(CompositeConstructU32x2, U32x2, U32, U32, ) 80OPCODE(CompositeConstructU32x2, U32x2, U32, U32, )
81OPCODE(CompositeConstructU32x3, U32x3, U32, U32, U32, ) 81OPCODE(CompositeConstructU32x3, U32x3, U32, U32, U32, )
82OPCODE(CompositeConstructU32x4, U32x4, U32, U32, U32, U32, ) 82OPCODE(CompositeConstructU32x4, U32x4, U32, U32, U32, U32, )
83OPCODE(CompositeExtractU32x2, U32, U32x2, U32, ) 83OPCODE(CompositeExtractU32x2, U32, U32x2, U32, )
84OPCODE(CompositeExtractU32x3, U32, U32x3, U32, ) 84OPCODE(CompositeExtractU32x3, U32, U32x3, U32, )
85OPCODE(CompositeExtractU32x4, U32, U32x4, U32, ) 85OPCODE(CompositeExtractU32x4, U32, U32x4, U32, )
86OPCODE(CompositeInsertU32x2, U32x2, U32x2, U32, U32, ) 86OPCODE(CompositeInsertU32x2, U32x2, U32x2, U32, U32, )
87OPCODE(CompositeInsertU32x3, U32x3, U32x3, U32, U32, ) 87OPCODE(CompositeInsertU32x3, U32x3, U32x3, U32, U32, )
88OPCODE(CompositeInsertU32x4, U32x4, U32x4, U32, U32, ) 88OPCODE(CompositeInsertU32x4, U32x4, U32x4, U32, U32, )
89OPCODE(CompositeConstructF16x2, F16x2, F16, F16, ) 89OPCODE(CompositeConstructF16x2, F16x2, F16, F16, )
90OPCODE(CompositeConstructF16x3, F16x3, F16, F16, F16, ) 90OPCODE(CompositeConstructF16x3, F16x3, F16, F16, F16, )
91OPCODE(CompositeConstructF16x4, F16x4, F16, F16, F16, F16, ) 91OPCODE(CompositeConstructF16x4, F16x4, F16, F16, F16, F16, )
92OPCODE(CompositeExtractF16x2, F16, F16x2, U32, ) 92OPCODE(CompositeExtractF16x2, F16, F16x2, U32, )
93OPCODE(CompositeExtractF16x3, F16, F16x3, U32, ) 93OPCODE(CompositeExtractF16x3, F16, F16x3, U32, )
94OPCODE(CompositeExtractF16x4, F16, F16x4, U32, ) 94OPCODE(CompositeExtractF16x4, F16, F16x4, U32, )
95OPCODE(CompositeInsertF16x2, F16x2, F16x2, F16, U32, ) 95OPCODE(CompositeInsertF16x2, F16x2, F16x2, F16, U32, )
96OPCODE(CompositeInsertF16x3, F16x3, F16x3, F16, U32, ) 96OPCODE(CompositeInsertF16x3, F16x3, F16x3, F16, U32, )
97OPCODE(CompositeInsertF16x4, F16x4, F16x4, F16, U32, ) 97OPCODE(CompositeInsertF16x4, F16x4, F16x4, F16, U32, )
98OPCODE(CompositeConstructF32x2, F32x2, F32, F32, ) 98OPCODE(CompositeConstructF32x2, F32x2, F32, F32, )
99OPCODE(CompositeConstructF32x3, F32x3, F32, F32, F32, ) 99OPCODE(CompositeConstructF32x3, F32x3, F32, F32, F32, )
100OPCODE(CompositeConstructF32x4, F32x4, F32, F32, F32, F32, ) 100OPCODE(CompositeConstructF32x4, F32x4, F32, F32, F32, F32, )
101OPCODE(CompositeExtractF32x2, F32, F32x2, U32, ) 101OPCODE(CompositeExtractF32x2, F32, F32x2, U32, )
102OPCODE(CompositeExtractF32x3, F32, F32x3, U32, ) 102OPCODE(CompositeExtractF32x3, F32, F32x3, U32, )
103OPCODE(CompositeExtractF32x4, F32, F32x4, U32, ) 103OPCODE(CompositeExtractF32x4, F32, F32x4, U32, )
104OPCODE(CompositeInsertF32x2, F32x2, F32x2, F32, U32, ) 104OPCODE(CompositeInsertF32x2, F32x2, F32x2, F32, U32, )
105OPCODE(CompositeInsertF32x3, F32x3, F32x3, F32, U32, ) 105OPCODE(CompositeInsertF32x3, F32x3, F32x3, F32, U32, )
106OPCODE(CompositeInsertF32x4, F32x4, F32x4, F32, U32, ) 106OPCODE(CompositeInsertF32x4, F32x4, F32x4, F32, U32, )
107OPCODE(CompositeConstructF64x2, F64x2, F64, F64, ) 107OPCODE(CompositeConstructF64x2, F64x2, F64, F64, )
108OPCODE(CompositeConstructF64x3, F64x3, F64, F64, F64, ) 108OPCODE(CompositeConstructF64x3, F64x3, F64, F64, F64, )
109OPCODE(CompositeConstructF64x4, F64x4, F64, F64, F64, F64, ) 109OPCODE(CompositeConstructF64x4, F64x4, F64, F64, F64, F64, )
110OPCODE(CompositeExtractF64x2, F64, F64x2, U32, ) 110OPCODE(CompositeExtractF64x2, F64, F64x2, U32, )
111OPCODE(CompositeExtractF64x3, F64, F64x3, U32, ) 111OPCODE(CompositeExtractF64x3, F64, F64x3, U32, )
112OPCODE(CompositeExtractF64x4, F64, F64x4, U32, ) 112OPCODE(CompositeExtractF64x4, F64, F64x4, U32, )
113OPCODE(CompositeInsertF64x2, F64x2, F64x2, F64, U32, ) 113OPCODE(CompositeInsertF64x2, F64x2, F64x2, F64, U32, )
114OPCODE(CompositeInsertF64x3, F64x3, F64x3, F64, U32, ) 114OPCODE(CompositeInsertF64x3, F64x3, F64x3, F64, U32, )
115OPCODE(CompositeInsertF64x4, F64x4, F64x4, F64, U32, ) 115OPCODE(CompositeInsertF64x4, F64x4, F64x4, F64, U32, )
116 116
117// Select operations 117// Select operations
118OPCODE(SelectU1, U1, U1, U1, U1, ) 118OPCODE(SelectU1, U1, U1, U1, U1, )
119OPCODE(SelectU8, U8, U1, U8, U8, ) 119OPCODE(SelectU8, U8, U1, U8, U8, )
120OPCODE(SelectU16, U16, U1, U16, U16, ) 120OPCODE(SelectU16, U16, U1, U16, U16, )
121OPCODE(SelectU32, U32, U1, U32, U32, ) 121OPCODE(SelectU32, U32, U1, U32, U32, )
122OPCODE(SelectU64, U64, U1, U64, U64, ) 122OPCODE(SelectU64, U64, U1, U64, U64, )
123OPCODE(SelectF16, F16, U1, F16, F16, ) 123OPCODE(SelectF16, F16, U1, F16, F16, )
124OPCODE(SelectF32, F32, U1, F32, F32, ) 124OPCODE(SelectF32, F32, U1, F32, F32, )
125 125
126// Bitwise conversions 126// Bitwise conversions
127OPCODE(BitCastU16F16, U16, F16, ) 127OPCODE(BitCastU16F16, U16, F16, )
128OPCODE(BitCastU32F32, U32, F32, ) 128OPCODE(BitCastU32F32, U32, F32, )
129OPCODE(BitCastU64F64, U64, F64, ) 129OPCODE(BitCastU64F64, U64, F64, )
130OPCODE(BitCastF16U16, F16, U16, ) 130OPCODE(BitCastF16U16, F16, U16, )
131OPCODE(BitCastF32U32, F32, U32, ) 131OPCODE(BitCastF32U32, F32, U32, )
132OPCODE(BitCastF64U64, F64, U64, ) 132OPCODE(BitCastF64U64, F64, U64, )
133OPCODE(PackUint2x32, U64, U32x2, ) 133OPCODE(PackUint2x32, U64, U32x2, )
134OPCODE(UnpackUint2x32, U32x2, U64, ) 134OPCODE(UnpackUint2x32, U32x2, U64, )
135OPCODE(PackFloat2x16, U32, F16x2, ) 135OPCODE(PackFloat2x16, U32, F16x2, )
136OPCODE(UnpackFloat2x16, F16x2, U32, ) 136OPCODE(UnpackFloat2x16, F16x2, U32, )
137OPCODE(PackHalf2x16, U32, F32x2, ) 137OPCODE(PackHalf2x16, U32, F32x2, )
138OPCODE(UnpackHalf2x16, F32x2, U32, ) 138OPCODE(UnpackHalf2x16, F32x2, U32, )
139OPCODE(PackDouble2x32, F64, U32x2, ) 139OPCODE(PackDouble2x32, F64, U32x2, )
140OPCODE(UnpackDouble2x32, U32x2, F64, ) 140OPCODE(UnpackDouble2x32, U32x2, F64, )
141 141
142// Pseudo-operation, handled specially at final emit 142// Pseudo-operation, handled specially at final emit
143OPCODE(GetZeroFromOp, U1, Opaque, ) 143OPCODE(GetZeroFromOp, U1, Opaque, )
144OPCODE(GetSignFromOp, U1, Opaque, ) 144OPCODE(GetSignFromOp, U1, Opaque, )
145OPCODE(GetCarryFromOp, U1, Opaque, ) 145OPCODE(GetCarryFromOp, U1, Opaque, )
146OPCODE(GetOverflowFromOp, U1, Opaque, ) 146OPCODE(GetOverflowFromOp, U1, Opaque, )
147OPCODE(GetSparseFromOp, U1, Opaque, )
147 148
148// Floating-point operations 149// Floating-point operations
149OPCODE(FPAbs16, F16, F16, ) 150OPCODE(FPAbs16, F16, F16, )
150OPCODE(FPAbs32, F32, F32, ) 151OPCODE(FPAbs32, F32, F32, )
151OPCODE(FPAbs64, F64, F64, ) 152OPCODE(FPAbs64, F64, F64, )
152OPCODE(FPAdd16, F16, F16, F16, ) 153OPCODE(FPAdd16, F16, F16, F16, )
153OPCODE(FPAdd32, F32, F32, F32, ) 154OPCODE(FPAdd32, F32, F32, F32, )
154OPCODE(FPAdd64, F64, F64, F64, ) 155OPCODE(FPAdd64, F64, F64, F64, )
155OPCODE(FPFma16, F16, F16, F16, F16, ) 156OPCODE(FPFma16, F16, F16, F16, F16, )
156OPCODE(FPFma32, F32, F32, F32, F32, ) 157OPCODE(FPFma32, F32, F32, F32, F32, )
157OPCODE(FPFma64, F64, F64, F64, F64, ) 158OPCODE(FPFma64, F64, F64, F64, F64, )
158OPCODE(FPMax32, F32, F32, F32, ) 159OPCODE(FPMax32, F32, F32, F32, )
159OPCODE(FPMax64, F64, F64, F64, ) 160OPCODE(FPMax64, F64, F64, F64, )
160OPCODE(FPMin32, F32, F32, F32, ) 161OPCODE(FPMin32, F32, F32, F32, )
161OPCODE(FPMin64, F64, F64, F64, ) 162OPCODE(FPMin64, F64, F64, F64, )
162OPCODE(FPMul16, F16, F16, F16, ) 163OPCODE(FPMul16, F16, F16, F16, )
163OPCODE(FPMul32, F32, F32, F32, ) 164OPCODE(FPMul32, F32, F32, F32, )
164OPCODE(FPMul64, F64, F64, F64, ) 165OPCODE(FPMul64, F64, F64, F64, )
165OPCODE(FPNeg16, F16, F16, ) 166OPCODE(FPNeg16, F16, F16, )
166OPCODE(FPNeg32, F32, F32, ) 167OPCODE(FPNeg32, F32, F32, )
167OPCODE(FPNeg64, F64, F64, ) 168OPCODE(FPNeg64, F64, F64, )
168OPCODE(FPRecip32, F32, F32, ) 169OPCODE(FPRecip32, F32, F32, )
169OPCODE(FPRecip64, F64, F64, ) 170OPCODE(FPRecip64, F64, F64, )
170OPCODE(FPRecipSqrt32, F32, F32, ) 171OPCODE(FPRecipSqrt32, F32, F32, )
171OPCODE(FPRecipSqrt64, F64, F64, ) 172OPCODE(FPRecipSqrt64, F64, F64, )
172OPCODE(FPSqrt, F32, F32, ) 173OPCODE(FPSqrt, F32, F32, )
173OPCODE(FPSin, F32, F32, ) 174OPCODE(FPSin, F32, F32, )
174OPCODE(FPExp2, F32, F32, ) 175OPCODE(FPExp2, F32, F32, )
175OPCODE(FPCos, F32, F32, ) 176OPCODE(FPCos, F32, F32, )
176OPCODE(FPLog2, F32, F32, ) 177OPCODE(FPLog2, F32, F32, )
177OPCODE(FPSaturate16, F16, F16, ) 178OPCODE(FPSaturate16, F16, F16, )
178OPCODE(FPSaturate32, F32, F32, ) 179OPCODE(FPSaturate32, F32, F32, )
179OPCODE(FPSaturate64, F64, F64, ) 180OPCODE(FPSaturate64, F64, F64, )
180OPCODE(FPRoundEven16, F16, F16, ) 181OPCODE(FPRoundEven16, F16, F16, )
181OPCODE(FPRoundEven32, F32, F32, ) 182OPCODE(FPRoundEven32, F32, F32, )
182OPCODE(FPRoundEven64, F64, F64, ) 183OPCODE(FPRoundEven64, F64, F64, )
183OPCODE(FPFloor16, F16, F16, ) 184OPCODE(FPFloor16, F16, F16, )
184OPCODE(FPFloor32, F32, F32, ) 185OPCODE(FPFloor32, F32, F32, )
185OPCODE(FPFloor64, F64, F64, ) 186OPCODE(FPFloor64, F64, F64, )
186OPCODE(FPCeil16, F16, F16, ) 187OPCODE(FPCeil16, F16, F16, )
187OPCODE(FPCeil32, F32, F32, ) 188OPCODE(FPCeil32, F32, F32, )
188OPCODE(FPCeil64, F64, F64, ) 189OPCODE(FPCeil64, F64, F64, )
189OPCODE(FPTrunc16, F16, F16, ) 190OPCODE(FPTrunc16, F16, F16, )
190OPCODE(FPTrunc32, F32, F32, ) 191OPCODE(FPTrunc32, F32, F32, )
191OPCODE(FPTrunc64, F64, F64, ) 192OPCODE(FPTrunc64, F64, F64, )
192 193
193OPCODE(FPOrdEqual16, U1, F16, F16, ) 194OPCODE(FPOrdEqual16, U1, F16, F16, )
194OPCODE(FPOrdEqual32, U1, F32, F32, ) 195OPCODE(FPOrdEqual32, U1, F32, F32, )
195OPCODE(FPOrdEqual64, U1, F64, F64, ) 196OPCODE(FPOrdEqual64, U1, F64, F64, )
196OPCODE(FPUnordEqual16, U1, F16, F16, ) 197OPCODE(FPUnordEqual16, U1, F16, F16, )
197OPCODE(FPUnordEqual32, U1, F32, F32, ) 198OPCODE(FPUnordEqual32, U1, F32, F32, )
198OPCODE(FPUnordEqual64, U1, F64, F64, ) 199OPCODE(FPUnordEqual64, U1, F64, F64, )
199OPCODE(FPOrdNotEqual16, U1, F16, F16, ) 200OPCODE(FPOrdNotEqual16, U1, F16, F16, )
200OPCODE(FPOrdNotEqual32, U1, F32, F32, ) 201OPCODE(FPOrdNotEqual32, U1, F32, F32, )
201OPCODE(FPOrdNotEqual64, U1, F64, F64, ) 202OPCODE(FPOrdNotEqual64, U1, F64, F64, )
202OPCODE(FPUnordNotEqual16, U1, F16, F16, ) 203OPCODE(FPUnordNotEqual16, U1, F16, F16, )
203OPCODE(FPUnordNotEqual32, U1, F32, F32, ) 204OPCODE(FPUnordNotEqual32, U1, F32, F32, )
204OPCODE(FPUnordNotEqual64, U1, F64, F64, ) 205OPCODE(FPUnordNotEqual64, U1, F64, F64, )
205OPCODE(FPOrdLessThan16, U1, F16, F16, ) 206OPCODE(FPOrdLessThan16, U1, F16, F16, )
206OPCODE(FPOrdLessThan32, U1, F32, F32, ) 207OPCODE(FPOrdLessThan32, U1, F32, F32, )
207OPCODE(FPOrdLessThan64, U1, F64, F64, ) 208OPCODE(FPOrdLessThan64, U1, F64, F64, )
208OPCODE(FPUnordLessThan16, U1, F16, F16, ) 209OPCODE(FPUnordLessThan16, U1, F16, F16, )
209OPCODE(FPUnordLessThan32, U1, F32, F32, ) 210OPCODE(FPUnordLessThan32, U1, F32, F32, )
210OPCODE(FPUnordLessThan64, U1, F64, F64, ) 211OPCODE(FPUnordLessThan64, U1, F64, F64, )
211OPCODE(FPOrdGreaterThan16, U1, F16, F16, ) 212OPCODE(FPOrdGreaterThan16, U1, F16, F16, )
212OPCODE(FPOrdGreaterThan32, U1, F32, F32, ) 213OPCODE(FPOrdGreaterThan32, U1, F32, F32, )
213OPCODE(FPOrdGreaterThan64, U1, F64, F64, ) 214OPCODE(FPOrdGreaterThan64, U1, F64, F64, )
214OPCODE(FPUnordGreaterThan16, U1, F16, F16, ) 215OPCODE(FPUnordGreaterThan16, U1, F16, F16, )
215OPCODE(FPUnordGreaterThan32, U1, F32, F32, ) 216OPCODE(FPUnordGreaterThan32, U1, F32, F32, )
216OPCODE(FPUnordGreaterThan64, U1, F64, F64, ) 217OPCODE(FPUnordGreaterThan64, U1, F64, F64, )
217OPCODE(FPOrdLessThanEqual16, U1, F16, F16, ) 218OPCODE(FPOrdLessThanEqual16, U1, F16, F16, )
218OPCODE(FPOrdLessThanEqual32, U1, F32, F32, ) 219OPCODE(FPOrdLessThanEqual32, U1, F32, F32, )
219OPCODE(FPOrdLessThanEqual64, U1, F64, F64, ) 220OPCODE(FPOrdLessThanEqual64, U1, F64, F64, )
220OPCODE(FPUnordLessThanEqual16, U1, F16, F16, ) 221OPCODE(FPUnordLessThanEqual16, U1, F16, F16, )
221OPCODE(FPUnordLessThanEqual32, U1, F32, F32, ) 222OPCODE(FPUnordLessThanEqual32, U1, F32, F32, )
222OPCODE(FPUnordLessThanEqual64, U1, F64, F64, ) 223OPCODE(FPUnordLessThanEqual64, U1, F64, F64, )
223OPCODE(FPOrdGreaterThanEqual16, U1, F16, F16, ) 224OPCODE(FPOrdGreaterThanEqual16, U1, F16, F16, )
224OPCODE(FPOrdGreaterThanEqual32, U1, F32, F32, ) 225OPCODE(FPOrdGreaterThanEqual32, U1, F32, F32, )
225OPCODE(FPOrdGreaterThanEqual64, U1, F64, F64, ) 226OPCODE(FPOrdGreaterThanEqual64, U1, F64, F64, )
226OPCODE(FPUnordGreaterThanEqual16, U1, F16, F16, ) 227OPCODE(FPUnordGreaterThanEqual16, U1, F16, F16, )
227OPCODE(FPUnordGreaterThanEqual32, U1, F32, F32, ) 228OPCODE(FPUnordGreaterThanEqual32, U1, F32, F32, )
228OPCODE(FPUnordGreaterThanEqual64, U1, F64, F64, ) 229OPCODE(FPUnordGreaterThanEqual64, U1, F64, F64, )
229 230
230// Integer operations 231// Integer operations
231OPCODE(IAdd32, U32, U32, U32, ) 232OPCODE(IAdd32, U32, U32, U32, )
232OPCODE(IAdd64, U64, U64, U64, ) 233OPCODE(IAdd64, U64, U64, U64, )
233OPCODE(ISub32, U32, U32, U32, ) 234OPCODE(ISub32, U32, U32, U32, )
234OPCODE(ISub64, U64, U64, U64, ) 235OPCODE(ISub64, U64, U64, U64, )
235OPCODE(IMul32, U32, U32, U32, ) 236OPCODE(IMul32, U32, U32, U32, )
236OPCODE(INeg32, U32, U32, ) 237OPCODE(INeg32, U32, U32, )
237OPCODE(INeg64, U64, U64, ) 238OPCODE(INeg64, U64, U64, )
238OPCODE(IAbs32, U32, U32, ) 239OPCODE(IAbs32, U32, U32, )
239OPCODE(ShiftLeftLogical32, U32, U32, U32, ) 240OPCODE(ShiftLeftLogical32, U32, U32, U32, )
240OPCODE(ShiftLeftLogical64, U64, U64, U32, ) 241OPCODE(ShiftLeftLogical64, U64, U64, U32, )
241OPCODE(ShiftRightLogical32, U32, U32, U32, ) 242OPCODE(ShiftRightLogical32, U32, U32, U32, )
242OPCODE(ShiftRightLogical64, U64, U64, U32, ) 243OPCODE(ShiftRightLogical64, U64, U64, U32, )
243OPCODE(ShiftRightArithmetic32, U32, U32, U32, ) 244OPCODE(ShiftRightArithmetic32, U32, U32, U32, )
244OPCODE(ShiftRightArithmetic64, U64, U64, U32, ) 245OPCODE(ShiftRightArithmetic64, U64, U64, U32, )
245OPCODE(BitwiseAnd32, U32, U32, U32, ) 246OPCODE(BitwiseAnd32, U32, U32, U32, )
246OPCODE(BitwiseOr32, U32, U32, U32, ) 247OPCODE(BitwiseOr32, U32, U32, U32, )
247OPCODE(BitwiseXor32, U32, U32, U32, ) 248OPCODE(BitwiseXor32, U32, U32, U32, )
248OPCODE(BitFieldInsert, U32, U32, U32, U32, U32, ) 249OPCODE(BitFieldInsert, U32, U32, U32, U32, U32, )
249OPCODE(BitFieldSExtract, U32, U32, U32, U32, ) 250OPCODE(BitFieldSExtract, U32, U32, U32, U32, )
250OPCODE(BitFieldUExtract, U32, U32, U32, U32, ) 251OPCODE(BitFieldUExtract, U32, U32, U32, U32, )
251OPCODE(BitReverse32, U32, U32, ) 252OPCODE(BitReverse32, U32, U32, )
252OPCODE(BitCount32, U32, U32, ) 253OPCODE(BitCount32, U32, U32, )
253OPCODE(BitwiseNot32, U32, U32, ) 254OPCODE(BitwiseNot32, U32, U32, )
254 255
255OPCODE(FindSMsb32, U32, U32, ) 256OPCODE(FindSMsb32, U32, U32, )
256OPCODE(FindUMsb32, U32, U32, ) 257OPCODE(FindUMsb32, U32, U32, )
257OPCODE(SMin32, U32, U32, U32, ) 258OPCODE(SMin32, U32, U32, U32, )
258OPCODE(UMin32, U32, U32, U32, ) 259OPCODE(UMin32, U32, U32, U32, )
259OPCODE(SMax32, U32, U32, U32, ) 260OPCODE(SMax32, U32, U32, U32, )
260OPCODE(UMax32, U32, U32, U32, ) 261OPCODE(UMax32, U32, U32, U32, )
261OPCODE(SLessThan, U1, U32, U32, ) 262OPCODE(SLessThan, U1, U32, U32, )
262OPCODE(ULessThan, U1, U32, U32, ) 263OPCODE(ULessThan, U1, U32, U32, )
263OPCODE(IEqual, U1, U32, U32, ) 264OPCODE(IEqual, U1, U32, U32, )
264OPCODE(SLessThanEqual, U1, U32, U32, ) 265OPCODE(SLessThanEqual, U1, U32, U32, )
265OPCODE(ULessThanEqual, U1, U32, U32, ) 266OPCODE(ULessThanEqual, U1, U32, U32, )
266OPCODE(SGreaterThan, U1, U32, U32, ) 267OPCODE(SGreaterThan, U1, U32, U32, )
267OPCODE(UGreaterThan, U1, U32, U32, ) 268OPCODE(UGreaterThan, U1, U32, U32, )
268OPCODE(INotEqual, U1, U32, U32, ) 269OPCODE(INotEqual, U1, U32, U32, )
269OPCODE(SGreaterThanEqual, U1, U32, U32, ) 270OPCODE(SGreaterThanEqual, U1, U32, U32, )
270OPCODE(UGreaterThanEqual, U1, U32, U32, ) 271OPCODE(UGreaterThanEqual, U1, U32, U32, )
271 272
272// Logical operations 273// Logical operations
273OPCODE(LogicalOr, U1, U1, U1, ) 274OPCODE(LogicalOr, U1, U1, U1, )
274OPCODE(LogicalAnd, U1, U1, U1, ) 275OPCODE(LogicalAnd, U1, U1, U1, )
275OPCODE(LogicalXor, U1, U1, U1, ) 276OPCODE(LogicalXor, U1, U1, U1, )
276OPCODE(LogicalNot, U1, U1, ) 277OPCODE(LogicalNot, U1, U1, )
277 278
278// Conversion operations 279// Conversion operations
279OPCODE(ConvertS16F16, U32, F16, ) 280OPCODE(ConvertS16F16, U32, F16, )
280OPCODE(ConvertS16F32, U32, F32, ) 281OPCODE(ConvertS16F32, U32, F32, )
281OPCODE(ConvertS16F64, U32, F64, ) 282OPCODE(ConvertS16F64, U32, F64, )
282OPCODE(ConvertS32F16, U32, F16, ) 283OPCODE(ConvertS32F16, U32, F16, )
283OPCODE(ConvertS32F32, U32, F32, ) 284OPCODE(ConvertS32F32, U32, F32, )
284OPCODE(ConvertS32F64, U32, F64, ) 285OPCODE(ConvertS32F64, U32, F64, )
285OPCODE(ConvertS64F16, U64, F16, ) 286OPCODE(ConvertS64F16, U64, F16, )
286OPCODE(ConvertS64F32, U64, F32, ) 287OPCODE(ConvertS64F32, U64, F32, )
287OPCODE(ConvertS64F64, U64, F64, ) 288OPCODE(ConvertS64F64, U64, F64, )
288OPCODE(ConvertU16F16, U32, F16, ) 289OPCODE(ConvertU16F16, U32, F16, )
289OPCODE(ConvertU16F32, U32, F32, ) 290OPCODE(ConvertU16F32, U32, F32, )
290OPCODE(ConvertU16F64, U32, F64, ) 291OPCODE(ConvertU16F64, U32, F64, )
291OPCODE(ConvertU32F16, U32, F16, ) 292OPCODE(ConvertU32F16, U32, F16, )
292OPCODE(ConvertU32F32, U32, F32, ) 293OPCODE(ConvertU32F32, U32, F32, )
293OPCODE(ConvertU32F64, U32, F64, ) 294OPCODE(ConvertU32F64, U32, F64, )
294OPCODE(ConvertU64F16, U64, F16, ) 295OPCODE(ConvertU64F16, U64, F16, )
295OPCODE(ConvertU64F32, U64, F32, ) 296OPCODE(ConvertU64F32, U64, F32, )
296OPCODE(ConvertU64F64, U64, F64, ) 297OPCODE(ConvertU64F64, U64, F64, )
297OPCODE(ConvertU64U32, U64, U32, ) 298OPCODE(ConvertU64U32, U64, U32, )
298OPCODE(ConvertU32U64, U32, U64, ) 299OPCODE(ConvertU32U64, U32, U64, )
299OPCODE(ConvertF16F32, F16, F32, ) 300OPCODE(ConvertF16F32, F16, F32, )
300OPCODE(ConvertF32F16, F32, F16, ) 301OPCODE(ConvertF32F16, F32, F16, )
301OPCODE(ConvertF32F64, F32, F64, ) 302OPCODE(ConvertF32F64, F32, F64, )
302OPCODE(ConvertF64F32, F64, F32, ) 303OPCODE(ConvertF64F32, F64, F32, )
304OPCODE(ConvertF16S32, F16, U32, )
305OPCODE(ConvertF16S64, F16, U64, )
306OPCODE(ConvertF16U32, F16, U32, )
307OPCODE(ConvertF16U64, F16, U64, )
308OPCODE(ConvertF32S32, F32, U32, )
309OPCODE(ConvertF32S64, F32, U64, )
310OPCODE(ConvertF32U32, F32, U32, )
311OPCODE(ConvertF32U64, F32, U64, )
312OPCODE(ConvertF64S32, F64, U32, )
313OPCODE(ConvertF64S64, F64, U64, )
314OPCODE(ConvertF64U32, F64, U32, )
315OPCODE(ConvertF64U64, F64, U64, )
316
317// Image operations
318OPCODE(BindlessImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
319OPCODE(BindlessImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
320OPCODE(BindlessImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
321OPCODE(BindlessImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
322
323OPCODE(BoundImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
324OPCODE(BoundImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
325OPCODE(BoundImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
326OPCODE(BoundImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
327
328OPCODE(ImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
329OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
330OPCODE(ImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
331OPCODE(ImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )