mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
turnip: move up LRZ invalidate in CmdClearAttachments
There is an early return if cmd->state.predication_active is true, so do the LRZ invalidate before that. Fixes:2f79e00664("turnip: disable LRZ on vkCmdClearAttachments()") Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7899> (cherry picked from commitf24358e002)
This commit is contained in:
parent
4c32042db7
commit
e9407a0a4f
2 changed files with 8 additions and 8 deletions
|
|
@ -751,7 +751,7 @@
|
|||
"description": "turnip: move up LRZ invalidate in CmdClearAttachments",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "2f79e0066405f80c3244d1cc814bc6a51d1d581a"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2135,6 +2135,13 @@ tu_CmdClearAttachments(VkCommandBuffer commandBuffer,
|
|||
*/
|
||||
tu_emit_cache_flush_renderpass(cmd, cs);
|
||||
|
||||
for (uint32_t j = 0; j < attachmentCount; j++) {
|
||||
if ((pAttachments[j].aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT) == 0)
|
||||
continue;
|
||||
cmd->state.lrz.valid = false;
|
||||
cmd->state.dirty |= TU_CMD_DIRTY_LRZ;
|
||||
}
|
||||
|
||||
/* vkCmdClearAttachments is supposed to respect the predicate if active.
|
||||
* The easiest way to do this is to always use the 3d path, which always
|
||||
* works even with GMEM because it's just a simple draw using the existing
|
||||
|
|
@ -2158,13 +2165,6 @@ tu_CmdClearAttachments(VkCommandBuffer commandBuffer,
|
|||
tu_cond_exec_start(cs, CP_COND_EXEC_0_RENDER_MODE_SYSMEM);
|
||||
tu_clear_sysmem_attachments(cmd, attachmentCount, pAttachments, rectCount, pRects);
|
||||
tu_cond_exec_end(cs);
|
||||
|
||||
for (uint32_t j = 0; j < attachmentCount; j++) {
|
||||
if ((pAttachments[j].aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT) == 0)
|
||||
continue;
|
||||
cmd->state.lrz.valid = false;
|
||||
cmd->state.dirty |= TU_CMD_DIRTY_LRZ;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue