scripts: Add database error check to spec.py
authorTobin Ehlis <tobine@google.com>
Tue, 11 Oct 2016 15:37:19 +0000 (09:37 -0600)
committerTobin Ehlis <tobine@google.com>
Tue, 11 Oct 2016 15:37:19 +0000 (09:37 -0600)
Fix broken database line where delimiter was incorrect.
Add check to spec.py script to detect if database line doesn't contain
expected number of elements and report error in that case.

layers/spec.py
layers/vk_validation_error_database.txt

index 5967ff9..ceb7724 100644 (file)
@@ -233,6 +233,8 @@ class Specification:
                     continue
                 line = line.strip()
                 db_line = line.split(self.delimiter)
+                if len(db_line) != 4:
+                    print "ERROR: Bad database line doesn't have 4 elements: %s" % (line)
                 error_enum = db_line[0]
                 implemented = db_line[1]
                 testname = db_line[2]
index a4dcf94..50c3eca 100644 (file)
@@ -946,7 +946,7 @@ VALIDATION_ERROR_00936~^~Y~^~Unknown~^~For more information refer to Vulkan Spec
 VALIDATION_ERROR_00937~^~Y~^~Unknown~^~For more information refer to Vulkan Spec Section '13.2.4. Descriptor Set Updates' which states 'descriptorType must match the type of dstBinding within dstSet' (https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#descriptorsets-updates-consecutive)
 VALIDATION_ERROR_00938~^~Y~^~WriteDescriptorSetIntegrityCheck~^~For more information refer to Vulkan Spec Section '13.2.4. Descriptor Set Updates' which 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/xhtml/vkspec.html#descriptorsets-updates-consecutive)
 VALIDATION_ERROR_00939~^~U~^~Unknown~^~For more information refer to Vulkan Spec Section '13.2.4. Descriptor Set Updates' which 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 pointer to an array of descriptorCount valid VkDescriptorImageInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#descriptorsets-updates-consecutive)
-VALIDATION_ERROR_00940~^~Y~InvalidBufferViewObject~Unknown~^~For more information refer to Vulkan Spec Section '13.2.4. Descriptor Set Updates' which states 'If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pTexelBufferView must be a pointer to an array of descriptorCount valid VkBufferView handles' (https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#descriptorsets-updates-consecutive)
+VALIDATION_ERROR_00940~^~Y~^~InvalidBufferViewObject~Unknown~^~For more information refer to Vulkan Spec Section '13.2.4. Descriptor Set Updates' which states 'If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pTexelBufferView must be a pointer to an array of descriptorCount valid VkBufferView handles' (https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#descriptorsets-updates-consecutive)
 VALIDATION_ERROR_00941~^~U~^~Unknown~^~For more information refer to Vulkan Spec Section '13.2.4. Descriptor Set Updates' which states 'If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pBufferInfo must be a pointer to an array of descriptorCount valid VkDescriptorBufferInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#descriptorsets-updates-consecutive)
 VALIDATION_ERROR_00942~^~Y~^~SampleDescriptorUpdateError~^~For more information refer to Vulkan Spec Section '13.2.4. Descriptor Set Updates' which states 'If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and dstSet was not allocated with a layout that included immutable samplers for dstBinding with descriptorType, the sampler member of any given element of pImageInfo must be a valid VkSampler object' (https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#descriptorsets-updates-consecutive)
 VALIDATION_ERROR_00943~^~Y~^~ImageViewDescriptorUpdateError~^~For more information refer to Vulkan Spec Section '13.2.4. Descriptor Set Updates' which states 'If descriptorType is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView and imageLayout members of any given element of pImageInfo must be a valid VkImageView and VkImageLayout, respectively' (https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#descriptorsets-updates-consecutive)