summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2021-04-16 23:52:58 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:28 +0200
commitf18a6dd1bdaffda4c3e771af3cf7cf41919ebd67 (patch)
treeffd531d2a81f9e48369c7f362e11e224f437fd5c /src/shader_recompiler/frontend/ir
parentshader: Fix Phi node types (diff)
downloadyuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.gz
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.bz2
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.lz
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.xz
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.zst
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.zip
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.cpp4
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.h1
-rw-r--r--src/shader_recompiler/frontend/ir/opcodes.inc1
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() {
return Inst<U1>(Opcode::IsHelperInvocation);
}
+F32 IREmitter::YDirection() {
+ return Inst<F32>(Opcode::YDirection);
+}
+
U32 IREmitter::LaneId() {
return Inst<U32>(Opcode::LaneId);
}
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:
[[nodiscard]] U32 InvocationId();
[[nodiscard]] U32 SampleId();
[[nodiscard]] U1 IsHelperInvocation();
+ [[nodiscard]] F32 YDirection();
[[nodiscard]] U32 LaneId();
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,
OPCODE(InvocationId, U32, )
OPCODE(SampleId, U32, )
OPCODE(IsHelperInvocation, U1, )
+OPCODE(YDirection, F32, )
// Undefined
OPCODE(UndefU1, U1, )