V-EZ
V-EZ copied to clipboard
Incorrect index in StreamDecoder::CmdClearAttachments
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);