Skip to content

Commit

Permalink
Handle ASPECT_COLOR_BIT used with multi-plane formats. Closes #1708
Browse files Browse the repository at this point in the history
* This is spec'd as a simple alias for all planes, useful for creating image
  views.
  • Loading branch information
baldurk committed Feb 5, 2020
1 parent 5dc6996 commit 4d205eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion renderdoc/driver/vulkan/vk_resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,12 @@ struct ImageSubresourceRange
}
void Sanitise(const ImageInfo &info)
{
if(aspectMask & ~info.Aspects())
// VK_IMAGE_ASPECT_COLOR_BIT is an alias for "all planes" in multi-planar formats
if(aspectMask == VK_IMAGE_ASPECT_COLOR_BIT && (info.Aspects() & VK_IMAGE_ASPECT_PLANE_0_BIT))
{
aspectMask = info.Aspects();
}
else if(aspectMask & ~info.Aspects())
{
if(aspectMask != VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM)
{
Expand Down

0 comments on commit 4d205eb

Please sign in to comment.