Skip to content

Incorrect index in StreamDecoder::CmdClearAttachments #80

@publicrepo

Description

@publicrepo

I realize this project is not actively maintained, but commenting here anyway.

There appears to be a bug in StreamDecoder::CmdClearAttachments(). If there are two attachments, and caller requests one, the wrong index is used. The iterator index is used instead of the requested attachment index. The result is the wrong aspectMask is selected, eg. Color instead of Depth.

Original:
attachment.aspectMask = GetImageAspectFlags(m_framebuffer->GetAttachment(i)->GetImage()->GetCreateInfo().format);
Fix:
attachment.aspectMask = GetImageAspectFlags(m_framebuffer->GetAttachment( pAttachments[i].colorAttachment )->GetImage()->GetCreateInfo().format);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions