aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
AgeCommit message (Collapse)Author
2017-06-06layers: Move CV to use new extension helperMark Lobodzinski
Change-Id: Idb18d0f358fd359c1c5862fba394c833e2fa13f1
2017-05-24layers:Migrate to new validation error IDsTobin Ehlis
Migrate valid usage IDs to new numbers based on the string IDs that are integrated into the spec build process. The formula for mapping the string ID to the new VALIDATION_ERROR enum value is in vuid_mapping.py script. The mapping between the old IDs and the new IDs is in the file "old_vuid_to_new_mapping.txt." The vk_validation_error_database.txt file has the new IDs as well as the string-based ID for each element and a column indicating if the valid usage is in the core spec or if it requires extension(s) and is therefore in the extension spec. The error messages were shortened and no longer include a section reference. Now the link goes directly to the line in the spec where the valid usage text occurs. The base of the spec link is the core spec unless the VU requires an extension in which case the spec with all extensions is used as the base.
2017-05-17layers: Transition all to HandleToUint64Petr Kraus
Mostly automatic (i.e. probably missed some cases)
2017-05-17layers: Remove swapchain image special case from ValidateBarriersChris Forbes
Swapchain images have been added to the images table for a long time. The checks below were also inconsistent about using the extracted data or just going to image_data.
2017-05-17layers: Validate shared presentable image casesTobin Ehlis
Add validation support for shared presentable images as defined in VK_KHR_shared_presentable_image extension. For all uses of shared presentable images, make sure that the image is appropriately in VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout. For two cases where no layout validation was performed, added a TODO note (vkCmdBlitImage, vkCmdResolveImage) as basic layout validation should first be added upstream. Also locked the layout in the case where a front-buffered image is presented and then flag an error if an attempt is made to transition the image layout after that point. Change-Id: I06cda727e3a7f56ccff4bffd7503b5ff73e8a795
2017-05-09layers: Remove default ctors for {Image,}SamplerDescriptorChris Forbes
These just added confusion; we already support the !immut case in the other ctor. V2: ImageSamplerDescriptor remaining ctor was buggy.
2017-05-09layers: Don't start ImageSamplerDescriptor w/ immut as updated.Chris Forbes
This descriptor is NOT initially updated; it's invalid until the Image component is set.
2017-05-09layers: Don't skip validating image part of combined image+immut samplerChris Forbes
This early out was from another time...
2017-05-08layers:Immutable samplers are updated at creationTobin Ehlis
Fixes #1741 Descriptors with immutable samplers are updated at the time they're created. Set update bool for descriptor sets with immutable samplers at the time they're created. This will prevent false positives.
2017-05-03layers: Make device extension enables consistentChris Forbes
I want to get rid of the "_enable" suffix everywhere to allow for a second instance of the same structure to represent the /supported/ set for better diagnostics.
2017-04-24layers: Banish 'skip_call' once and foreverMark Lobodzinski
Except for swapchain.cpp, which is undergoing a merge into CV. Change-Id: I8b18518ef662a9a11a808ef3dce1b8f60d858fb3
2017-04-22layers: Switch CV over to layer object typesMark Lobodzinski
Convert internal uses of VkDebugReportObjectTypeEXT for the core- validation layer to use the internal layer-povided object-type. Also modified tests for changed error text. Change-Id: If080f4bf452ead0c6fecc648309bfd95b27fc0ce
2017-04-14layers:Add image layout validation for descriptorsTobin Ehlis
This change adds validation to make sure that an image layout at the time the image is used in a descriptor matches the layout that was given when the descriptor was updated. Because image view covers a range of mip levels, loop over each level and verify layouts one at a time. Also Updated a number of validate functions to use cont ptr params for data that they aren't changing.
2017-03-29layers: Rename format utils, strip VkDave Houlton
Change-Id: I4d192db22c51d2e9224b74487bfd5d6a58405028
2017-03-29layers: refactor layer utilsDave Houlton
Split format-related helper fxns out of vk_layer_utils.cpp into a new file vk_format_utils.cpp. Remove the duplicated fxns in the render framework and share the new format utils across both projects. Rename the util fxns into CamelCase per coding std. Change-Id: I0f9a34bc5931dfca085dfdc8d4800664aec526cf
2017-03-27layers: VK_KHR_maintenance1 false positivesMike Schuchardt
Skip checks that no longer apply when VK_KHR_maintenance1 is enabled. Change-Id: I84d0fe889d0e567045aeb7fa7463dd2ec0d56789
2017-03-15layers:Connect VK_EXT_validation_flagsTobin Ehlis
Add support for VK_EXT_validation_flags in core_validation. The only enum currently supported is VK_VALIDATION_CHECK_ALL_EXT which disables all existing flags in validation. Note that most checks are still not guarded by flags so that option will only disable the checks that are guarded by flags. In testing this I found a bug with AllocateDescriptorSets() where common state was not updated with the flag enabled so this includes a fix for that issue as well.
2017-03-14tests: Fix DSBufferInfo unexpected errorsJeremy Hayes
Change-Id: I594243d7879ed9999571c4f185724ba42d2ed7b6
2017-03-13layers: Add GetNextValidBinding function to CVMark Lobodzinski
Change-Id: Ifaa7aea1c7569ffaf5d417a1cd5caadaa38c96b0
2017-03-13layers: Move desc set helper to descriptorset moduleMark Lobodzinski
Change-Id: I695cf51b6fa27df7585582f545c0077efb9fd432
2017-02-10layers: Consolidate GetPhysicalDevice* accessorsMark Lobodzinski
Simplified core_validation->descriptor_sets/buffer_validation. Change-Id: I6921ac458bce5899e8bd60145bfaa0e0f5e8a2ac
2017-02-08layers:Add using statements for layer_dataTobin Ehlis
Add "using core_validation::layer_data;" to descriptor and buffer validation files. This cleans up the code without adding any confusion or name collisions.
2017-02-08layers:Rename get* utility functionsTobin Ehlis
Rename get* helper functions to have capital first letter in-line with coding standard.
2017-02-06layers:Add buffer descriptor device limit checksTobin Ehlis
This adds missing checks for max range for storage and uniform buffer updates. Also update database file.
2017-01-26repo: Clang-format LVL source files using GoogleMark Lobodzinski
Switch clang-format standard from the LLVM style to the Google style for more consistency. Change-Id: I247c4abc275d7873a91522e1e234198adaa24033
2017-01-26repo: Clang-format c/cpp/h LVL files using LLVMMark Lobodzinski
Bring all source files in the repo up to date with consistent coding style/standard. Change-Id: Iceedbc17109974d3a0437fc4995441c9ad7e0c23
2017-01-04layers:Remove redundant checksTobin Ehlis
Remove descriptor set check to make sure that src & dest descriptor sets of copy update are valid. Object_tracker already verifies this.
2017-01-04layers:Add TODO comments for valid usage updatesTobin Ehlis
Note a few unique error enum duplicates that should have their own unique ids added through spec updates.
2017-01-04scripts:Exceptions for duplicate unique idsTobin Ehlis
Added a number of exceptions for duplicate uses of unique error enums that are valid. Also added some comments to a few cases that need new unique ids.
2016-12-29layers:Don't pass active binding set aroundTobin Ehlis
The active bindings set was being passed around but the data is only used in a couple places and an alternate form of it is available in the binding->requirement map. Also, the binding set was wrong in that it stored bindings for all bound sets at draw time, but was being used to check bindings for individual sets.
2016-12-23layers:Remove redundant checkTobin Ehlis
Remove valid buffer check from descriptor_sets.cpp that's already handled in object_tracker.
2016-12-23layer:Add unique error ids for memory bindingTobin Ehlis
Update all of the cases to validate that memory is bound to non-sparse images and buffers to use the correct unique error id.
2016-12-23layers:Add valid usage error idsTobin Ehlis
Update descriptor set cases where no memory bound to buffer or image to use the correct respective unique error ids.
2016-12-23layers:Split ValidateAndUpdateDrawState()Tobin Ehlis
Split ValidateAndUpdateDrawState() to isolate validation and state updates into ValidateDrawState() & UpdateDrawState() functions. Refactored CmdDraw() to use Pre/Post patter with all state updates now occurring in the Post function. Made some initial updates to other Draw/Dispatch functions to call each new function in-line, but will refactor these functions to use Pre/Post in follow-on commits.
2016-12-19layers: Fix size_t-int cast warning in descriptor_setsJamie Madill
Discovered in VS2015. Change-Id: I2a42209a9ee9bd0e8f3da21c0f1a613315d5a6ce
2016-12-15layers:Refactor consecutive descriptor countTobin Ehlis
Refactor GetConsecutiveDescriptorCountFromBinding() to use the fact that bindings are now stored in-order. No longer need to chase binding order through the map, just get current binding index and then parse rest of the binding array in-order.
2016-12-15layers:Store DescriptorSetLayout class in-orderTobin Ehlis
Sort the bindings in the internal data structure of the DescriptorSetLayout class so that they're stored in binding order. This commit keeps the interface and mapping structures the same. Further commits will take more use of the fact that layout is now stored in binding order.
2016-12-02layers: Fix Windows buildMark Lobodzinski
STL min/max functions were causing windows build failures. Change-Id: Ia153a5d6a3d245b645b5f829c3f076c023d865f1
2016-12-02layers:Handle consecutive descriptor updatesTobin Ehlis
Fixes #1165 According to spec descriptor updates should roll over to the next binding number. If bindings were out of order, this was broken in validation. This fix corrects validation and state update for out-of-order descriptor bindings by checking consecutive updates based on correct binding count for consecutive bindings and by performing updates on a per-binding basis, making sure to roll update over to the correct next binding. Also update the error message, related negative test, and database file.
2016-11-23layers:Unique enums for vkAllocateDescriptorSetsTobin Ehlis
Add appropriate unique error enums to the code for allocating descriptor sets from a pool without enough sets left and without enough descriptors left. These were already flagged as implemented but the enums hadn't been added to the code.
2016-11-21layers:Remove redundant periodsTobin Ehlis
These error messages are all amended to error messages that already include a period at the end so deleting the extra periods.
2016-11-21layers:Check for update of empty bindingTobin Ehlis
Validation error if descriptor update performed on an empty binding.
2016-11-21layers:Warn on cmd buffer invalidateTobin Ehlis
From Mikko Strandborg When a resource gets deleted, any command buffer that references it gets invalidated, and an error gets thrown whenever that command buffer is submitted. However, for a developer, it's quite hard to deduce what exactly caused that to happen. This patch emits a warning whenever a command buffer that's in CB_RECORDING state (meaning that it has had its vkBeginCommandBuffer called but not End). This way the developer can set a breakpoint on that to see exactly what causes the buffer to be invalidated. Destroying a resource that's being used in an open command buffer is almost certainly a bug, but there might still be cases where it might be valid behavior (for example, when the application decides to abort an operation), therefore it's not an error but a warning instead.
2016-11-17layers:Rename BUFFER_NODE->BUFFER_STATETobin Ehlis
2016-11-17layers:Check all memory bindingsTobin Ehlis
There are a few places in the code where we assume that an image or buffer doesn't have a sparse binding. These cases break with sparse bindings. To fix I added a function to BINDING class to retrieve all memory bindings and then updated a few spots with bad assumption to make use of this new GetBoundMemory() function.
2016-11-17layers:Fix descriptor dynamic offset handlingTobin Ehlis
Fixes #1162 The dynamic offsets passed in at descriptor bind time are ordered based on the binding order and any consecutive array indicies within those bindings. When we validate the dynamic offsets at draw time, we were using the entire dynamic offset array, but only the active bindings. If we had an inactive dynamic binding before the end of the bindings we would use the wrong offsets. This change fixes the issue by creating a mapping between bindings and dynamic offset array indicies at descriptor layout creation time. At draw time the mapping is then used to lookup the correct dynamic offset array index for a given binding.
2016-10-25layers:Rename SAMPLER_NODE->SAMPLER_STATETobin Ehlis
2016-10-25layers:CreateDescriptorSetLayout cleanupTobin Ehlis
Streamline duplicate binding check, use [] operator instead of emplace, remove dead comment and add new comment.
2016-10-25layers:Refactor CreateDescriptorSetLayoutTobin Ehlis
Update CreateDescriptorSetLayout() to use Pre/Post pattern and split out validation of createInfo for the layout to occur before the creation of the layout.
2016-10-25layers:Update error enum for duplicate bindingsTobin Ehlis
Add unique error enum for the case where descriptor bindings are duplicated.