aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_manager.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-06-10 14:52:46 +1000
committerTimothy Arceri <[email protected]>2017-06-13 11:24:32 +1000
commit2e28e8b199abab76fa9509d3247b44a2cb31921d (patch)
tree9d02da76e15599aad2a7df24de1736909813b63c /src/mesa/state_tracker/st_manager.c
parent95c0591087ae9ecfb7be49fb73694c7222d42599 (diff)
st/mesa: skip texture validation logic when nothing has changed
Based on the same logic in the i965 driver 2f225f61451abd51 and 16060c5adcd4. perf reports st_finalize_texture() going from 0.60% -> 0.16% with this change when running the Xonotic benchmark from PTS. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_manager.c')
-rw-r--r--src/mesa/state_tracker/st_manager.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index f4c78aeced2..085f54efaa6 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -592,6 +592,8 @@ st_context_teximage(struct st_context_iface *stctxi,
pipe_resource_reference(&stImage->pt, tex);
stObj->surface_format = pipe_format;
+ stObj->needs_validation = true;
+
_mesa_dirty_texobj(ctx, texObj);
_mesa_unlock_texture(ctx, texObj);