<div dir="auto">R-b</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 27, 2019, 10:16 AM Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Based on ANV.<br>
<br>
v2: - remove the if statement<br>
- update the comment<br>
<br>
Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com" target="_blank" rel="noreferrer">samuel.pitoiset@gmail.com</a>><br>
---<br>
src/amd/vulkan/radv_meta_resolve.c | 12 +++---------<br>
1 file changed, 3 insertions(+), 9 deletions(-)<br>
<br>
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c<br>
index ade5d438438..ca5cf22f0d7 100644<br>
--- a/src/amd/vulkan/radv_meta_resolve.c<br>
+++ b/src/amd/vulkan/radv_meta_resolve.c<br>
@@ -618,15 +618,6 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer)<br>
struct radv_meta_saved_state saved_state;<br>
enum radv_resolve_method resolve_method = RESOLVE_HW;<br>
<br>
- /* FINISHME(perf): Skip clears for resolve attachments.<br>
- *<br>
- * From the Vulkan 1.0 spec:<br>
- *<br>
- * If the first use of an attachment in a render pass is as a resolve<br>
- * attachment, then the loadOp is effectively ignored as the resolve is<br>
- * guaranteed to overwrite all pixels in the render area.<br>
- */<br>
-<br>
if (!subpass->has_resolve)<br>
return;<br>
<br>
@@ -637,6 +628,9 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer)<br>
if (dest_att.attachment == VK_ATTACHMENT_UNUSED)<br>
continue;<br>
<br>
+ /* Make sure to not clear color attachments after resolves. */<br>
+ cmd_buffer->state.attachments[dest_att.attachment].pending_clear_aspects = 0;<br>
+<br>
struct radv_image *dst_img = cmd_buffer->state.framebuffer->attachments[dest_att.attachment].attachment->image;<br>
struct radv_image *src_img = cmd_buffer->state.framebuffer->attachments[src_att.attachment].attachment->image;<br>
<br>
-- <br>
2.21.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank" rel="noreferrer">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a></blockquote></div>