diff options
author | Samuel Pitoiset <[email protected]> | 2019-07-04 08:54:48 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-07-04 12:22:43 +0200 |
commit | 8a425e057d7e47439d95c3be4405858ec66df3e4 (patch) | |
tree | 519fc1c78dead947441b673c679ed903bdec2dfc | |
parent | 0cc02c9ea6198d498d8cebad524c3875d2d692f0 (diff) |
radv: fix potential crash in the compute resolve path
If the destination attachment is UNUSED.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_meta_resolve_cs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_meta_resolve_cs.c b/src/amd/vulkan/radv_meta_resolve_cs.c index 7d3cc166e0d..13c61509b21 100644 --- a/src/amd/vulkan/radv_meta_resolve_cs.c +++ b/src/amd/vulkan/radv_meta_resolve_cs.c @@ -917,12 +917,13 @@ radv_cmd_buffer_resolve_subpass_cs(struct radv_cmd_buffer *cmd_buffer) for (uint32_t i = 0; i < subpass->color_count; ++i) { struct radv_subpass_attachment src_att = subpass->color_attachments[i]; struct radv_subpass_attachment dst_att = subpass->resolve_attachments[i]; - struct radv_image_view *src_iview = fb->attachments[src_att.attachment].attachment; - struct radv_image_view *dst_iview = fb->attachments[dst_att.attachment].attachment; if (dst_att.attachment == VK_ATTACHMENT_UNUSED) continue; + struct radv_image_view *src_iview = fb->attachments[src_att.attachment].attachment; + struct radv_image_view *dst_iview = fb->attachments[dst_att.attachment].attachment; + VkImageResolve region = { .extent = (VkExtent3D){ fb->width, fb->height, 0 }, .srcSubresource = (VkImageSubresourceLayers) { |