summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-04-21 17:00:01 -0600
committerBrian Paul <brianp@vmware.com>2009-04-21 17:00:01 -0600
commit7872b8e37e13719fbea71b3a92507eb00e7fc9db (patch)
treea1c81f93ca07597068c701afd675772021237e4e /src/mesa
parent3eeefa47d08c91e4d3c14343dd0cab1be4252b8c (diff)
swrast: simplify state update logic for fragment shader const buffers
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/swrast/s_context.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index a7eaf76a0a..f24f4fc59b 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -264,13 +264,7 @@ _swrast_update_fragment_program(GLcontext *ctx, GLbitfield newState)
{
const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
if (fp) {
-#if 0
- /* XXX Need a way to trigger the initial loading of parameters
- * even when there's no recent state changes.
- */
- if (fp->Base.Parameters->StateFlags & newState)
-#endif
- _mesa_load_state_parameters(ctx, fp->Base.Parameters);
+ _mesa_load_state_parameters(ctx, fp->Base.Parameters);
}
}
@@ -524,13 +518,6 @@ _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;
@@ -647,17 +634,7 @@ _swrast_validate_derived( GLcontext *ctx )
if (swrast->NewState & (_NEW_FOG | _NEW_PROGRAM))
_swrast_update_fog_state( ctx );
- if (swrast->NewState & (_NEW_MODELVIEW |
- _NEW_PROJECTION |
- _NEW_TEXTURE_MATRIX |
- _NEW_FOG |
- _NEW_LIGHT |
- _NEW_LINE |
- _NEW_TEXTURE |
- _NEW_TRANSFORM |
- _NEW_POINT |
- _NEW_VIEWPORT |
- _NEW_PROGRAM))
+ if (swrast->NewState & (_NEW_PROGRAM_CONSTANTS | _NEW_PROGRAM))
_swrast_update_fragment_program( ctx, swrast->NewState );
if (swrast->NewState & (_NEW_TEXTURE | _NEW_PROGRAM)) {