On Fri, 2018-01-26 at 16:23 -0800, Jason Ekstrand wrote: > 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-sta...@lists.freedesktop.org > --- > src/intel/vulkan/genX_cmd_buffer.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/src/intel/vulkan/genX_cmd_buffer.c > b/src/intel/vulkan/genX_cmd_buffer.c > index e8d44d0..bf6e267 100644 > --- a/src/intel/vulkan/genX_cmd_buffer.c > +++ b/src/intel/vulkan/genX_cmd_buffer.c > @@ -3200,6 +3200,17 @@ genX(cmd_buffer_set_subpass)(struct > anv_cmd_buffer *cmd_buffer, > if (GEN_GEN == 7) > cmd_buffer->state.gfx.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.gfx.dirty |= ANV_CMD_DIRTY_PIPELINE; > +
I was going to say that since this can only happen when there is a single subpass in the renderpass we could just do this at CmdBeginRenderPass instead, but I guess it doesn't really matter since apps need to bind a new pipeline at each subpass anyway and that will dirty this state. It would be redundant for most cases but I guess it does't hurt. Reviewed-by: Iago Toral Quiroga <ito...@igalia.com> Iago > /* Perform transitions to the subpass layout before any writes > have > * occurred. > */ _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev