tu/a7xx: Disable LRZ

Even with GMEM disabled LRZ is still interacted with in some cases.
So it has to be completely disabled until it is fixed.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>
This commit is contained in:
Danylo Piliaiev 2023-07-14 16:41:48 +02:00 committed by Marge Bot
parent 4b84ae157a
commit 83cb5c3491
4 changed files with 7 additions and 5 deletions

View file

@ -2291,6 +2291,8 @@ tu_CreateDevice(VkPhysicalDevice physicalDevice,
device->use_z24uint_s8uint =
physical_device->info->a6xx.has_z24uint_s8uint &&
!border_color_without_format;
device->use_lrz =
!TU_DEBUG(NOLRZ) && device->physical_device->info->chip == 6;
tu_gpu_tracepoint_config_variable();

View file

@ -371,6 +371,7 @@ struct tu_device
#endif
bool use_z24uint_s8uint;
bool use_lrz;
};
VK_DEFINE_HANDLE_CASTS(tu_device, vk.base, VkDevice, VK_OBJECT_TYPE_DEVICE)

View file

@ -615,8 +615,7 @@ tu_image_init(struct tu_device *device, struct tu_image *image,
}
const struct util_format_description *desc = util_format_description(image->layout[0].format);
if (util_format_has_depth(desc) && !TU_DEBUG(NOLRZ))
{
if (util_format_has_depth(desc) && device->use_lrz) {
/* Depth plane is the first one */
struct fdl_layout *layout = &image->layout[0];
unsigned width = layout->width0;

View file

@ -113,7 +113,7 @@ tu_lrz_init_state(struct tu_cmd_buffer *cmd,
const struct tu_image_view *view)
{
if (!view->image->lrz_height) {
assert(TU_DEBUG(NOLRZ) || !vk_format_has_depth(att->format));
assert(!cmd->device->use_lrz || !vk_format_has_depth(att->format));
return;
}
@ -162,7 +162,7 @@ tu_lrz_init_secondary(struct tu_cmd_buffer *cmd,
if (!has_gpu_tracking)
return;
if (TU_DEBUG(NOLRZ))
if (!cmd->device->use_lrz)
return;
if (!vk_format_has_depth(att->format))
@ -574,7 +574,7 @@ tu6_calculate_lrz_state(struct tu_cmd_buffer *cmd,
/* If depth test is disabled we shouldn't touch LRZ.
* Same if there is no depth attachment.
*/
if (a == VK_ATTACHMENT_UNUSED || !z_test_enable || TU_DEBUG(NOLRZ))
if (a == VK_ATTACHMENT_UNUSED || !z_test_enable || !cmd->device->use_lrz)
return gras_lrz_cntl;
if (!cmd->state.lrz.gpu_dir_tracking && !cmd->state.attachments) {