Commit 406cfefc authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Initialize WINED3DTA_TEMP.

parent 2702f28e
...@@ -6298,6 +6298,9 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con ...@@ -6298,6 +6298,9 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
if (lowest_disabled_stage < 7 && settings->emul_clipplanes) if (lowest_disabled_stage < 7 && settings->emul_clipplanes)
shader_addline(&buffer, "KIL fragment.texcoord[7];\n"); shader_addline(&buffer, "KIL fragment.texcoord[7];\n");
if (tempreg_used || settings->sRGB_write)
shader_addline(&buffer, "MOV tempreg, 0.0;\n");
/* Generate texture sampling instructions) */ /* Generate texture sampling instructions) */
for (stage = 0; stage < MAX_TEXTURES && settings->op[stage].cop != WINED3D_TOP_DISABLE; ++stage) for (stage = 0; stage < MAX_TEXTURES && settings->op[stage].cop != WINED3D_TOP_DISABLE; ++stage)
{ {
......
...@@ -5413,7 +5413,7 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct wined3d_shader_buf ...@@ -5413,7 +5413,7 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct wined3d_shader_buf
shader_addline(buffer, "vec4 tmp0, tmp1;\n"); shader_addline(buffer, "vec4 tmp0, tmp1;\n");
shader_addline(buffer, "vec4 ret;\n"); shader_addline(buffer, "vec4 ret;\n");
if (tempreg_used || settings->sRGB_write) if (tempreg_used || settings->sRGB_write)
shader_addline(buffer, "vec4 temp_reg;\n"); shader_addline(buffer, "vec4 temp_reg = vec4(0.0);\n");
shader_addline(buffer, "vec4 arg0, arg1, arg2;\n"); shader_addline(buffer, "vec4 arg0, arg1, arg2;\n");
for (stage = 0; stage < MAX_TEXTURES; ++stage) for (stage = 0; stage < MAX_TEXTURES; ++stage)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment