From 9ee059b5b346bc71f249c18be4b52d8c4e66c37c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 15 Aug 2022 13:18:58 -0400 Subject: [PATCH] zink: move compute descriptor binds down in execution this has to occur after the pipeline has been updated to account for async compile Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_draw.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index 647cbdfdf32..bfef9025f9d 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -882,11 +882,6 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info) 0, 1, &mb, 0, NULL, 0, NULL); } - if (zink_program_has_descriptors(&ctx->curr_compute->base)) - zink_descriptors_update(ctx, true); - if (ctx->di.any_bindless_dirty && ctx->curr_compute->base.dd.bindless) - zink_descriptors_update_bindless(ctx); - zink_program_update_compute_pipeline_state(ctx, ctx->curr_compute, info->block); VkPipeline prev_pipeline = ctx->compute_pipeline_state.pipeline; @@ -910,6 +905,11 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info) zink_select_launch_grid(ctx); } + if (zink_program_has_descriptors(&ctx->curr_compute->base)) + zink_descriptors_update(ctx, true); + if (ctx->di.any_bindless_dirty && ctx->curr_compute->base.dd.bindless) + zink_descriptors_update_bindless(ctx); + if (BITSET_TEST(ctx->curr_compute->shader->nir->info.system_values_read, SYSTEM_VALUE_WORK_DIM)) VKCTX(CmdPushConstants)(batch->state->cmdbuf, ctx->curr_compute->base.layout, VK_SHADER_STAGE_COMPUTE_BIT, offsetof(struct zink_cs_push_constant, work_dim), sizeof(uint32_t),