diff options
| author | Tobin Ehlis <tobin@lunarg.com> | 2015-10-20 09:13:54 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobin@lunarg.com> | 2015-10-22 11:12:27 -0600 |
| commit | 3aef5b0ee63bd5685f15318724aab3c1cfcba594 (patch) | |
| tree | 19dc963df5fcdd14ffca9813848406aca9ebcf8b | |
| parent | 39326fc6cbaf0409b30739a40fd8bcf6d0bf4ad5 (diff) | |
| download | usermoji-3aef5b0ee63bd5685f15318724aab3c1cfcba594.tar.xz | |
layers: Added TODO comments to DrawState for missing validation checks
| -rwxr-xr-x | layers/draw_state.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
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)) { |
