radv: Handle VK_ATTACHMENT_UNUSED in color attachments.
This just sets them to INVALID COLOR, instead of shifting the
attachments together.
This also fixes a number of cases where we use it first and only
then check if it is VK_ATTACHMENT_UNUSED.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Fixes: f4e499ec79
"radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -618,11 +618,14 @@ radv_cmd_buffer_resolve_subpass_fs(struct radv_cmd_buffer *cmd_buffer)
|
||||
for (uint32_t i = 0; i < subpass->color_count; ++i) {
|
||||
VkAttachmentReference src_att = subpass->color_attachments[i];
|
||||
VkAttachmentReference dest_att = subpass->resolve_attachments[i];
|
||||
|
||||
if (src_att.attachment == VK_ATTACHMENT_UNUSED ||
|
||||
dest_att.attachment == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
|
||||
struct radv_image_view *dest_iview = cmd_buffer->state.framebuffer->attachments[dest_att.attachment].attachment;
|
||||
struct radv_image *dst_img = dest_iview->image;
|
||||
struct radv_image_view *src_iview = cmd_buffer->state.framebuffer->attachments[src_att.attachment].attachment;
|
||||
if (dest_att.attachment == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
|
||||
if (dst_img->surface.dcc_size) {
|
||||
radv_initialize_dcc(cmd_buffer, dst_img, 0xffffffff);
|
||||
|
Reference in New Issue
Block a user