From f21b65660965c7863fdf8949c72d7607d222ab16 Mon Sep 17 00:00:00 2001 From: John Zulauf Date: Wed, 17 Jan 2018 11:23:49 -0700 Subject: [PATCH] tests: Add validation for layout lifetime issues Add unit tests for valid usages that flag when descriptor set update operations are being performed with descriptor sets create from destroyed descriptor set layouts. The tests use overloaded VUIDs (generic "must be valid * handles) which need to be replaced (and unclaimed) with specific ones when they are added to the spec. VALIDATION_ERROR_15c00280 (write dst must be valid) -> write dst created from destroyed layout VALIDATION_ERROR_03207601 (copy dst must be valid) -> copy dst created from destroyed layout VALIDATION_ERROR_0322d201 (copy src must be valid) -> copy src created from destroyed layout Change-Id: Ic37a745120899c072e2e5d8ceb96c5d93074355e --- layers/vk_validation_error_database.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt index 5581de3..ed53c3a 100644 --- a/layers/vk_validation_error_database.txt +++ b/layers/vk_validation_error_database.txt @@ -292,10 +292,10 @@ VALIDATION_ERROR_032002b4~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDe VALIDATION_ERROR_032002b6~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-dstBinding-00347~^~core~^~The spec valid usage text states 'dstBinding must be a valid binding within dstSet' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstBinding-00347)~^~ VALIDATION_ERROR_032002b8~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-dstArrayElement-00348~^~core~^~The spec valid usage text states 'The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstArrayElement-00348)~^~ VALIDATION_ERROR_032002ba~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcSet-00349~^~core~^~The spec valid usage text states 'If srcSet is equal to dstSet, then the source and destination ranges of descriptors must not overlap, where the ranges may include array elements from consecutive bindings as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-00349)~^~ -VALIDATION_ERROR_03207601~^~Y~^~None~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-dstSet-parameter~^~core~^~The spec valid usage text states 'dstSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstSet-parameter)~^~implicit +VALIDATION_ERROR_03207601~^~Y~^~UpdateDestroyDescriptorSetLayout~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-dstSet-parameter~^~core~^~The spec valid usage text states 'dstSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstSet-parameter)~^~implicit VALIDATION_ERROR_0321c40d~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-pNext-pNext)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0322b00b~^~N~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0322d201~^~Y~^~None~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcSet-parameter~^~core~^~The spec valid usage text states 'srcSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-parameter)~^~implicit +VALIDATION_ERROR_0322d201~^~Y~^~UpdateDestroyDescriptorSetLayout~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcSet-parameter~^~core~^~The spec valid usage text states 'srcSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-parameter)~^~implicit VALIDATION_ERROR_0340009e~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079~^~core~^~The spec valid usage text states 'waitSemaphoreValuesCount must be the same value as VkSubmitInfo::waitSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079)~^~ VALIDATION_ERROR_034000a0~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080~^~core~^~The spec valid usage text states 'signalSemaphoreValuesCount must be the same value as VkSubmitInfo::signalSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080)~^~ VALIDATION_ERROR_03423201~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter~^~core~^~The spec valid usage text states 'If signalSemaphoreValuesCount is not 0, and pSignalSemaphoreValues is not NULL, pSignalSemaphoreValues must be a valid pointer to an array of signalSemaphoreValuesCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter)~^~implicit @@ -1591,7 +1591,7 @@ VALIDATION_ERROR_15c00278~^~Y~^~DSUpdateEmptyBinding~^~vkUpdateDescriptorSets~^~ VALIDATION_ERROR_15c0027a~^~N~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkWriteDescriptorSet-descriptorCount-00317~^~core~^~The spec valid usage text states 'All consecutive bindings updated via a single VkWriteDescriptorSet structure, except those with a descriptorCount of zero, must have identical descriptorType and stageFlags.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorCount-00317)~^~ VALIDATION_ERROR_15c0027c~^~N~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkWriteDescriptorSet-descriptorCount-00318~^~core~^~The spec valid usage text states 'All consecutive bindings updated via a single VkWriteDescriptorSet structure, except those with a descriptorCount of zero, must all either use immutable samplers or must all not use immutable samplers.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorCount-00318)~^~ VALIDATION_ERROR_15c0027e~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkWriteDescriptorSet-descriptorType-00319~^~core~^~The spec valid usage text states 'descriptorType must match the type of dstBinding within dstSet' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00319)~^~ -VALIDATION_ERROR_15c00280~^~Y~^~None~^~vkUpdateDescriptorSets~^~VUID-VkWriteDescriptorSet-dstSet-00320~^~core~^~The spec valid usage text states 'dstSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-dstSet-00320)~^~implicit +VALIDATION_ERROR_15c00280~^~Y~^~UpdateDestroyDescriptorSetLayout~^~vkUpdateDescriptorSets~^~VUID-VkWriteDescriptorSet-dstSet-00320~^~core~^~The spec valid usage text states 'dstSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-dstSet-00320)~^~implicit VALIDATION_ERROR_15c00282~^~Y~^~WriteDescriptorSetIntegrityCheck,DSUpdateOutOfBounds~^~vkUpdateDescriptorSets~^~VUID-VkWriteDescriptorSet-dstArrayElement-00321~^~core~^~The spec valid usage text states 'The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-dstArrayElement-00321)~^~ VALIDATION_ERROR_15c00284~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkWriteDescriptorSet-descriptorType-00322~^~core~^~The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pImageInfo must be a valid pointer to an array of descriptorCount valid VkDescriptorImageInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00322)~^~ VALIDATION_ERROR_15c00286~^~Y~^~InvalidBufferViewObject~^~vkUpdateDescriptorSets~^~VUID-VkWriteDescriptorSet-descriptorType-00323~^~core~^~The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pTexelBufferView must be a valid pointer to an array of descriptorCount valid VkBufferView handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00323)~^~ -- 2.7.4