radv: only set the relevant image views for custom depth/stencil resolves

So the rendering state has correct information, like the aspects.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154>
This commit is contained in:
Samuel Pitoiset 2026-03-09 13:12:13 +01:00 committed by Marge Bot
parent 7c12efb370
commit a55b49569f

View file

@ -10395,19 +10395,18 @@ radv_CmdBeginCustomResolveEXT(VkCommandBuffer commandBuffer, const VkBeginCustom
color_atts[i].imageLayout = render->color_att[i].resolve_layout;
}
if (render->ds_att.resolve_mode == VK_RESOLVE_MODE_CUSTOM_BIT_EXT ||
render->ds_att.stencil_resolve_mode == VK_RESOLVE_MODE_CUSTOM_BIT_EXT) {
if (render->ds_att.resolve_mode == VK_RESOLVE_MODE_CUSTOM_BIT_EXT) {
struct radv_image_view *iview = render->ds_att.resolve_iview;
if (vk_format_has_depth(iview->vk.format)) {
depth_att.imageView = radv_image_view_to_handle(iview);
depth_att.imageLayout = render->ds_att.resolve_layout;
}
depth_att.imageView = radv_image_view_to_handle(iview);
depth_att.imageLayout = render->ds_att.resolve_layout;
}
if (vk_format_has_stencil(iview->vk.format)) {
stencil_att.imageView = radv_image_view_to_handle(iview);
stencil_att.imageLayout = render->ds_att.stencil_resolve_layout;
}
if (render->ds_att.stencil_resolve_mode == VK_RESOLVE_MODE_CUSTOM_BIT_EXT) {
struct radv_image_view *iview = render->ds_att.resolve_iview;
stencil_att.imageView = radv_image_view_to_handle(iview);
stencil_att.imageLayout = render->ds_att.stencil_resolve_layout;
}
VkRenderingInfo rendering_info = {