aboutsummaryrefslogtreecommitdiff
path: root/layers/image.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2016-01-11 16:50:30 -0700
committerMark Lobodzinski <mark@lunarg.com>2016-01-12 08:18:17 -0700
commiteff562a86ffe1451d64fbf32bfdd190d5fb8903f (patch)
tree4bcacdc8bf252aca75ab8d1fc116777e79f71b60 /layers/image.cpp
parentd4f3f2d2ed0f71b00f14939259d8b37fd224a257 (diff)
downloadusermoji-eff562a86ffe1451d64fbf32bfdd190d5fb8903f.tar.xz
layers: Fix image layer format mutability validation
Diffstat (limited to 'layers/image.cpp')
-rw-r--r--layers/image.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/layers/image.cpp b/layers/image.cpp
index 658b5a1d..6da2f405 100644
--- a/layers/image.cpp
+++ b/layers/image.cpp
@@ -506,12 +506,13 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView(VkDevice device
skipCall |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, IMAGE_VIEW_CREATE_ERROR, "IMAGE", "%s", ss.str().c_str());
}
+ VkImageCreateFlags imageFlags = imageEntry->second.flags;
VkFormat imageFormat = imageEntry->second.format;
VkFormat ivciFormat = pCreateInfo->format;
VkImageAspectFlags aspectMask = pCreateInfo->subresourceRange.aspectMask;
// Validate VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT state
- if (pCreateInfo->flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) {
+ if (imageFlags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) {
// Format MUST be compatible (in the same format compatibility class) as the format the image was created with
if (vk_format_get_compatibility_class(imageFormat) != vk_format_get_compatibility_class(ivciFormat)) {
std::stringstream ss;