diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-08-01 15:51:39 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-08-03 19:00:48 -0600 |
| commit | 74b6afc51ed3f528c785529843099553821e854b (patch) | |
| tree | 50b6bcc1e95d90f7b75256f82e53634977766087 /layers/core_validation.cpp | |
| parent | f365d0ba03d87ae7f969e3d4f119e41415b4673a (diff) | |
| download | usermoji-74b6afc51ed3f528c785529843099553821e854b.tar.xz | |
layers: GH650, Fix D/S image layout validation
When an imageView of a depth/stencil image is used as a depth/stencil
framebuffer attachment, the aspectMask is ignored and both depth and
stencil image subresources are used. Validation was throwing errors
as only the specified aspectMask transition was tracked.
Change-Id: I4f45eec74040448ba3ed52b07268fab3b3cb9318
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 7ef5c9c8..7bc91f7d 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -3595,6 +3595,12 @@ void SetLayout(const layer_data *dev_data, GLOBAL_CB_NODE *pCB, VkImageView imag for (uint32_t k = 0; k < subRange.layerCount; k++) { uint32_t layer = subRange.baseArrayLayer + k; VkImageSubresource sub = {subRange.aspectMask, level, layer}; + // TODO: If ImageView was created with depth or stencil, transition both layouts as + // the aspectMask is ignored and both are used. Verify that the extra implicit layout + // is OK for descriptor set layout validation + if (subRange.aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) { + sub.aspectMask |= (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT); + } SetLayout(pCB, image, sub, layout); } } |
