mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
tu: Fix LRZ+FDM offset+secondaries
As the comment says, we need to have an image view in order to disable LRZ so that secondaries know it's disabled. Noticed by inspection. Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40935>
This commit is contained in:
parent
f4812dc11d
commit
f590e46b9d
1 changed files with 8 additions and 8 deletions
|
|
@ -229,14 +229,6 @@ tu_lrz_init_state(struct tu_cmd_buffer *cmd,
|
|||
if (!has_gpu_tracking && !clears_depth)
|
||||
return;
|
||||
|
||||
/* Reusing previous state doesn't work with FDM offset because the LRZ
|
||||
* image is offsetted.
|
||||
*/
|
||||
if ((view->image->vk.create_flags &
|
||||
VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT) &&
|
||||
!clears_depth)
|
||||
return;
|
||||
|
||||
/* We need to always have an LRZ view just to disable it if there is a
|
||||
* depth attachment, there are any secondaries, and GPU tracking is
|
||||
* enabled, in order not to rely on loadOp state which doesn't exist with
|
||||
|
|
@ -246,6 +238,14 @@ tu_lrz_init_state(struct tu_cmd_buffer *cmd,
|
|||
cmd->state.lrz.image_view = view;
|
||||
cmd->state.lrz.store = att->store;
|
||||
|
||||
/* Reusing previous state doesn't work with FDM offset because the LRZ
|
||||
* image is offsetted.
|
||||
*/
|
||||
if ((view->image->vk.create_flags &
|
||||
VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT) &&
|
||||
!clears_depth)
|
||||
return;
|
||||
|
||||
if (!clears_depth && !att->load)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue