diff options
| author | Dave Houlton <daveh@lunarg.com> | 2018-05-04 12:37:44 -0600 |
|---|---|---|
| committer | Dave Houlton <daveh@lunarg.com> | 2018-05-07 13:16:34 -0400 |
| commit | ad795e77c3f4329312f9c815a6adf775cb330584 (patch) | |
| tree | 10abd2d8474a0b93829d5a5f1c9c5902979952cb /layers/buffer_validation.cpp | |
| parent | fecc8c7ae8e8861e8710554d1f15fa6d49a4ace4 (diff) | |
| download | usermoji-ad795e77c3f4329312f9c815a6adf775cb330584.tar.xz | |
layers: fix a multiplane imageview bug
Change-Id: If11059dca9716a90134d9d362351634fa07a8ecd
Diffstat (limited to 'layers/buffer_validation.cpp')
| -rw-r--r-- | layers/buffer_validation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layers/buffer_validation.cpp b/layers/buffer_validation.cpp index 6605b606..cb548703 100644 --- a/layers/buffer_validation.cpp +++ b/layers/buffer_validation.cpp @@ -3348,8 +3348,8 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr image_usage = chained_ivuci_struct->usage; } - // Validate VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT state - if (image_flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) { + // Validate VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT state, if view/image formats differ + if ((image_flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) && (image_format != view_format)) { if (FormatIsMultiplane(image_format)) { // View format must match the multiplane compatible format uint32_t plane = 3; // invalid |
