From 095c470d253be9c6ce4e26f81d379558cd3560b1 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 Part-of: --- src/intel/vulkan/genX_cmd_buffer.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 48642a0b484..af691c02c5d 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" @@ -3874,12 +3875,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; @@ -3907,6 +3908,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