turnip: Don't disable LRZ in subpasses after the first in the easy case.

If it's the same depth/stencil attachment, then there's no need to turn
off LRZ just because the subpass changed.  Doesn't help gfxbench perf yet,
but will with !16014.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
This commit is contained in:
Emma Anholt 2022-04-18 10:41:01 -07:00 committed by Marge Bot
parent 7ba63f516a
commit 550975f229
1 changed files with 5 additions and 2 deletions

View File

@ -3374,6 +3374,7 @@ tu_CmdNextSubpass2(VkCommandBuffer commandBuffer,
TU_FROM_HANDLE(tu_cmd_buffer, cmd, commandBuffer);
const struct tu_render_pass *pass = cmd->state.pass;
struct tu_cs *cs = &cmd->draw_cs;
const struct tu_subpass *last_subpass = cmd->state.subpass;
const struct tu_subpass *subpass = cmd->state.subpass++;
@ -3382,8 +3383,10 @@ tu_CmdNextSubpass2(VkCommandBuffer commandBuffer,
* TODO: Improve this tracking for keeping the state of the past depth/stencil images,
* so if they become active again, we reuse its old state.
*/
cmd->state.lrz.valid = false;
cmd->state.dirty |= TU_CMD_DIRTY_LRZ;
if (last_subpass->depth_stencil_attachment.attachment != subpass->depth_stencil_attachment.attachment) {
cmd->state.lrz.valid = false;
cmd->state.dirty |= TU_CMD_DIRTY_LRZ;
}
tu_cond_exec_start(cs, CP_COND_EXEC_0_RENDER_MODE_GMEM);