layers:Update error enum for duplicate bindings
Add unique error enum for the case where descriptor bindings are
duplicated.
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index e07929d..71d140b 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -6719,6 +6719,7 @@
CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout) {
layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
+ // TODO: Need to validate create state prior to calling down the chain
VkResult result = dev_data->dispatch_table.CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout);
if (VK_SUCCESS == result) {
// TODOSC : Capture layout bindings set
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index 1148995..0c6747d 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -33,9 +33,8 @@
descriptor_count_ += p_create_info->pBindings[i].descriptorCount;
if (!binding_to_index_map_.emplace(p_create_info->pBindings[i].binding, i).second) {
log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT,
- reinterpret_cast<uint64_t &>(layout_), __LINE__, DRAWSTATE_INVALID_LAYOUT, "DS",
- "duplicated binding number in "
- "VkDescriptorSetLayoutBinding");
+ reinterpret_cast<uint64_t &>(layout_), __LINE__, VALIDATION_ERROR_02345, "DS",
+ "duplicated binding number in VkDescriptorSetLayoutBinding. %s", validation_error_map[VALIDATION_ERROR_02345]);
}
binding_to_global_start_index_map_[p_create_info->pBindings[i].binding] = global_index;
global_index += p_create_info->pBindings[i].descriptorCount ? p_create_info->pBindings[i].descriptorCount - 1 : 0;
diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt
index 2ead003..e7a7d98 100644
--- a/layers/vk_validation_error_database.txt
+++ b/layers/vk_validation_error_database.txt
@@ -2290,4 +2290,5 @@
VALIDATION_ERROR_02342~^~U~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '29.6. WSI Swapchain' which states 'If more than one member of pSwapchains was created from a display surface, all display surfaces referenced that refer to the same display must use the same display mode' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkQueuePresentKHR)~^~
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~^~U~^~Unknown~^~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_02345~^~Y~^~None~^~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)~^~
+