mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
tu/lrz: Disable LRZ when CmdSetRenderingAttachmentLocations is used
Same case as a drawcall not writing to some color attachments, but not trying to make LRZ work in cases where we can prove that LRZ can work. Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38034>
This commit is contained in:
parent
31cb49d6cb
commit
7ee9835475
3 changed files with 10 additions and 1 deletions
|
|
@ -6148,6 +6148,12 @@ tu_CmdSetRenderingAttachmentLocationsKHR(
|
|||
tu6_emit_mrt<CHIP>(cmd, cmd->state.subpass, &cmd->draw_cs);
|
||||
tu6_emit_render_cntl<CHIP>(cmd, cmd->state.subpass, &cmd->draw_cs, false);
|
||||
|
||||
/* Same case as a drawcall not writing to some color attachments, but not
|
||||
* trying to make LRZ work in cases where we can prove that LRZ can work.
|
||||
*/
|
||||
if (cmd->state.lrz.valid)
|
||||
tu_lrz_disable_write_for_rp(cmd, "CmdSetRenderingAttachmentLocations");
|
||||
|
||||
/* Because this is just a remapping and not a different "reference", there
|
||||
* doesn't need to be a barrier between accesses to the same attachment
|
||||
* with a different index. This is different from "classic" renderpasses.
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ tu_lrz_disable_reason(struct tu_cmd_buffer *cmd, const char *reason) {
|
|||
cmd->state.rp.lrz_disabled_at_draw);
|
||||
}
|
||||
|
||||
static inline void
|
||||
void
|
||||
tu_lrz_disable_write_for_rp(struct tu_cmd_buffer *cmd, const char *reason)
|
||||
{
|
||||
if (cmd->state.lrz.disable_write_for_rp)
|
||||
|
|
|
|||
|
|
@ -112,4 +112,7 @@ void
|
|||
tu_lrz_flush_valid_during_renderpass(struct tu_cmd_buffer *cmd,
|
||||
struct tu_cs *cs);
|
||||
|
||||
void
|
||||
tu_lrz_disable_write_for_rp(struct tu_cmd_buffer *cmd, const char *reason);
|
||||
|
||||
#endif /* TU_LRZ_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue