Henri Verbeet : wined3d: Only use state contained in the ffp_frag_settings structure in gen_arbfp_ffp_shader ().
Alexandre Julliard
julliard at winehq.org
Tue Jul 12 13:47:09 CDT 2011
Module: wine
Branch: master
Commit: 1f6f94675ec190c00e54578fbb0268f3d2be8096
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1f6f94675ec190c00e54578fbb0268f3d2be8096
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Jul 11 22:04:29 2011 +0200
wined3d: Only use state contained in the ffp_frag_settings structure in gen_arbfp_ffp_shader().
Note that the actual check looks off by one too.
---
dlls/wined3d/arb_program_shader.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index b9586d5..66f1695 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5960,6 +5960,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, str
BOOL tex_read[MAX_TEXTURES] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE};
BOOL bump_used[MAX_TEXTURES] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE};
BOOL luminance_used[MAX_TEXTURES] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE};
+ UINT lowest_disabled_stage;
const char *textype;
const char *instr, *sat;
char colorcor_dst[8];
@@ -6018,6 +6019,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, str
tfactor_used = TRUE;
}
}
+ lowest_disabled_stage = stage;
/* Shader header */
if (!shader_buffer_init(&buffer))
@@ -6063,7 +6065,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, str
srgb_sub_high, 0.0, 0.0, 0.0);
}
- if (ffp_clip_emul(&stateblock->state) && settings->emul_clipplanes)
+ if (lowest_disabled_stage < 7 && settings->emul_clipplanes)
shader_addline(&buffer, "KIL fragment.texcoord[7];\n");
/* Generate texture sampling instructions) */
More information about the wine-cvs
mailing list