shader: Better constant folding

This commit is contained in:
ReinUsesLisp 2021-02-06 04:47:53 -03:00 committed by ameerj
parent 0dcc0d5f8a
commit 8e9207253c
2 changed files with 48 additions and 13 deletions

View file

@ -87,7 +87,7 @@ static std::string ArgToIndex(const std::map<const Block*, size_t>& block_to_ind
}
switch (arg.Type()) {
case Type::U1:
return fmt::format("#{}", arg.U1() ? '1' : '0');
return fmt::format("#{}", arg.U1() ? "true" : "false");
case Type::U8:
return fmt::format("#{}", arg.U8());
case Type::U16: