From 576c8c592a4be7047a00b0c8fe3851b09f10d8d4 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 16 Apr 2012 04:21:03 +0200 Subject: mesa: add _NEW_VARYING_VP_INPUTS for gl_context::varying_vp_inputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a frequently-updated state and _NEW_ARRAY already causes revalidation of the vbo module. It's kinda counter-productive to recompute arrays in the vbo module if _NEW_ARRAY is set and then set _NEW_ARRAY again. Reviewed-by: Brian Paul Reviewed-by: Mathias Fröhlich --- src/mesa/main/state.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/mesa/main/state.c') diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index c953efc8127..627bf838c0f 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -473,12 +473,13 @@ _mesa_update_state_locked( struct gl_context *ctx ) /* Determine which state flags effect vertex/fragment program state */ if (ctx->FragmentProgram._MaintainTexEnvProgram) { prog_flags |= (_NEW_BUFFERS | _NEW_TEXTURE | _NEW_FOG | - _NEW_ARRAY | _NEW_LIGHT | _NEW_POINT | _NEW_RENDERMODE | - _NEW_PROGRAM | _NEW_FRAG_CLAMP | _NEW_COLOR); + _NEW_VARYING_VP_INPUTS | _NEW_LIGHT | _NEW_POINT | + _NEW_RENDERMODE | _NEW_PROGRAM | _NEW_FRAG_CLAMP | + _NEW_COLOR); } if (ctx->VertexProgram._MaintainTnlProgram) { - prog_flags |= (_NEW_ARRAY | _NEW_TEXTURE | _NEW_TEXTURE_MATRIX | - _NEW_TRANSFORM | _NEW_POINT | + prog_flags |= (_NEW_VARYING_VP_INPUTS | _NEW_TEXTURE | + _NEW_TEXTURE_MATRIX | _NEW_TRANSFORM | _NEW_POINT | _NEW_FOG | _NEW_LIGHT | _MESA_NEW_NEED_EYE_COORDS); } @@ -626,7 +627,7 @@ _mesa_set_varying_vp_inputs( struct gl_context *ctx, { if (ctx->varying_vp_inputs != varying_inputs) { ctx->varying_vp_inputs = varying_inputs; - ctx->NewState |= _NEW_ARRAY; + ctx->NewState |= _NEW_VARYING_VP_INPUTS; /*printf("%s %x\n", __FUNCTION__, varying_inputs);*/ } } -- cgit v1.2.3