shader: Misc fixes

This commit is contained in:
ReinUsesLisp 2021-02-14 01:24:32 -03:00 committed by ameerj
parent 9170200a11
commit 8af9297f09
10 changed files with 104 additions and 89 deletions

View file

@ -79,6 +79,8 @@ public:
return def_map.Consume(value.Inst());
}
switch (value.Type()) {
case IR::Type::U1:
return value.U1() ? true_value : false_value;
case IR::Type::U32:
return Constant(u32[1], value.U32());
case IR::Type::F32:
@ -108,6 +110,9 @@ public:
VectorTypes f16;
VectorTypes f64;
Id true_value{};
Id false_value{};
Id workgroup_id{};
Id local_invocation_id{};