diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-01-12 13:18:44 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-01-12 14:06:21 -0700 |
| commit | 0b97881760cda3830a0aee449050ccd17a16c4b1 (patch) | |
| tree | 210a17a6d4c12dd5c09a17e63dbb8f65ada58f26 /layers/image.cpp | |
| parent | 10f33c4ae930b5faae28c4909a81686af48477eb (diff) | |
| download | usermoji-0b97881760cda3830a0aee449050ccd17a16c4b1.tar.xz | |
layers: LX273, Fix accessMask validation for depth/stencil input attachments
When using an imageView of a depth/stencil image to populate a descriptor set,
the aspectMask must only include one bit and selects whether the imageView is
used for depth reads or stencil reads.
Diffstat (limited to 'layers/image.cpp')
| -rw-r--r-- | layers/image.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layers/image.cpp b/layers/image.cpp index 6da2f405..1281dfba 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -937,10 +937,10 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage( (uint64_t)commandBuffer, __LINE__, IMAGE_INVALID_IMAGE_ASPECT, "IMAGE", "%s", ss.str().c_str()); } if (vk_format_is_depth_and_stencil(srcFormat)) { - if (srcAspect != (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) { + if ((srcAspect != VK_IMAGE_ASPECT_DEPTH_BIT) && (srcAspect != VK_IMAGE_ASPECT_STENCIL_BIT)) { std::stringstream ss; - ss << "vkCmdBlitImage: Combination depth/stencil image formats must have both VK_IMAGE_ASPECT_DEPTH_BIT " - << "and VK_IMAGE_ASPECT_STENCIL_BIT set in both the srcImage and dstImage"; + ss << "vkCmdBlitImage: Combination depth/stencil image formats must have only one of VK_IMAGE_ASPECT_DEPTH_BIT " + << "and VK_IMAGE_ASPECT_STENCIL_BIT set in srcImage and dstImage"; skipCall |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, (uint64_t)commandBuffer, __LINE__, IMAGE_INVALID_IMAGE_ASPECT, "IMAGE", "%s", ss.str().c_str()); } |
