summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-23 09:28:34 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:30 +0200
commitd621e96d0de212cc16897eadf71e8a1b2e1eb5dc (patch)
tree8695f2f4dddf2564b63e4574d6616ccb0e79568c /src/shader_recompiler/frontend/ir
parentspirv: Be aware of NAN unaware drivers (diff)
downloadyuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.tar
yuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.tar.gz
yuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.tar.bz2
yuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.tar.lz
yuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.tar.xz
yuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.tar.zst
yuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.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
2 files changed, 5 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
index b3c9fe72a..5913fdeff 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
@@ -355,6 +355,10 @@ U32 IREmitter::WorkgroupIdZ() {
return U32{CompositeExtract(Inst(Opcode::WorkgroupId), 2)};
}
+Value IREmitter::LocalInvocationId() {
+ return Inst(Opcode::LocalInvocationId);
+}
+
U32 IREmitter::LocalInvocationIdX() {
return U32{CompositeExtract(Inst(Opcode::LocalInvocationId), 0)};
}
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h
index 4441c495d..a12919283 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.h
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.h
@@ -95,6 +95,7 @@ public:
[[nodiscard]] U32 WorkgroupIdY();
[[nodiscard]] U32 WorkgroupIdZ();
+ [[nodiscard]] Value LocalInvocationId();
[[nodiscard]] U32 LocalInvocationIdX();
[[nodiscard]] U32 LocalInvocationIdY();
[[nodiscard]] U32 LocalInvocationIdZ();