diff options
| author | 2021-04-16 23:52:58 +0200 | |
|---|---|---|
| committer | 2021-07-22 21:51:28 -0400 | |
| commit | f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67 (patch) | |
| tree | ffd531d2a81f9e48369c7f362e11e224f437fd5c /src/shader_recompiler/frontend/ir | |
| parent | shader: Fix Phi node types (diff) | |
| download | yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.gz yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.xz yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.zip | |
shader: Implement SR_Y_DIRECTION
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 | 1 | ||||
| -rw-r--r-- | src/shader_recompiler/frontend/ir/opcodes.inc | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp index aebe7200f..c3e8d0681 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp +++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp | |||
| @@ -379,6 +379,10 @@ U1 IREmitter::IsHelperInvocation() { | |||
| 379 | return Inst<U1>(Opcode::IsHelperInvocation); | 379 | return Inst<U1>(Opcode::IsHelperInvocation); |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | F32 IREmitter::YDirection() { | ||
| 383 | return Inst<F32>(Opcode::YDirection); | ||
| 384 | } | ||
| 385 | |||
| 382 | U32 IREmitter::LaneId() { | 386 | U32 IREmitter::LaneId() { |
| 383 | return Inst<U32>(Opcode::LaneId); | 387 | return Inst<U32>(Opcode::LaneId); |
| 384 | } | 388 | } |
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index b9d051b43..7e67f5e30 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h | |||
| @@ -102,6 +102,7 @@ public: | |||
| 102 | [[nodiscard]] U32 InvocationId(); | 102 | [[nodiscard]] U32 InvocationId(); |
| 103 | [[nodiscard]] U32 SampleId(); | 103 | [[nodiscard]] U32 SampleId(); |
| 104 | [[nodiscard]] U1 IsHelperInvocation(); | 104 | [[nodiscard]] U1 IsHelperInvocation(); |
| 105 | [[nodiscard]] F32 YDirection(); | ||
| 105 | 106 | ||
| 106 | [[nodiscard]] U32 LaneId(); | 107 | [[nodiscard]] U32 LaneId(); |
| 107 | 108 | ||
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc index 1cfc2a943..269de8ca5 100644 --- a/src/shader_recompiler/frontend/ir/opcodes.inc +++ b/src/shader_recompiler/frontend/ir/opcodes.inc | |||
| @@ -65,6 +65,7 @@ OPCODE(LocalInvocationId, U32x3, | |||
| 65 | OPCODE(InvocationId, U32, ) | 65 | OPCODE(InvocationId, U32, ) |
| 66 | OPCODE(SampleId, U32, ) | 66 | OPCODE(SampleId, U32, ) |
| 67 | OPCODE(IsHelperInvocation, U1, ) | 67 | OPCODE(IsHelperInvocation, U1, ) |
| 68 | OPCODE(YDirection, F32, ) | ||
| 68 | 69 | ||
| 69 | // Undefined | 70 | // Undefined |
| 70 | OPCODE(UndefU1, U1, ) | 71 | OPCODE(UndefU1, U1, ) |