nv2a/glsl: Initialize vars

This commit is contained in:
Matt Borgerson 2024-07-26 17:21:02 -07:00 committed by mborgerson
parent fc803fe375
commit 36e7cca1e9
1 changed files with 1 additions and 1 deletions

View File

@ -1175,7 +1175,7 @@ static MString* psh_convert(struct PixelShader *ps)
}
for (i = 0; i < ps->num_var_refs; i++) {
mstring_append_fmt(vars, "vec4 %s;\n", ps->var_refs[i]);
mstring_append_fmt(vars, "vec4 %s = vec4(0);\n", ps->var_refs[i]);
if (strcmp(ps->var_refs[i], "r0") == 0) {
if (ps->tex_modes[0] != PS_TEXTUREMODES_NONE) {
mstring_append(vars, "r0.a = t0.a;\n");