glsl: implement phi nodes
This commit is contained in:
parent
3d9ecbe998
commit
e99d01ff53
4 changed files with 54 additions and 20 deletions
|
@ -28,11 +28,14 @@ void EmitVoid(EmitContext& ctx) {
|
|||
}
|
||||
|
||||
void EmitReference(EmitContext&) {
|
||||
NotImplemented();
|
||||
// NotImplemented();
|
||||
}
|
||||
|
||||
void EmitPhiMove(EmitContext& ctx, const IR::Value& phi, const IR::Value& value) {
|
||||
NotImplemented();
|
||||
if (phi == value) {
|
||||
return;
|
||||
}
|
||||
ctx.Add("{}={};", ctx.reg_alloc.Consume(phi), ctx.reg_alloc.Consume(value));
|
||||
}
|
||||
|
||||
void EmitBranch(EmitContext& ctx, std::string_view label) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue