mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
anv: Handle resolveImageLayout on dynamic rendering
Fixes: 5d9e8bc9be ("anv: implement the meat of VK_KHR_dynamic_rendering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5942
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14812>
This commit is contained in:
parent
1285319394
commit
ea0fa5c6bc
1 changed files with 21 additions and 2 deletions
|
|
@ -7043,8 +7043,16 @@ genX(cmd_buffer_setup_attachments_dynrender)(struct anv_cmd_buffer *cmd_buffer,
|
|||
}
|
||||
|
||||
if (!suspending && att->resolveMode != VK_RESOLVE_MODE_NONE) {
|
||||
state->attachments[i + info->colorAttachmentCount].image_view =
|
||||
struct anv_attachment_state *resolve_att =
|
||||
&state->attachments[i + info->colorAttachmentCount];
|
||||
resolve_att->image_view =
|
||||
anv_image_view_from_handle(att->resolveImageView);
|
||||
resolve_att->aux_usage =
|
||||
anv_layout_to_aux_usage(&cmd_buffer->device->info,
|
||||
resolve_att->image_view->image,
|
||||
VK_IMAGE_ASPECT_COLOR_BIT,
|
||||
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
|
||||
att->resolveImageLayout);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7055,8 +7063,19 @@ genX(cmd_buffer_setup_attachments_dynrender)(struct anv_cmd_buffer *cmd_buffer,
|
|||
uint32_t ds_idx = att_count - 1;
|
||||
|
||||
if (!suspending && d_or_s_att->resolveImageView) {
|
||||
state->attachments[ds_idx].image_view =
|
||||
struct anv_attachment_state *resolve_att =
|
||||
&state->attachments[ds_idx];
|
||||
resolve_att->image_view =
|
||||
anv_image_view_from_handle(d_or_s_att->resolveImageView);
|
||||
VkImageAspectFlagBits ds_aspect =
|
||||
(d_att ? VK_IMAGE_ASPECT_DEPTH_BIT : 0) |
|
||||
(s_att ? VK_IMAGE_ASPECT_STENCIL_BIT : 0);
|
||||
resolve_att->aux_usage =
|
||||
anv_layout_to_aux_usage(&cmd_buffer->device->info,
|
||||
resolve_att->image_view->image,
|
||||
ds_aspect,
|
||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,
|
||||
d_or_s_att->resolveImageLayout);
|
||||
ds_idx -= 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue