tu: Don't enable FDM when there is FDM attachment is UNUSED

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41539>
This commit is contained in:
Danylo Piliaiev 2026-05-13 14:23:38 +02:00 committed by Marge Bot
parent 4938a80c32
commit 1323939f63

View file

@ -1145,7 +1145,8 @@ tu_CreateRenderPass2(VkDevice _device,
const VkRenderPassFragmentDensityMapCreateInfoEXT *fdm_info =
vk_find_struct_const(pCreateInfo->pNext,
RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT);
if (fdm_info && !tu_render_pass_disable_fdm(device, pass)) {
if (fdm_info && fdm_info->fragmentDensityMapAttachment.attachment != VK_ATTACHMENT_UNUSED &&
!tu_render_pass_disable_fdm(device, pass)) {
pass->fragment_density_map.attachment =
fdm_info->fragmentDensityMapAttachment.attachment;
pass->has_fdm = true;