mesa: skip FLUSH_VERTICES() if no samplers were changed

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri
2017-06-23 08:56:40 +10:00
parent 191ff86d53
commit 9545139ce5

View File

@@ -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.
*/