glsl: Better IAdd Overflow CC fix

This ensures the original operand values are not overwritten when being used in the overflow detection.
This commit is contained in:
ameerj 2021-06-22 23:09:22 -04:00
parent f158fe9359
commit 99e8164b43
2 changed files with 13 additions and 11 deletions

View file

@ -227,7 +227,7 @@ std::string EmitGLSL(const Profile& profile, const RuntimeInfo& runtime_info, IR
ctx.header += "void main(){\n";
DefineVariables(ctx, ctx.header);
if (ctx.uses_cc_carry) {
ctx.header += "uint carry;uint iadd_op_b;";
ctx.header += "uint carry;";
}
if (program.info.uses_subgroup_shuffles) {
ctx.header += "bool shfl_in_bounds;";