shader: Read branch conditions from an instruction
Fixes the identity removal pass.
This commit is contained in:
parent
4bad415bca
commit
9bb3e008c9
12 changed files with 36 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue