v3dv: fix tile buffer loading

So we do what we actually state in the comment. Particularly, the load
operation only affects the first subpass that uses the attachment,
after that we always want to load, but we were only doing that for
attachments marked as CLEAR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-01-10 11:52:03 +01:00 committed by Marge Bot
parent 22e431e626
commit 8a5135e6b3
1 changed files with 3 additions and 3 deletions

View File

@ -698,10 +698,10 @@ emit_loads(struct v3dv_cmd_buffer *cmd_buffer,
* After that, we always want to load so we don't lose any rendering done
* by a previous subpass to the same attachment.
*/
assert(state->job->first_subpass >= attachment_state->first_subpass);
bool needs_load =
attachment->desc.loadOp == VK_ATTACHMENT_LOAD_OP_LOAD ||
(attachment->desc.loadOp == VK_ATTACHMENT_LOAD_OP_CLEAR &&
state->job->first_subpass > attachment_state->first_subpass);
state->job->first_subpass > attachment_state->first_subpass ||
attachment->desc.loadOp == VK_ATTACHMENT_LOAD_OP_LOAD;
if (needs_load) {
struct v3dv_image_view *iview = framebuffer->attachments[attachment_idx];