anv: add missing handling for attachment locations in secondaries
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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 <lionel.g.landwerlin@intel.com>
Fixes: d2f7b6d5 ("anv: implement VK_KHR_dynamic_rendering_local_read")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40036>
This commit is contained in:
Lionel Landwerlin 2026-02-23 14:22:49 +02:00
parent 0ea485406c
commit 095c470d25

View file

@ -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