zink: flag pipeline for change more often when vbos change without dynamic state
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 1 Apr 2021 20:36:01 +0000 (16:36 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 7 May 2021 02:00:54 +0000 (02:00 +0000)
this is always going to be bad for perf, but we still need to force updates anytime
we know for sure they'll be needed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10508>

src/gallium/drivers/zink/zink_context.c

index 894a235..3e11ee6 100644 (file)
@@ -714,6 +714,9 @@ zink_set_vertex_buffers(struct pipe_context *pctx,
 {
    struct zink_context *ctx = zink_context(pctx);
 
+   if (!zink_screen(pctx->screen)->info.have_EXT_extended_dynamic_state &&
+       (num_buffers || (!buffers && ctx->gfx_pipeline_state.vertex_buffers_enabled_mask)))
+      ctx->gfx_pipeline_state.vertex_state_dirty = true;
    util_set_vertex_buffers_mask(ctx->vertex_buffers, &ctx->gfx_pipeline_state.vertex_buffers_enabled_mask,
                                 buffers, start_slot, num_buffers,
                                 unbind_num_trailing_slots, take_ownership);