diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index e54f4186f47..ea413da0be5 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -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 = {