summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir/ir_emitter.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-02-08 06:54:35 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:22 +0200
commit2930dccecc933d6748772e9f51a5724fe1e6771b (patch)
treeec4aa48062f8a2fcba31b1c64f769ddf25a87832 /src/shader_recompiler/frontend/ir/ir_emitter.cpp
parentshader: Better constant folding (diff)
downloadyuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar
yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.gz
yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.bz2
yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.lz
yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.xz
yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.zst
yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.zip
Diffstat (limited to 'src/shader_recompiler/frontend/ir/ir_emitter.cpp')
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
index 9d7dc034c..ada0be834 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
@@ -130,27 +130,27 @@ void IREmitter::SetAttribute(IR::Attribute attribute, const F32& value) {
}
U32 IREmitter::WorkgroupIdX() {
- return Inst<U32>(Opcode::WorkgroupIdX);
+ return U32{CompositeExtract(Inst(Opcode::WorkgroupId), 0)};
}
U32 IREmitter::WorkgroupIdY() {
- return Inst<U32>(Opcode::WorkgroupIdY);
+ return U32{CompositeExtract(Inst(Opcode::WorkgroupId), 1)};
}
U32 IREmitter::WorkgroupIdZ() {
- return Inst<U32>(Opcode::WorkgroupIdZ);
+ return U32{CompositeExtract(Inst(Opcode::WorkgroupId), 2)};
}
U32 IREmitter::LocalInvocationIdX() {
- return Inst<U32>(Opcode::LocalInvocationIdX);
+ return U32{CompositeExtract(Inst(Opcode::LocalInvocationId), 0)};
}
U32 IREmitter::LocalInvocationIdY() {
- return Inst<U32>(Opcode::LocalInvocationIdY);
+ return U32{CompositeExtract(Inst(Opcode::LocalInvocationId), 1)};
}
U32 IREmitter::LocalInvocationIdZ() {
- return Inst<U32>(Opcode::LocalInvocationIdZ);
+ return U32{CompositeExtract(Inst(Opcode::LocalInvocationId), 2)};
}
U32 IREmitter::LoadGlobalU8(const U64& address) {