diff options
| author | 2021-04-16 17:22:59 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:28 -0400 | |
| commit | 95815a3883d708f71db5119f42243e183f32f9a2 (patch) | |
| tree | b479ed61fb90f8bc6dbe25983a431e336f5f5ce9 /src/shader_recompiler/frontend/ir | |
| parent | spirv: Bitcast non-F32 output attributes to their type before store (diff) | |
| download | yuzu-95815a3883d708f71db5119f42243e183f32f9a2.tar.gz yuzu-95815a3883d708f71db5119f42243e183f32f9a2.tar.xz yuzu-95815a3883d708f71db5119f42243e183f32f9a2.zip | |
shader: Implement PIXLD.MY_INDEX
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 b821d9f47..141efd86c 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp +++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp | |||
| @@ -375,6 +375,10 @@ U32 IREmitter::InvocationId() { | |||
| 375 | return Inst<U32>(Opcode::InvocationId); | 375 | return Inst<U32>(Opcode::InvocationId); |
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | U32 IREmitter::SampleId() { | ||
| 379 | return Inst<U32>(Opcode::SampleId); | ||
| 380 | } | ||
| 381 | |||
| 378 | U1 IREmitter::IsHelperInvocation() { | 382 | U1 IREmitter::IsHelperInvocation() { |
| 379 | return Inst<U1>(Opcode::IsHelperInvocation); | 383 | return Inst<U1>(Opcode::IsHelperInvocation); |
| 380 | } | 384 | } |
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index 7f8f1ad42..81833d928 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h | |||
| @@ -99,6 +99,7 @@ public: | |||
| 99 | [[nodiscard]] U32 LocalInvocationIdZ(); | 99 | [[nodiscard]] U32 LocalInvocationIdZ(); |
| 100 | 100 | ||
| 101 | [[nodiscard]] U32 InvocationId(); | 101 | [[nodiscard]] U32 InvocationId(); |
| 102 | [[nodiscard]] U32 SampleId(); | ||
| 102 | [[nodiscard]] U1 IsHelperInvocation(); | 103 | [[nodiscard]] U1 IsHelperInvocation(); |
| 103 | 104 | ||
| 104 | [[nodiscard]] U32 LaneId(); | 105 | [[nodiscard]] U32 LaneId(); |
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc index a86542cd8..d5e443673 100644 --- a/src/shader_recompiler/frontend/ir/opcodes.inc +++ b/src/shader_recompiler/frontend/ir/opcodes.inc | |||
| @@ -63,6 +63,7 @@ OPCODE(SetOFlag, Void, U1, | |||
| 63 | OPCODE(WorkgroupId, U32x3, ) | 63 | OPCODE(WorkgroupId, U32x3, ) |
| 64 | OPCODE(LocalInvocationId, U32x3, ) | 64 | OPCODE(LocalInvocationId, U32x3, ) |
| 65 | OPCODE(InvocationId, U32, ) | 65 | OPCODE(InvocationId, U32, ) |
| 66 | OPCODE(SampleId, U32, ) | ||
| 66 | OPCODE(IsHelperInvocation, U1, ) | 67 | OPCODE(IsHelperInvocation, U1, ) |
| 67 | 68 | ||
| 68 | // Undefined | 69 | // Undefined |