mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 19:17:57 -05:00
shader: Read branch conditions from an instruction
Fixes the identity removal pass.
This commit is contained in:
@ -469,7 +469,15 @@ Id EmitIdentity(EmitContext& ctx, const IR::Value& value) {
|
||||
return id;
|
||||
}
|
||||
|
||||
void EmitDummyReference(EmitContext&) {}
|
||||
Id EmitConditionRef(EmitContext& ctx, const IR::Value& value) {
|
||||
const Id id{ctx.Def(value)};
|
||||
if (!Sirit::ValidId(id)) {
|
||||
throw NotImplementedException("Forward identity declaration");
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
void EmitReference(EmitContext&) {}
|
||||
|
||||
void EmitPhiMove(EmitContext&) {
|
||||
throw LogicError("Unreachable instruction");
|
||||
|
@ -23,7 +23,8 @@ class EmitContext;
|
||||
Id EmitPhi(EmitContext& ctx, IR::Inst* inst);
|
||||
void EmitVoid(EmitContext& ctx);
|
||||
Id EmitIdentity(EmitContext& ctx, const IR::Value& value);
|
||||
void EmitDummyReference(EmitContext&);
|
||||
Id EmitConditionRef(EmitContext& ctx, const IR::Value& value);
|
||||
void EmitReference(EmitContext&);
|
||||
void EmitPhiMove(EmitContext&);
|
||||
void EmitJoin(EmitContext& ctx);
|
||||
void EmitDemoteToHelperInvocation(EmitContext& ctx);
|
||||
|
Reference in New Issue
Block a user