summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/ir_emitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/ir/ir_emitter.cpp')
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
index e9fd41237..6c37af5e7 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
@@ -125,6 +125,12 @@ U1 IREmitter::GetPred(IR::Pred pred, bool is_negated) {
125 } 125 }
126} 126}
127 127
128void IREmitter::SetPred(IR::Pred pred, const U1& value) {
129 if (pred != IR::Pred::PT) {
130 Inst(Opcode::SetPred, pred, value);
131 }
132}
133
128U1 IREmitter::GetGotoVariable(u32 id) { 134U1 IREmitter::GetGotoVariable(u32 id) {
129 return Inst<U1>(Opcode::GetGotoVariable, id); 135 return Inst<U1>(Opcode::GetGotoVariable, id);
130} 136}
@@ -141,8 +147,12 @@ void IREmitter::SetIndirectBranchVariable(const U32& value) {
141 Inst(Opcode::SetIndirectBranchVariable, value); 147 Inst(Opcode::SetIndirectBranchVariable, value);
142} 148}
143 149
144void IREmitter::SetPred(IR::Pred pred, const U1& value) { 150U32 IREmitter::GetLoopSafetyVariable(u32 id) {
145 Inst(Opcode::SetPred, pred, value); 151 return Inst<U32>(Opcode::GetLoopSafetyVariable, id);
152}
153
154void IREmitter::SetLoopSafetyVariable(u32 id, const U32& counter) {
155 Inst(Opcode::SetLoopSafetyVariable, id, counter);
146} 156}
147 157
148U32 IREmitter::GetCbuf(const U32& binding, const U32& byte_offset) { 158U32 IREmitter::GetCbuf(const U32& binding, const U32& byte_offset) {