Skip to content

Commit

Permalink
nv2a/glsl: Initialize vars
Browse files Browse the repository at this point in the history
  • Loading branch information
mborgerson committed Jul 26, 2024
1 parent 60a2a3f commit 39c5d0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/xbox/nv2a/pgraph/glsl/psh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 39c5d0d

Please sign in to comment.