summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend')
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.cpp6
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.h8
-rw-r--r--src/shader_recompiler/frontend/ir/opcodes.inc3
3 files changed, 15 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
index f49c30484..b8d36f362 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
@@ -1491,6 +1491,12 @@ Value IREmitter::ImageGatherDref(const Value& handle, const Value& coords, const
1491 return Inst(op, Flags{info}, handle, coords, offset, offset2, dref); 1491 return Inst(op, Flags{info}, handle, coords, offset, offset2, dref);
1492} 1492}
1493 1493
1494Value IREmitter::ImageFetch(const Value& handle, const Value& coords, const Value& offset,
1495 const U32& lod, const U32& multisampling, TextureInstInfo info) {
1496 const Opcode op{handle.IsImmediate() ? Opcode::BoundImageFetch : Opcode::BindlessImageFetch};
1497 return Inst(op, Flags{info}, handle, coords, offset, lod, multisampling);
1498}
1499
1494U1 IREmitter::VoteAll(const U1& value) { 1500U1 IREmitter::VoteAll(const U1& value) {
1495 return Inst<U1>(Opcode::VoteAll, value); 1501 return Inst<U1>(Opcode::VoteAll, value);
1496} 1502}
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h
index 04b43197f..446fd7785 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.h
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.h
@@ -243,8 +243,12 @@ public:
243 [[nodiscard]] Value ImageGather(const Value& handle, const Value& coords, const Value& offset, 243 [[nodiscard]] Value ImageGather(const Value& handle, const Value& coords, const Value& offset,
244 const Value& offset2, TextureInstInfo info); 244 const Value& offset2, TextureInstInfo info);
245 245
246 [[nodiscard]] Value ImageGatherDref(const Value& handle, const Value& coords, const Value& offset, 246 [[nodiscard]] Value ImageGatherDref(const Value& handle, const Value& coords,
247 const Value& offset2, const F32& dref, TextureInstInfo info); 247 const Value& offset, const Value& offset2, const F32& dref,
248 TextureInstInfo info);
249
250 [[nodiscard]] Value ImageFetch(const Value& handle, const Value& coords, const Value& offset,
251 const U32& lod, const U32& multisampling, TextureInstInfo info);
248 252
249 [[nodiscard]] U1 VoteAll(const U1& value); 253 [[nodiscard]] U1 VoteAll(const U1& value);
250 [[nodiscard]] U1 VoteAny(const U1& value); 254 [[nodiscard]] U1 VoteAny(const U1& value);
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc
index 0dc0aabdf..3dacd7b6b 100644
--- a/src/shader_recompiler/frontend/ir/opcodes.inc
+++ b/src/shader_recompiler/frontend/ir/opcodes.inc
@@ -356,6 +356,7 @@ OPCODE(BindlessImageSampleDrefImplicitLod, F32, U32,
356OPCODE(BindlessImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) 356OPCODE(BindlessImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
357OPCODE(BindlessImageGather, F32x4, U32, Opaque, Opaque, Opaque, ) 357OPCODE(BindlessImageGather, F32x4, U32, Opaque, Opaque, Opaque, )
358OPCODE(BindlessImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) 358OPCODE(BindlessImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, )
359OPCODE(BindlessImageFetch, F32x4, U32, Opaque, U32, U32, )
359 360
360OPCODE(BoundImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) 361OPCODE(BoundImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
361OPCODE(BoundImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) 362OPCODE(BoundImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
@@ -363,6 +364,7 @@ OPCODE(BoundImageSampleDrefImplicitLod, F32, U32,
363OPCODE(BoundImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) 364OPCODE(BoundImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
364OPCODE(BoundImageGather, F32x4, U32, Opaque, Opaque, Opaque, ) 365OPCODE(BoundImageGather, F32x4, U32, Opaque, Opaque, Opaque, )
365OPCODE(BoundImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) 366OPCODE(BoundImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, )
367OPCODE(BoundImageFetch, F32x4, U32, Opaque, U32, U32, )
366 368
367OPCODE(ImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) 369OPCODE(ImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
368OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) 370OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
@@ -370,6 +372,7 @@ OPCODE(ImageSampleDrefImplicitLod, F32, U32,
370OPCODE(ImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) 372OPCODE(ImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
371OPCODE(ImageGather, F32x4, U32, Opaque, Opaque, Opaque, ) 373OPCODE(ImageGather, F32x4, U32, Opaque, Opaque, Opaque, )
372OPCODE(ImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) 374OPCODE(ImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, )
375OPCODE(ImageFetch, F32x4, U32, Opaque, U32, U32, )
373 376
374// Warp operations 377// Warp operations
375OPCODE(VoteAll, U1, U1, ) 378OPCODE(VoteAll, U1, U1, )