radeonsi: accurately check if instance divisors need a VS update
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
This commit is contained in:
parent
ece92ecc35
commit
58f0ca8685
|
@ -4668,8 +4668,6 @@ static void *si_create_vertex_elements(struct pipe_context *ctx, unsigned count,
|
|||
|
||||
unsigned instance_divisor = elements[i].instance_divisor;
|
||||
if (instance_divisor) {
|
||||
v->uses_instance_divisors = true;
|
||||
|
||||
if (instance_divisor == 1) {
|
||||
v->instance_divisor_is_one |= 1u << i;
|
||||
} else {
|
||||
|
@ -4866,9 +4864,8 @@ static void si_bind_vertex_elements(struct pipe_context *ctx, void *state)
|
|||
}
|
||||
|
||||
if (old->count != v->count ||
|
||||
old->uses_instance_divisors != v->uses_instance_divisors ||
|
||||
/* we don't check which divisors changed */
|
||||
v->uses_instance_divisors ||
|
||||
old->instance_divisor_is_one != v->instance_divisor_is_one ||
|
||||
old->instance_divisor_is_fetched != v->instance_divisor_is_fetched ||
|
||||
(old->vb_alignment_check_mask ^ v->vb_alignment_check_mask) &
|
||||
sctx->vertex_buffer_unaligned ||
|
||||
((v->vb_alignment_check_mask & sctx->vertex_buffer_unaligned) &&
|
||||
|
|
|
@ -173,7 +173,6 @@ struct si_vertex_elements {
|
|||
uint16_t vb_alignment_check_mask;
|
||||
|
||||
uint8_t count;
|
||||
bool uses_instance_divisors;
|
||||
|
||||
uint16_t first_vb_use_mask;
|
||||
/* Vertex buffer descriptor list size aligned for optimal prefetch. */
|
||||
|
|
Loading…
Reference in New Issue