mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
mesa: move sampler condition for flushing into mesa_flush_vertices_for_uniforms
This is just a code consolidation. It might fix something, not sure. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
This commit is contained in:
parent
0a2117bc9e
commit
d0c66c167d
1 changed files with 4 additions and 7 deletions
|
|
@ -1039,7 +1039,9 @@ _mesa_flush_vertices_for_uniforms(struct gl_context *ctx,
|
|||
{
|
||||
/* Opaque uniforms have no storage unless they are bindless */
|
||||
if (!uni->is_bindless && uni->type->contains_opaque()) {
|
||||
FLUSH_VERTICES(ctx, 0);
|
||||
/* Samplers flush on demand and ignore redundant updates. */
|
||||
if (!uni->type->is_sampler())
|
||||
FLUSH_VERTICES(ctx, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1149,12 +1151,7 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values,
|
|||
count = MIN2(count, (int) (uni->array_elements - offset));
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
_mesa_flush_vertices_for_uniforms(ctx, uni);
|
||||
|
||||
/* Store the data in the "actual type" backing storage for the uniform.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue