turnip: fix GMEM resolve in CmdNextSubpass
authorJonathan Marek <jonathan@marek.ca>
Tue, 21 Apr 2020 17:37:23 +0000 (13:37 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Apr 2020 23:04:34 +0000 (23:04 +0000)
The BLIT scissor must be set correctly for tu_store_gmem_attachment.

Fixes this deqp test:

dEQP-VK.pipeline.multisample_shader_builtin.sample_id.137_191_1.samples

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4666>

src/freedreno/vulkan/tu_cmd_buffer.c

index 7df98b34e05c252fc66f82395f7826d3143f4e70..11269c2a98cd1c5b0b0a2549521cffd9b1c5973b 100644 (file)
@@ -2344,13 +2344,15 @@ tu_CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents)
    tu_cond_exec_start(cs, CP_COND_EXEC_0_RENDER_MODE_GMEM);
 
    if (subpass->resolve_attachments) {
+      tu6_emit_blit_scissor(cmd, cs, true);
+
       for (unsigned i = 0; i < subpass->color_count; i++) {
          uint32_t a = subpass->resolve_attachments[i].attachment;
          if (a == VK_ATTACHMENT_UNUSED)
             continue;
 
          tu_store_gmem_attachment(cmd, cs, a,
-                                    subpass->color_attachments[i].attachment);
+                                  subpass->color_attachments[i].attachment);
 
          if (pass->attachments[a].gmem_offset < 0)
             continue;