From 98ec831d58739850135b6a72435b78bd2166cc6c Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 23 Feb 2026 14:22:49 +0200 Subject: [PATCH] anv: add missing handling for attachment locations in secondaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: dEQP-VK.renderpasses.dynamic_rendering.partial_secondary_cmd_buff.local_read.interaction_with_shader_object dEQP-VK.renderpasses.dynamic_rendering.partial_secondary_cmd_buff.local_read.remap_single_attachment_shader_object Signed-off-by: Lionel Landwerlin Fixes: d2f7b6d5 ("anv: implement VK_KHR_dynamic_rendering_local_read") Reviewed-by: Tapani Pälli (cherry picked from commit 095c470d253be9c6ce4e26f81d379558cd3560b1) Part-of: --- .pick_status.json | 2 +- src/intel/vulkan/genX_cmd_buffer.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 550478faa17..ae6a4f9095d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5304,7 +5304,7 @@ "description": "anv: add missing handling for attachment locations in secondaries", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "d2f7b6d5a7625f916baa9a9ec110a1799c045f49", "notes": null diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index e0479d10331..73f25a7e0c9 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -26,6 +26,7 @@ #include "anv_private.h" #include "anv_measure.h" +#include "vk_common_entrypoints.h" #include "vk_render_pass.h" #include "vk_synchronization.h" #include "vk_util.h" @@ -3917,12 +3918,12 @@ genX(BeginCommandBuffer)( vk_get_command_buffer_inheritance_as_rendering_resume(cmd_buffer->vk.level, pBeginInfo, gcbiar_data); + const VkCommandBufferInheritanceRenderingInfo *inheritance_info = + vk_get_command_buffer_inheritance_rendering_info(cmd_buffer->vk.level, + pBeginInfo); if (resume_info != NULL) { genX(CmdBeginRendering)(commandBuffer, resume_info); } else { - const VkCommandBufferInheritanceRenderingInfo *inheritance_info = - vk_get_command_buffer_inheritance_rendering_info(cmd_buffer->vk.level, - pBeginInfo); assert(inheritance_info); gfx->rendering_flags = inheritance_info->flags; @@ -3950,6 +3951,16 @@ genX(BeginCommandBuffer)( cmd_buffer->state.gfx.dirty |= ANV_CMD_DIRTY_RENDER_AREA | ANV_CMD_DIRTY_RENDER_TARGETS; } + + const VkRenderingAttachmentLocationInfo *att_loc_info = + inheritance_info ? + vk_find_struct_const(inheritance_info->pNext, + RENDERING_ATTACHMENT_LOCATION_INFO) : + NULL; + if (att_loc_info != NULL) { + vk_common_CmdSetRenderingAttachmentLocationsKHR( + commandBuffer, att_loc_info); + } } /* Emit the sample pattern at the beginning of the batch because the