From 4a2ad6dcb09ace4188fed8bf8e6ee262b678d6e5 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Tue, 15 Nov 2016 10:18:56 -0700 Subject: scripts:Update unique error enums as of 11/15/16 2 new checks and 1 deleted check. Cmd line was "python spec.py -update" --- layers/vk_validation_error_database.txt | 5 +++-- layers/vk_validation_error_messages.h | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt index 2ba8152a..0c1a7dd5 100644 --- a/layers/vk_validation_error_database.txt +++ b/layers/vk_validation_error_database.txt @@ -13,7 +13,7 @@ VALIDATION_ERROR_00001~^~N~^~Unknown~^~vkGetInstanceProcAddr~^~For more informat VALIDATION_ERROR_00002~^~N~^~Unknown~^~vkGetDeviceProcAddr~^~For more information refer to Vulkan Spec Section '3.1. Command Function Pointers' which states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#id-1.5.3.15)~^~ VALIDATION_ERROR_00003~^~N~^~Unknown~^~vkGetDeviceProcAddr~^~For more information refer to Vulkan Spec Section '3.1. Command Function Pointers' which states 'pName must be a null-terminated string' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#id-1.5.3.15)~^~The loader uses strcmp to dispatch and can fail to dispatch when name is not null-terminated. i.e. Validation layers are never called. VALIDATION_ERROR_00004~^~N~^~Unknown~^~vkCreateInstance~^~For more information refer to Vulkan Spec Section '3.2. Instances' which states 'pCreateInfo must be a pointer to a valid VkInstanceCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCreateInstance)~^~We check the sType correctly, but this can cause the loader to seg fault when pCreateInfo is a nullptr. -VALIDATION_ERROR_00005~^~N~^~Unknown~^~vkCreateInstance~^~For more information refer to Vulkan Spec Section '3.2. Instances' which states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCreateInstance)~^~A bad pointer can cause the loader to seg fault. Unfortunately, the validity of the allocator is hard to determine. The structure does not constain a sType and is not created by the Vulkan API. We could try to catch an access violation exception but the loader is written in C, which does not support exceptions. It's not clear if this could be validated in a layer before loader consumption. We could also try to install a signal handler in the loader. +VALIDATION_ERROR_00005~^~N~^~Unknown~^~vkCreateInstance~^~For more information refer to Vulkan Spec Section '3.2. Instances' which states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCreateInstance)~^~A bad pointer can cause the loader to seg fault. Unfortunately, the validity of the allocator is hard to determine. The structure does not contain an sType and is not created by the Vulkan API. We could try to catch an access violation exception but the loader is written in C, which does not support exceptions. It's not clear if this could be validated in a layer before loader consumption. We could also try to install a signal handler in the loader. VALIDATION_ERROR_00006~^~N~^~Unknown~^~vkCreateInstance~^~For more information refer to Vulkan Spec Section '3.2. Instances' which states 'pInstance must be a pointer to a VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCreateInstance)~^~How should this be validated? Aside from insidious type-casting, the type will be validated by the compiler. The instance has not been created yet and will likely have no presence in the layers. VALIDATION_ERROR_00007~^~N~^~Unknown~^~vkCreateInstance~^~For more information refer to Vulkan Spec Section '3.2. Instances' which states 'sType must be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkInstanceCreateInfo)~^~TBD in parameter validation layer. VALIDATION_ERROR_00008~^~N~^~Unknown~^~vkCreateInstance~^~For more information refer to Vulkan Spec Section '3.2. Instances' which states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkInstanceCreateInfo)~^~TBD in parameter validation layer. @@ -1672,7 +1672,6 @@ VALIDATION_ERROR_01719~^~U~^~Unknown~^~vkAllocateMemory~^~For more information r VALIDATION_ERROR_01720~^~N~^~Unknown~^~vkAllocateMemory~^~For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)~^~TBD in parameter validation layer. VALIDATION_ERROR_01721~^~N~^~Unknown~^~vkAllocateMemory~^~For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)~^~TBD in parameter validation layer. VALIDATION_ERROR_01722~^~U~^~Unknown~^~vkAllocateMemory~^~For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)~^~ -VALIDATION_ERROR_01723~^~U~^~Unknown~^~vkAllocateMemory~^~For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handleType must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)~^~ VALIDATION_ERROR_01724~^~U~^~Unknown~^~vkGetMemoryWin32HandleNV~^~For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handleType must be a flag specified in VkExportMemoryAllocateInfoNV::handleTypes when allocating memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkGetMemoryWin32HandleNV)~^~ VALIDATION_ERROR_01725~^~U~^~Unknown~^~vkGetMemoryWin32HandleNV~^~For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkGetMemoryWin32HandleNV)~^~ VALIDATION_ERROR_01726~^~U~^~Unknown~^~vkGetMemoryWin32HandleNV~^~For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkGetMemoryWin32HandleNV)~^~ @@ -2291,4 +2290,6 @@ VALIDATION_ERROR_02342~^~U~^~Unknown~^~vkQueuePresentKHR~^~For more information VALIDATION_ERROR_02343~^~U~^~Unknown~^~vkCmdDebugMarkerEndEXT~^~For more information refer to Vulkan Spec Section '32.1.2. Command Buffer Markers' which states 'If the matching vkCmdDebugMarkerBeginEXT command was in a secondary command buffer, the vkCmdDebugMarkerEndEXT must be in the same commandBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdDebugMarkerEndEXT)~^~ VALIDATION_ERROR_02344~^~U~^~Unknown~^~vkCreateImage~^~For more information refer to Vulkan Spec Section '11.3. Images' which states 'If imageType is VK_IMAGE_TYPE_3D, arrayLayers must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkImageCreateInfo)~^~ VALIDATION_ERROR_02345~^~Y~^~DuplicateDescriptorBinding~^~vkCreateDescriptorSetLayout~^~For more information refer to Vulkan Spec Section '13.2.1. Descriptor Set Layout' which states 'The VkDescriptorSetLayoutBinding::binding members of the elements of the pBindings array must each have different values.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkDescriptorSetLayoutCreateInfo)~^~ +VALIDATION_ERROR_02346~^~U~^~Unknown~^~vkAllocateMemory~^~For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handleType must not have more than one bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)~^~ +VALIDATION_ERROR_02347~^~U~^~Unknown~^~vkAllocateMemory~^~For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handle must be a valid handle to memory, obtained as specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)~^~ diff --git a/layers/vk_validation_error_messages.h b/layers/vk_validation_error_messages.h index 9d786cf0..cf721810 100644 --- a/layers/vk_validation_error_messages.h +++ b/layers/vk_validation_error_messages.h @@ -1693,7 +1693,6 @@ enum UNIQUE_VALIDATION_ERROR_CODE { VALIDATION_ERROR_01720 = 1720, VALIDATION_ERROR_01721 = 1721, VALIDATION_ERROR_01722 = 1722, - VALIDATION_ERROR_01723 = 1723, VALIDATION_ERROR_01724 = 1724, VALIDATION_ERROR_01725 = 1725, VALIDATION_ERROR_01726 = 1726, @@ -2312,7 +2311,9 @@ enum UNIQUE_VALIDATION_ERROR_CODE { VALIDATION_ERROR_02343 = 2343, VALIDATION_ERROR_02344 = 2344, VALIDATION_ERROR_02345 = 2345, - VALIDATION_ERROR_MAX_ENUM = 2346, + VALIDATION_ERROR_02346 = 2346, + VALIDATION_ERROR_02347 = 2347, + VALIDATION_ERROR_MAX_ENUM = 2348, }; // Mapping from unique validation error enum to the corresponding error message @@ -3983,7 +3984,6 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_01720, "For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)"}, {VALIDATION_ERROR_01721, "For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)"}, {VALIDATION_ERROR_01722, "For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)"}, - {VALIDATION_ERROR_01723, "For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handleType must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)"}, {VALIDATION_ERROR_01724, "For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handleType must be a flag specified in VkExportMemoryAllocateInfoNV::handleTypes when allocating memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkGetMemoryWin32HandleNV)"}, {VALIDATION_ERROR_01725, "For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkGetMemoryWin32HandleNV)"}, {VALIDATION_ERROR_01726, "For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkGetMemoryWin32HandleNV)"}, @@ -4602,4 +4602,6 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_02343, "For more information refer to Vulkan Spec Section '32.1.2. Command Buffer Markers' which states 'If the matching vkCmdDebugMarkerBeginEXT command was in a secondary command buffer, the vkCmdDebugMarkerEndEXT must be in the same commandBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdDebugMarkerEndEXT)"}, {VALIDATION_ERROR_02344, "For more information refer to Vulkan Spec Section '11.3. Images' which states 'If imageType is VK_IMAGE_TYPE_3D, arrayLayers must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkImageCreateInfo)"}, {VALIDATION_ERROR_02345, "For more information refer to Vulkan Spec Section '13.2.1. Descriptor Set Layout' which states 'The VkDescriptorSetLayoutBinding::binding members of the elements of the pBindings array must each have different values.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkDescriptorSetLayoutCreateInfo)"}, + {VALIDATION_ERROR_02346, "For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handleType must not have more than one bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)"}, + {VALIDATION_ERROR_02347, "For more information refer to Vulkan Spec Section '10.2. Device Memory' which states 'handle must be a valid handle to memory, obtained as specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkExternalMemoryHandleTypeFlagBitsNV)"}, }; -- cgit v1.2.3