zink: move gfx pipeline creation closer to the bind point

ensure that the renderpass has already been started by this point so
we have a valid object

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9189>
This commit is contained in:
Mike Blumenkrantz 2020-09-16 14:49:12 -04:00 committed by Marge Bot
parent 1f5cd19ac9
commit b1843879c1

View file

@ -683,10 +683,6 @@ zink_draw_vbo(struct pipe_context *pctx,
}
}
VkPipeline pipeline = zink_get_gfx_pipeline(screen, gfx_program,
&ctx->gfx_pipeline_state,
dinfo->mode);
enum pipe_prim_type reduced_prim = u_reduced_prim(dinfo->mode);
bool depth_bias = false;
@ -806,6 +802,10 @@ zink_draw_vbo(struct pipe_context *pctx,
if (ctx->gfx_pipeline_state.blend_state->need_blend_constants)
vkCmdSetBlendConstants(batch->cmdbuf, ctx->blend_constants);
VkPipeline pipeline = zink_get_gfx_pipeline(screen, gfx_program,
&ctx->gfx_pipeline_state,
dinfo->mode);
vkCmdBindPipeline(batch->cmdbuf, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
zink_bind_vertex_buffers(batch, ctx);