mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
lavapipe: more vertex stride fixups
for handling cases where bind2 and dynamic vi are used interchangeably Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25354>
This commit is contained in:
parent
94debd4b4c
commit
0d975219ad
1 changed files with 7 additions and 11 deletions
|
|
@ -969,17 +969,6 @@ static void handle_graphics_pipeline(struct lvp_pipeline *pipeline,
|
|||
state->rs_dirty = true;
|
||||
}
|
||||
|
||||
if (!BITSET_TEST(ps->dynamic, MESA_VK_DYNAMIC_VI_BINDING_STRIDES)) {
|
||||
if (ps->vi) {
|
||||
u_foreach_bit(a, ps->vi->attributes_valid) {
|
||||
uint32_t b = ps->vi->attributes[a].binding;
|
||||
state->vb_strides[b] = ps->vi->bindings[b].stride;
|
||||
state->vb_strides_dirty = true;
|
||||
state->ve_dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!BITSET_TEST(ps->dynamic, MESA_VK_DYNAMIC_VI) && ps->vi) {
|
||||
u_foreach_bit(a, ps->vi->attributes_valid) {
|
||||
uint32_t b = ps->vi->attributes[a].binding;
|
||||
|
|
@ -1000,6 +989,12 @@ static void handle_graphics_pipeline(struct lvp_pipeline *pipeline,
|
|||
default:
|
||||
unreachable("Invalid vertex input rate");
|
||||
}
|
||||
|
||||
if (!BITSET_TEST(ps->dynamic, MESA_VK_DYNAMIC_VI_BINDING_STRIDES)) {
|
||||
state->vb_strides[b] = ps->vi->bindings[b].stride;
|
||||
state->vb_strides_dirty = true;
|
||||
state->ve_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
state->velem.count = util_last_bit(ps->vi->attributes_valid);
|
||||
|
|
@ -3342,6 +3337,7 @@ static void handle_set_vertex_input(struct vk_cmd_queue_entry *cmd,
|
|||
max_location = location;
|
||||
}
|
||||
state->velem.count = max_location + 1;
|
||||
state->vb_strides_dirty = false;
|
||||
state->vb_dirty = true;
|
||||
state->ve_dirty = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue