mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 16:50:10 +01:00
tu: Do not flush ccu in clear/blits during renderpass
For clear/blits ccu flush not only worse for perf, but also messes up
flush_bits when executed in a conditional set of commands.
We already don't flush for 3d blits.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6419
Fixes: 487aa807bd
("tu: Rewrite flushing to use barriers")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16352>
This commit is contained in:
parent
66888d5121
commit
187d3df52c
2 changed files with 5 additions and 1 deletions
|
|
@ -333,7 +333,9 @@ r2d_setup(struct tu_cmd_buffer *cmd,
|
|||
{
|
||||
assert(samples == VK_SAMPLE_COUNT_1_BIT);
|
||||
|
||||
tu_emit_cache_flush_ccu(cmd, cs, TU_CMD_CCU_SYSMEM);
|
||||
if (!cmd->state.pass) {
|
||||
tu_emit_cache_flush_ccu(cmd, cs, TU_CMD_CCU_SYSMEM);
|
||||
}
|
||||
|
||||
r2d_setup_common(cmd, cs, format, aspect_mask, blit_param, clear, ubwc, false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,6 +159,8 @@ tu_emit_cache_flush_ccu(struct tu_cmd_buffer *cmd_buffer,
|
|||
enum tu_cmd_flush_bits flushes = cmd_buffer->state.cache.flush_bits;
|
||||
|
||||
assert(ccu_state != TU_CMD_CCU_UNKNOWN);
|
||||
/* It's unsafe to flush inside condition because we clear flush_bits */
|
||||
assert(!cs->cond_flags);
|
||||
|
||||
/* Changing CCU state must involve invalidating the CCU. In sysmem mode,
|
||||
* the CCU may also contain data that we haven't flushed out yet, so we
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue