zink: fix stride=0 for dynamic state vertex stride checking

this case shouldn't trigger the fully-baked fallback since it's
legal with dynamic state

Fixes: 1eada1b02d ("zink: selectively disable dynamic vertex stride")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16098>
This commit is contained in:
Mike Blumenkrantz
2022-04-21 10:09:34 -04:00
committed by Marge Bot
parent dd24ab86cc
commit 06df3ed5c0
+1 -1
View File
@@ -787,7 +787,7 @@ check_vertex_strides(struct zink_context *ctx)
for (unsigned i = 0; i < ves->hw_state.num_bindings; i++) {
const struct pipe_vertex_buffer *vb = ctx->vertex_buffers + ves->binding_map[i];
unsigned stride = vb->buffer.resource ? vb->stride : 0;
if (stride < ves->min_stride[i])
if (stride && stride < ves->min_stride[i])
return false;
}
return true;