From 3669cc66c6ac9c5bfe849a618d330cec4a7a763c Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 6 Mar 2025 12:09:30 +0100 Subject: [PATCH] vulkan/state: Fix default input attachment map values When no input attachment location info is provided, the depth/stencil attachment are supposed to be NO_INDEX, not UNUSED, and we should also set the color_attachment_count to UNKNOWN. Signed-off-by: Boris Brezillon Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Lionel Landwerlin Part-of: --- src/vulkan/runtime/vk_graphics_state.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vulkan/runtime/vk_graphics_state.c b/src/vulkan/runtime/vk_graphics_state.c index 722a93c0b5b..f39877ad907 100644 --- a/src/vulkan/runtime/vk_graphics_state.c +++ b/src/vulkan/runtime/vk_graphics_state.c @@ -1071,8 +1071,8 @@ vk_input_attachment_location_state_init(struct vk_input_attachment_location_stat *ial = (struct vk_input_attachment_location_state) { .color_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, .color_attachment_count = MESA_VK_COLOR_ATTACHMENT_COUNT_UNKNOWN, - .depth_att = MESA_VK_ATTACHMENT_UNUSED, - .stencil_att = MESA_VK_ATTACHMENT_UNUSED, + .depth_att = MESA_VK_ATTACHMENT_NO_INDEX, + .stencil_att = MESA_VK_ATTACHMENT_NO_INDEX, }; if (!ial_info) return; @@ -1939,8 +1939,9 @@ static const struct vk_dynamic_graphics_state vk_default_dynamic_graphics_state }, .ial = { .color_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, - .depth_att = MESA_VK_ATTACHMENT_UNUSED, - .stencil_att = MESA_VK_ATTACHMENT_UNUSED, + .color_attachment_count = MESA_VK_COLOR_ATTACHMENT_COUNT_UNKNOWN, + .depth_att = MESA_VK_ATTACHMENT_NO_INDEX, + .stencil_att = MESA_VK_ATTACHMENT_NO_INDEX, }, .cal = { .color_map = { 0, 1, 2, 3, 4, 5, 6, 7 },