glsl: Implement a few Integer instructions

This commit is contained in:
ameerj 2021-05-21 20:56:46 -04:00
parent 0c315dae67
commit eea0726cd5
10 changed files with 398 additions and 260 deletions

View file

@ -25,4 +25,17 @@ static void Alias(IR::Inst& inst, const IR::Value& value) {
void EmitIdentity(EmitContext&, IR::Inst& inst, const IR::Value& value) {
Alias(inst, value);
}
void EmitConditionRef(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) {
ctx.AddU1("{}={};", inst, ctx.reg_alloc.Consume(value));
}
void EmitPackUint2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value) {
ctx.AddU64("{}=packUint2x32({});", inst, value);
}
void EmitUnpackUint2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value) {
ctx.AddU32x2("{}=unpackUint2x32({});", inst, value);
}
} // namespace Shader::Backend::GLSL