summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2018-12-22 16:49:16 +0100
committerMathias Fröhlich <[email protected]>2019-02-26 05:42:04 +0100
commit1ab21592499b4ff55d08d0c8551325924fb4ec3c (patch)
tree457542989e2fcf0530955fb9450b6c53f62218cb /src/mesa/state_tracker/st_context.c
parent6f423036462af3f0863de5f8b617c2f5cc1fd278 (diff)
st/mesa: Reduce array updates due to current changes.
Since using bitmasks we can easily check if we have any current value that is potentially uploaded on array setup. So check for any potential vertex program input that is not already a vao enabled array. Only flag array update if there is a potential overlap. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 0a0bd8ba1ca..45451531df9 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -224,7 +224,7 @@ st_invalidate_state(struct gl_context *ctx)
if (new_state & _NEW_PIXEL)
st->dirty |= ST_NEW_PIXEL_TRANSFER;
- if (new_state & _NEW_CURRENT_ATTRIB)
+ if (new_state & _NEW_CURRENT_ATTRIB && st_vp_uses_current_values(ctx))
st->dirty |= ST_NEW_VERTEX_ARRAYS;
/* Update the vertex shader if ctx->Light._ClampVertexColor was changed. */