summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_context.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-08-13 10:28:38 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-08-13 10:28:38 -0600
commit505606349e5154c67d1a857d7125048669a594c3 (patch)
treea48502b4ae9dda1b6296f67b4102bda002c98484 /src/mesa/swrast/s_context.c
parentb9c6f2b1330a71042d3c495a1c97c4cadeff71b5 (diff)
mesa: fix a swrast state validation bug
Fixes progs/glsl/points.c
Diffstat (limited to 'src/mesa/swrast/s_context.c')
-rw-r--r--src/mesa/swrast/s_context.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index eab9ff3a9e..b64156a82d 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -2,7 +2,7 @@
* Mesa 3-D graphics library
* Version: 7.1
*
- * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -33,6 +33,7 @@
#include "mtypes.h"
#include "teximage.h"
#include "swrast.h"
+#include "shader/prog_parameter.h"
#include "shader/prog_statevars.h"
#include "s_blend.h"
#include "s_context.h"
@@ -501,6 +502,13 @@ _swrast_invalidate_state( GLcontext *ctx, GLbitfield new_state )
new_state = ~0;
}
+ {
+ const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
+ if (fp && (fp->Base.Parameters->StateFlags & new_state)) {
+ _mesa_load_state_parameters(ctx, fp->Base.Parameters);
+ }
+ }
+
if (new_state & swrast->InvalidateTriangleMask)
swrast->Triangle = _swrast_validate_triangle;