summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.cpp16
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.h5
-rw-r--r--src/shader_recompiler/frontend/ir/opcodes.inc6
3 files changed, 27 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
index 432dd29a5..ff2970125 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
@@ -1444,4 +1444,20 @@ F32 IREmitter::ImageSampleDrefExplicitLod(const Value& handle, const Value& coor
1444 return Inst<F32>(op, Flags{info}, handle, coords, dref, lod_lc, offset); 1444 return Inst<F32>(op, Flags{info}, handle, coords, dref, lod_lc, offset);
1445} 1445}
1446 1446
1447U1 IREmitter::VoteAll(const U1& value) {
1448 return Inst<U1>(Opcode::VoteAll, value);
1449}
1450
1451U1 IREmitter::VoteAny(const U1& value) {
1452 return Inst<U1>(Opcode::VoteAny, value);
1453}
1454
1455U1 IREmitter::VoteEqual(const U1& value) {
1456 return Inst<U1>(Opcode::VoteEqual, value);
1457}
1458
1459U32 IREmitter::SubgroupBallot(const U1& value) {
1460 return Inst<U32>(Opcode::SubgroupBallot, value);
1461}
1462
1447} // namespace Shader::IR 1463} // namespace Shader::IR
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h
index 346cef3ab..1708be3ef 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.h
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.h
@@ -234,6 +234,11 @@ public:
234 const Value& offset, const F32& lod_clamp, 234 const Value& offset, const F32& lod_clamp,
235 TextureInstInfo info); 235 TextureInstInfo info);
236 236
237 [[nodiscard]] U1 VoteAll(const U1& value);
238 [[nodiscard]] U1 VoteAny(const U1& value);
239 [[nodiscard]] U1 VoteEqual(const U1& value);
240 [[nodiscard]] U32 SubgroupBallot(const U1& value);
241
237private: 242private:
238 IR::Block::iterator insertion_point; 243 IR::Block::iterator insertion_point;
239 244
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc
index bdc07b9a7..fe888b8b2 100644
--- a/src/shader_recompiler/frontend/ir/opcodes.inc
+++ b/src/shader_recompiler/frontend/ir/opcodes.inc
@@ -355,3 +355,9 @@ OPCODE(ImageSampleImplicitLod, F32x4, U32,
355OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) 355OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
356OPCODE(ImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) 356OPCODE(ImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
357OPCODE(ImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) 357OPCODE(ImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
358
359// Vote operations
360OPCODE(VoteAll, U1, U1, )
361OPCODE(VoteAny, U1, U1, )
362OPCODE(VoteEqual, U1, U1, )
363OPCODE(SubgroupBallot, U32, U1, )