Ignore this patch, there is more to this than I thought. I'll see if I can find a proper solution and send a v2.
Iago On Fri, 2018-01-05 at 10:28 +0100, Iago Toral Quiroga wrote: > When multiview is active a subpass clear may only clear a subset of > the > attachment layers. Other subpasses in the same render pass may also > clear too and we want to honor those clears. This means that when > multiview > is active we cannot mark an attachment as already cleared after a > subpass > clear operation, unless we know that all subpasses share the same > view mask, > in which case only one clear is really required. > > Fixes work-in-progress CTS tests: > dEQP-VK.multiview.readback_implicit_clear.* > --- > src/intel/vulkan/anv_blorp.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/src/intel/vulkan/anv_blorp.c > b/src/intel/vulkan/anv_blorp.c > index 18fa4a4ae5..4575476240 100644 > --- a/src/intel/vulkan/anv_blorp.c > +++ b/src/intel/vulkan/anv_blorp.c > @@ -1249,7 +1249,20 @@ anv_cmd_buffer_clear_subpass(struct > anv_cmd_buffer *cmd_buffer) > } > } > > - att_state->pending_clear_aspects = 0; > + if (!cmd_state->subpass->view_mask) { > + att_state->pending_clear_aspects = 0; > + } else { > + bool all_subpasses_use_same_view_mask = true; > + for (uint32_t i = 0; i < cmd_state->pass->subpass_count; > i++) { > + if (cmd_state->pass->subpasses[i].view_mask != > + cmd_state->subpass->view_mask) { > + all_subpasses_use_same_view_mask = false; > + break; > + } > + } > + if (all_subpasses_use_same_view_mask) > + att_state->pending_clear_aspects = 0; > + } > } > > const uint32_t ds = cmd_state->subpass- > >depth_stencil_attachment.attachment; _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev