summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-06-23 08:56:40 +1000
committerTimothy Arceri <[email protected]>2017-06-27 09:20:29 +1000
commit9545139ce5f10180547568a3da94af9e291253fd (patch)
treec22f197e342960dbb27c19d38c86818ce6ed9a45
parent191ff86d532924e5b66cad287e9f507c7a655dfb (diff)
mesa: skip FLUSH_VERTICES() if no samplers were changed
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/mesa/main/uniform_query.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index afb9f566b80..928d3ce4fd6 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -1079,7 +1079,12 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values,
count = MIN2(count, (int) (uni->array_elements - offset));
}
- _mesa_flush_vertices_for_uniforms(ctx, uni);
+ /* We check samplers for changes and flush if needed in the sampler
+ * handling code further down, so just skip them here.
+ */
+ if (!uni->type->is_sampler()) {
+ _mesa_flush_vertices_for_uniforms(ctx, uni);
+ }
/* Store the data in the "actual type" backing storage for the uniform.
*/