diff options
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.cpp | 8 | ||||
| -rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.h | 3 | ||||
| -rw-r--r-- | src/shader_recompiler/frontend/ir/opcodes.inc | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp index 11086ed8c..de1ce90a3 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp +++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp | |||
| @@ -378,6 +378,14 @@ F32 IREmitter::ResolutionDownFactor() { | |||
| 378 | return Inst<F32>(Opcode::ResolutionDownFactor); | 378 | return Inst<F32>(Opcode::ResolutionDownFactor); |
| 379 | } | 379 | } |
| 380 | 380 | ||
| 381 | F32 IREmitter::RenderAreaWidth() { | ||
| 382 | return F32(CompositeExtract(Inst<Value>(Opcode::RenderArea), 0)); | ||
| 383 | } | ||
| 384 | |||
| 385 | F32 IREmitter::RenderAreaHeight() { | ||
| 386 | return F32(CompositeExtract(Inst<Value>(Opcode::RenderArea), 1)); | ||
| 387 | } | ||
| 388 | |||
| 381 | U32 IREmitter::LaneId() { | 389 | U32 IREmitter::LaneId() { |
| 382 | return Inst<U32>(Opcode::LaneId); | 390 | return Inst<U32>(Opcode::LaneId); |
| 383 | } | 391 | } |
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index 25839a371..f163c18d9 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h | |||
| @@ -103,6 +103,9 @@ public: | |||
| 103 | 103 | ||
| 104 | [[nodiscard]] F32 ResolutionDownFactor(); | 104 | [[nodiscard]] F32 ResolutionDownFactor(); |
| 105 | 105 | ||
| 106 | [[nodiscard]] F32 RenderAreaWidth(); | ||
| 107 | [[nodiscard]] F32 RenderAreaHeight(); | ||
| 108 | |||
| 106 | [[nodiscard]] U32 LaneId(); | 109 | [[nodiscard]] U32 LaneId(); |
| 107 | 110 | ||
| 108 | [[nodiscard]] U32 LoadGlobalU8(const U64& address); | 111 | [[nodiscard]] U32 LoadGlobalU8(const U64& address); |
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc index 86410ddfc..f3038f298 100644 --- a/src/shader_recompiler/frontend/ir/opcodes.inc +++ b/src/shader_recompiler/frontend/ir/opcodes.inc | |||
| @@ -63,6 +63,7 @@ OPCODE(SampleId, U32, | |||
| 63 | OPCODE(IsHelperInvocation, U1, ) | 63 | OPCODE(IsHelperInvocation, U1, ) |
| 64 | OPCODE(YDirection, F32, ) | 64 | OPCODE(YDirection, F32, ) |
| 65 | OPCODE(ResolutionDownFactor, F32, ) | 65 | OPCODE(ResolutionDownFactor, F32, ) |
| 66 | OPCODE(RenderArea, F32x4, ) | ||
| 66 | 67 | ||
| 67 | // Undefined | 68 | // Undefined |
| 68 | OPCODE(UndefU1, U1, ) | 69 | OPCODE(UndefU1, U1, ) |