mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
vk: Issue PIPELINE_SELECT before setting up render pass
We need to make sure we're selected the 3D pipeline before we start setting up depth and stencil buffers.
This commit is contained in:
parent
d24e88b98e
commit
067dbd7a17
1 changed files with 16 additions and 8 deletions
|
|
@ -144,6 +144,19 @@ gen8_cmd_buffer_emit_viewport(struct anv_cmd_buffer *cmd_buffer)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
flush_pipeline_select_3d(struct anv_cmd_buffer *cmd_buffer)
|
||||
{
|
||||
if (cmd_buffer->state.current_pipeline != _3D) {
|
||||
anv_batch_emit(&cmd_buffer->batch, GENX(PIPELINE_SELECT),
|
||||
#if ANV_GEN >= 9
|
||||
.MaskBits = 3,
|
||||
#endif
|
||||
.PipelineSelection = _3D);
|
||||
cmd_buffer->state.current_pipeline = _3D;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
|
||||
{
|
||||
|
|
@ -154,14 +167,7 @@ cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
|
|||
|
||||
assert((pipeline->active_stages & VK_SHADER_STAGE_COMPUTE_BIT) == 0);
|
||||
|
||||
if (cmd_buffer->state.current_pipeline != _3D) {
|
||||
anv_batch_emit(&cmd_buffer->batch, GENX(PIPELINE_SELECT),
|
||||
#if ANV_GEN >= 9
|
||||
.MaskBits = 3,
|
||||
#endif
|
||||
.PipelineSelection = _3D);
|
||||
cmd_buffer->state.current_pipeline = _3D;
|
||||
}
|
||||
flush_pipeline_select_3d(cmd_buffer);
|
||||
|
||||
if (vb_emit) {
|
||||
const uint32_t num_buffers = __builtin_popcount(vb_emit);
|
||||
|
|
@ -807,6 +813,8 @@ void genX(CmdBeginRenderPass)(
|
|||
cmd_buffer->state.framebuffer = framebuffer;
|
||||
cmd_buffer->state.pass = pass;
|
||||
|
||||
flush_pipeline_select_3d(cmd_buffer);
|
||||
|
||||
const VkRect2D *render_area = &pRenderPassBegin->renderArea;
|
||||
|
||||
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_DRAWING_RECTANGLE),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue