glsl: Better Storage access and wip warps

This commit is contained in:
ameerj 2021-05-28 21:24:52 -04:00
parent 86d4a05cec
commit 8ba814efb2
8 changed files with 133 additions and 62 deletions

View file

@ -183,8 +183,11 @@ std::string EmitGLSL(const Profile& profile, const RuntimeInfo& runtime_info, IR
for (size_t index = 0; index < ctx.reg_alloc.num_used_registers; ++index) {
ctx.header += fmt::format("{} R{};", ctx.reg_alloc.reg_types[index], index);
}
// TODO: track CC usage
// TODO: track usage
ctx.header += "uint carry;";
if (program.info.uses_subgroup_shuffles) {
ctx.header += "bool shfl_in_bounds;\n";
}
ctx.code.insert(0, ctx.header);
ctx.code += "}";
fmt::print("\n{}\n", ctx.code);