diff --git a/src/gallium/drivers/zink/zink_draw.c b/src/gallium/drivers/zink/zink_draw.c index 85ae99df517..4cd9502f8a5 100644 --- a/src/gallium/drivers/zink/zink_draw.c +++ b/src/gallium/drivers/zink/zink_draw.c @@ -417,8 +417,11 @@ zink_draw_vbo(struct pipe_context *pctx, if (ctx->gfx_pipeline_state.vertices_per_patch != dinfo->vertices_per_patch) ctx->gfx_pipeline_state.dirty = true; bool drawid_broken = ctx->drawid_broken; - ctx->drawid_broken = BITSET_TEST(ctx->gfx_stages[PIPE_SHADER_VERTEX]->nir->info.system_values_read, SYSTEM_VALUE_DRAW_ID) && - (!dindirect || !dindirect->buffer); + ctx->drawid_broken = false; + if (!dindirect || !dindirect->buffer) + ctx->drawid_broken = BITSET_TEST(ctx->gfx_stages[PIPE_SHADER_VERTEX]->nir->info.system_values_read, SYSTEM_VALUE_DRAW_ID) && + (drawid_offset != 0 || + ((!ctx->tc || !screen->info.have_EXT_multi_draw) && num_draws > 1)); if (drawid_broken != ctx->drawid_broken) ctx->dirty_shader_stages |= BITFIELD_BIT(PIPE_SHADER_VERTEX); ctx->gfx_pipeline_state.vertices_per_patch = dinfo->vertices_per_patch;