summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/microinstruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/ir/microinstruction.cpp')
-rw-r--r--src/shader_recompiler/frontend/ir/microinstruction.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/microinstruction.cpp b/src/shader_recompiler/frontend/ir/microinstruction.cpp
index ba3968056..be8eb4d4c 100644
--- a/src/shader_recompiler/frontend/ir/microinstruction.cpp
+++ b/src/shader_recompiler/frontend/ir/microinstruction.cpp
@@ -89,6 +89,7 @@ bool Inst::IsPseudoInstruction() const noexcept {
89 case Opcode::GetCarryFromOp: 89 case Opcode::GetCarryFromOp:
90 case Opcode::GetOverflowFromOp: 90 case Opcode::GetOverflowFromOp:
91 case Opcode::GetSparseFromOp: 91 case Opcode::GetSparseFromOp:
92 case Opcode::GetInBoundsFromOp:
92 return true; 93 return true;
93 default: 94 default:
94 return false; 95 return false;
@@ -123,6 +124,9 @@ Inst* Inst::GetAssociatedPseudoOperation(IR::Opcode opcode) {
123 case Opcode::GetSparseFromOp: 124 case Opcode::GetSparseFromOp:
124 CheckPseudoInstruction(associated_insts->sparse_inst, Opcode::GetSparseFromOp); 125 CheckPseudoInstruction(associated_insts->sparse_inst, Opcode::GetSparseFromOp);
125 return associated_insts->sparse_inst; 126 return associated_insts->sparse_inst;
127 case Opcode::GetInBoundsFromOp:
128 CheckPseudoInstruction(associated_insts->in_bounds_inst, Opcode::GetInBoundsFromOp);
129 return associated_insts->in_bounds_inst;
126 default: 130 default:
127 throw InvalidArgument("{} is not a pseudo-instruction", opcode); 131 throw InvalidArgument("{} is not a pseudo-instruction", opcode);
128 } 132 }
@@ -262,6 +266,10 @@ void Inst::Use(const Value& value) {
262 AllocAssociatedInsts(assoc_inst); 266 AllocAssociatedInsts(assoc_inst);
263 SetPseudoInstruction(assoc_inst->sparse_inst, this); 267 SetPseudoInstruction(assoc_inst->sparse_inst, this);
264 break; 268 break;
269 case Opcode::GetInBoundsFromOp:
270 AllocAssociatedInsts(assoc_inst);
271 SetPseudoInstruction(assoc_inst->in_bounds_inst, this);
272 break;
265 default: 273 default:
266 break; 274 break;
267 } 275 }
@@ -289,6 +297,10 @@ void Inst::UndoUse(const Value& value) {
289 AllocAssociatedInsts(assoc_inst); 297 AllocAssociatedInsts(assoc_inst);
290 RemovePseudoInstruction(assoc_inst->overflow_inst, Opcode::GetOverflowFromOp); 298 RemovePseudoInstruction(assoc_inst->overflow_inst, Opcode::GetOverflowFromOp);
291 break; 299 break;
300 case Opcode::GetInBoundsFromOp:
301 AllocAssociatedInsts(assoc_inst);
302 RemovePseudoInstruction(assoc_inst->in_bounds_inst, Opcode::GetInBoundsFromOp);
303 break;
292 default: 304 default:
293 break; 305 break;
294 } 306 }