summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2018-01-26 16:22:27 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2018-02-09 03:50:11 +0000
commit6a7e3a152e55b1ff9c56977638eb18d36aed30f6 (patch)
tree92da2de90005d22ae2e52c7077d3d8929badfb20
parentb75f12a2f2402af6346ff51f24ff52acaa9f9187 (diff)
anv/cmd_buffer: Re-emit the pipeline at every subpass
If we ever hit this edge-case, it can theoretically cause problem for CNL because we could end up changing render targets without re-emitting 3DSTATE_MULTISAMPLE which is part of the pipeline. Just get rid of the edge case. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> (cherry picked from commit 97938dac36e2875001ba24a7968e4cd8e2271321)
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index f9221502c28..9eba585d5d9 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -3095,6 +3095,17 @@ genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer *cmd_buffer,
if (GEN_GEN == 7)
cmd_buffer->state.vb_dirty |= ~0;
+ /* It is possible to start a render pass with an old pipeline. Because the
+ * render pass and subpass index are both baked into the pipeline, this is
+ * highly unlikely. In order to do so, it requires that you have a render
+ * pass with a single subpass and that you use that render pass twice
+ * back-to-back and use the same pipeline at the start of the second render
+ * pass as at the end of the first. In order to avoid unpredictable issues
+ * with this edge case, we just dirty the pipeline at the start of every
+ * subpass.
+ */
+ cmd_buffer->state.dirty |= ANV_CMD_DIRTY_PIPELINE;
+
/* Perform transitions to the subpass layout before any writes have
* occurred.
*/