diff options
Diffstat (limited to 'src/shader_recompiler/frontend')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.cpp | 6 | ||||
| -rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.h | 2 | ||||
| -rw-r--r-- | src/shader_recompiler/frontend/ir/opcodes.inc | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp index 6e7dddead..ba9591727 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp +++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp | |||
| @@ -1567,6 +1567,12 @@ Value IREmitter::ImageQueryDimension(const Value& handle, const IR::U32& lod) { | |||
| 1567 | return Inst(op, handle, lod); | 1567 | return Inst(op, handle, lod); |
| 1568 | } | 1568 | } |
| 1569 | 1569 | ||
| 1570 | Value IREmitter::ImageQueryLod(const Value& handle, const Value& coords) { | ||
| 1571 | const Opcode op{handle.IsImmediate() ? Opcode::BoundImageQueryLod | ||
| 1572 | : Opcode::BindlessImageQueryLod}; | ||
| 1573 | return Inst(op, handle, coords); | ||
| 1574 | } | ||
| 1575 | |||
| 1570 | U1 IREmitter::VoteAll(const U1& value) { | 1576 | U1 IREmitter::VoteAll(const U1& value) { |
| 1571 | return Inst<U1>(Opcode::VoteAll, value); | 1577 | return Inst<U1>(Opcode::VoteAll, value); |
| 1572 | } | 1578 | } |
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index 8f3325738..9e752b208 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h | |||
| @@ -255,6 +255,8 @@ public: | |||
| 255 | TextureInstInfo info); | 255 | TextureInstInfo info); |
| 256 | [[nodiscard]] Value ImageQueryDimension(const Value& handle, const IR::U32& lod); | 256 | [[nodiscard]] Value ImageQueryDimension(const Value& handle, const IR::U32& lod); |
| 257 | 257 | ||
| 258 | [[nodiscard]] Value ImageQueryLod(const Value& handle, const Value& coords); | ||
| 259 | |||
| 258 | [[nodiscard]] Value ImageGather(const Value& handle, const Value& coords, const Value& offset, | 260 | [[nodiscard]] Value ImageGather(const Value& handle, const Value& coords, const Value& offset, |
| 259 | const Value& offset2, TextureInstInfo info); | 261 | const Value& offset2, TextureInstInfo info); |
| 260 | 262 | ||
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc index 302b8471d..49cdcd57f 100644 --- a/src/shader_recompiler/frontend/ir/opcodes.inc +++ b/src/shader_recompiler/frontend/ir/opcodes.inc | |||
| @@ -380,6 +380,7 @@ OPCODE(BindlessImageGather, F32x4, U32, | |||
| 380 | OPCODE(BindlessImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) | 380 | OPCODE(BindlessImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) |
| 381 | OPCODE(BindlessImageFetch, F32x4, U32, Opaque, Opaque, Opaque, Opaque, ) | 381 | OPCODE(BindlessImageFetch, F32x4, U32, Opaque, Opaque, Opaque, Opaque, ) |
| 382 | OPCODE(BindlessImageQueryDimensions, U32x4, U32, U32, ) | 382 | OPCODE(BindlessImageQueryDimensions, U32x4, U32, U32, ) |
| 383 | OPCODE(BindlessImageQueryLod, F32x4, U32, Opaque, ) | ||
| 383 | 384 | ||
| 384 | OPCODE(BoundImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | 385 | OPCODE(BoundImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) |
| 385 | OPCODE(BoundImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | 386 | OPCODE(BoundImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) |
| @@ -389,6 +390,7 @@ OPCODE(BoundImageGather, F32x4, U32, | |||
| 389 | OPCODE(BoundImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) | 390 | OPCODE(BoundImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) |
| 390 | OPCODE(BoundImageFetch, F32x4, U32, Opaque, Opaque, Opaque, Opaque, ) | 391 | OPCODE(BoundImageFetch, F32x4, U32, Opaque, Opaque, Opaque, Opaque, ) |
| 391 | OPCODE(BoundImageQueryDimensions, U32x4, U32, U32, ) | 392 | OPCODE(BoundImageQueryDimensions, U32x4, U32, U32, ) |
| 393 | OPCODE(BoundImageQueryLod, F32x4, U32, Opaque, ) | ||
| 392 | 394 | ||
| 393 | OPCODE(ImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | 395 | OPCODE(ImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) |
| 394 | OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | 396 | OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) |
| @@ -398,6 +400,7 @@ OPCODE(ImageGather, F32x4, U32, | |||
| 398 | OPCODE(ImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) | 400 | OPCODE(ImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) |
| 399 | OPCODE(ImageFetch, F32x4, U32, Opaque, Opaque, Opaque, Opaque, ) | 401 | OPCODE(ImageFetch, F32x4, U32, Opaque, Opaque, Opaque, Opaque, ) |
| 400 | OPCODE(ImageQueryDimensions, U32x4, U32, U32, ) | 402 | OPCODE(ImageQueryDimensions, U32x4, U32, U32, ) |
| 403 | OPCODE(ImageQueryLod, F32x4, U32, Opaque, ) | ||
| 401 | 404 | ||
| 402 | // Warp operations | 405 | // Warp operations |
| 403 | OPCODE(VoteAll, U1, U1, ) | 406 | OPCODE(VoteAll, U1, U1, ) |