summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_program.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-01-09 15:52:04 -0700
committerBrian Paul <brianp@vmware.com>2009-01-12 14:24:45 -0700
commitde35989cdec9807c60b2b4389e5988037ce23d95 (patch)
treef77c91b6f388764d9c16d40437b9ef5a03b8d304 /src/mesa/drivers/dri/i965/brw_program.c
parent29f603a270da711a2a980cc9896e5883e59227cd (diff)
i965: fix broken ARB fp fog options
Just call _mesa_append_fog_code() if the fragment program's FogOption is not GL_NONE. This allows us to remove some unnecessary i965 fog code. Note, the arbfplight.c demo can be used to test this (see DO_FRAGMENT_FOG).
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_program.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index a18dee85e8..0c86911044 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -111,9 +111,15 @@ static void brwProgramStringNotify( GLcontext *ctx,
struct gl_program *prog )
{
if (target == GL_FRAGMENT_PROGRAM_ARB) {
+ struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
struct brw_context *brw = brw_context(ctx);
struct brw_fragment_program *p = (struct brw_fragment_program *)prog;
struct brw_fragment_program *fp = (struct brw_fragment_program *)brw->fragment_program;
+ if (fprog->FogOption) {
+ _mesa_append_fog_code(ctx, fprog);
+ fprog->FogOption = GL_NONE;
+ }
+
if (p == fp)
brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM;
p->id = brw->program_id++;