mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 01:00:30 +01:00
zink: always set vertex dynamic states
even if there are no bindings, this should be set in order to further deduplicate the number of pipelines needed Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17225>
This commit is contained in:
parent
3d58642984
commit
ae022b784c
2 changed files with 5 additions and 10 deletions
|
|
@ -114,9 +114,6 @@ zink_bind_vertex_buffers(struct zink_batch *batch, struct zink_context *ctx)
|
|||
struct zink_vertex_elements_state *elems = ctx->element_state;
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
|
||||
if (!elems->hw_state.num_bindings)
|
||||
return;
|
||||
|
||||
for (unsigned i = 0; i < elems->hw_state.num_bindings; i++) {
|
||||
struct pipe_vertex_buffer *vb = ctx->vertex_buffers + ctx->element_state->binding_map[i];
|
||||
assert(vb);
|
||||
|
|
@ -141,7 +138,7 @@ zink_bind_vertex_buffers(struct zink_batch *batch, struct zink_context *ctx)
|
|||
VKCTX(CmdBindVertexBuffers2EXT)(batch->state->cmdbuf, 0,
|
||||
elems->hw_state.num_bindings,
|
||||
buffers, buffer_offsets, NULL, buffer_strides);
|
||||
else
|
||||
else if (elems->hw_state.num_bindings)
|
||||
VKSCR(CmdBindVertexBuffers)(batch->state->cmdbuf, 0,
|
||||
elems->hw_state.num_bindings,
|
||||
buffers, buffer_offsets);
|
||||
|
|
|
|||
|
|
@ -244,12 +244,10 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
|
|||
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_VIEWPORT;
|
||||
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_SCISSOR;
|
||||
}
|
||||
if (state->element_state->num_attribs) {
|
||||
if (screen->info.have_EXT_vertex_input_dynamic_state)
|
||||
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_VERTEX_INPUT_EXT;
|
||||
else if (screen->info.have_EXT_extended_dynamic_state && state->uses_dynamic_stride)
|
||||
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE;
|
||||
}
|
||||
if (screen->info.have_EXT_vertex_input_dynamic_state)
|
||||
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_VERTEX_INPUT_EXT;
|
||||
else if (screen->info.have_EXT_extended_dynamic_state && state->uses_dynamic_stride)
|
||||
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE;
|
||||
if (screen->info.have_EXT_extended_dynamic_state2) {
|
||||
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE;
|
||||
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue