From 3aef5b0ee63bd5685f15318724aab3c1cfcba594 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Tue, 20 Oct 2015 09:13:54 -0600 Subject: layers: Added TODO comments to DrawState for missing validation checks --- layers/draw_state.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 6e708d0c..82377d50 100755 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -895,6 +895,25 @@ static VkBool32 validateDescriptorSetImageView(VkDevice device, uint32_t writeDs } // update DS mappings based on ppUpdateArray +// TODO : copy updates are completely broken +// TODO : Validate that actual VkDescriptorInfo in pDescriptors matches type: +// pImageInfo array should be used for each descriptor if type is: +// VK_DESCRIPTOR_TYPE_SAMPLER: +// - uses sampler field of VkDescriptorImageInfo, +// VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: +// - uses sampler if binding doesn't use immutable sampler, +// - uses imageView & imageLayout +// VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, +// VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT +// - all use imageView & imageLayout +// pTexelBuffer array should be used for each descriptor if type is: +// VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER +// pBufferInfo array should be used for each descriptor if type is: +// VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, +// VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC +// TODO : Verify we validate this spec req: All consecutive bindings updated via a single +// VkWriteDescriptorSet structure must have identical descriptorType and stageFlags, +// and must all either use immutable samplers or none must use immutable samplers. static VkBool32 dsUpdate(layer_data* my_data, VkDevice device, VkStructureType type, uint32_t updateCount, const void* pUpdateArray) { const VkWriteDescriptorSet *pWDS = NULL; @@ -2332,6 +2351,12 @@ VK_LAYER_EXPORT void VKAPI vkCmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipe VkBool32 skipCall = VK_FALSE; layer_data* dev_data = get_my_data_ptr(get_dispatch_key(cmdBuffer), layer_data_map); GLOBAL_CB_NODE* pCB = getCBNode(dev_data, cmdBuffer); + // TODO : Validate dynamic offsets + // If any of the sets being bound include dynamic uniform or storage buffers, + // then pDynamicOffsets must include one element for each array element + // in each dynamic descriptor type binding in each set. + // dynamicOffsetCount is the total number of dynamic offsets provided, and + // must equal the total number of dynamic descriptors in the sets being bound if (pCB) { if (pCB->state == CB_UPDATE_ACTIVE) { if ((VK_PIPELINE_BIND_POINT_COMPUTE == pipelineBindPoint) && (pCB->activeRenderPass)) { -- cgit v1.2.3