diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-10-25 07:43:27 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-10-25 21:01:49 -0600 |
| commit | 532eb6def55bd1247ef3d2be71bc846610501d4b (patch) | |
| tree | 3ea0c1d76f65f1238079fb15d72068ee707ea527 | |
| parent | 41b684a8fc0efb0951e0c8b2c8f52058d25ecb63 (diff) | |
| download | usermoji-532eb6def55bd1247ef3d2be71bc846610501d4b.tar.xz | |
layers:Update error enum for duplicate bindings
Add unique error enum for the case where descriptor bindings are
duplicated.
| -rw-r--r-- | layers/core_validation.cpp | 1 | ||||
| -rw-r--r-- | layers/descriptor_sets.cpp | 5 | ||||
| -rw-r--r-- | layers/vk_validation_error_database.txt | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index e07929da..71d140ba 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -6719,6 +6719,7 @@ VKAPI_ATTR VkResult VKAPI_CALL 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 11489955..0c6747d6 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -33,9 +33,8 @@ cvdescriptorset::DescriptorSetLayout::DescriptorSetLayout(debug_report_data *rep 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 2ead003f..e7a7d983 100644 --- a/layers/vk_validation_error_database.txt +++ b/layers/vk_validation_error_database.txt @@ -2290,4 +2290,5 @@ VALIDATION_ERROR_02341~^~U~^~Unknown~^~vkCreateSwapchainKHR~^~For more informati 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)~^~ + |
