diff options
| author | 2021-03-28 21:25:08 +0200 | |
|---|---|---|
| committer | 2021-07-22 21:51:25 -0400 | |
| commit | be3e94ae55184933e0f1f5fb55698513f7936382 (patch) | |
| tree | 87dcf2bafc3da1966470de424f5f14bf662d1aa1 /src/shader_recompiler/frontend/ir | |
| parent | shader,spirv: Implement ImageQueryLod. (diff) | |
| download | yuzu-be3e94ae55184933e0f1f5fb55698513f7936382.tar.gz yuzu-be3e94ae55184933e0f1f5fb55698513f7936382.tar.xz yuzu-be3e94ae55184933e0f1f5fb55698513f7936382.zip | |
shader: Implement TMML partially
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.cpp | 4 | ||||
| -rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp index ba9591727..f6818ec8a 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp +++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp | |||
| @@ -1567,10 +1567,10 @@ 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) { | 1570 | Value IREmitter::ImageQueryLod(const Value& handle, const Value& coords, TextureInstInfo info) { |
| 1571 | const Opcode op{handle.IsImmediate() ? Opcode::BoundImageQueryLod | 1571 | const Opcode op{handle.IsImmediate() ? Opcode::BoundImageQueryLod |
| 1572 | : Opcode::BindlessImageQueryLod}; | 1572 | : Opcode::BindlessImageQueryLod}; |
| 1573 | return Inst(op, handle, coords); | 1573 | return Inst(op, Flags{info}, handle, coords); |
| 1574 | } | 1574 | } |
| 1575 | 1575 | ||
| 1576 | U1 IREmitter::VoteAll(const U1& value) { | 1576 | U1 IREmitter::VoteAll(const U1& value) { |
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index 9e752b208..2beeace8f 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h | |||
| @@ -255,7 +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); | 258 | [[nodiscard]] Value ImageQueryLod(const Value& handle, const Value& coords, |
| 259 | TextureInstInfo info); | ||
| 259 | 260 | ||
| 260 | [[nodiscard]] Value ImageGather(const Value& handle, const Value& coords, const Value& offset, | 261 | [[nodiscard]] Value ImageGather(const Value& handle, const Value& coords, const Value& offset, |
| 261 | const Value& offset2, TextureInstInfo info); | 262 | const Value& offset2, TextureInstInfo info); |