aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
AgeCommit message (Collapse)Author
2018-01-31layers: Add check for push descriptor allocationJohn Zulauf
Add validation check for attempting to use vkAllocateDescriptorSets with a descriptor set layout create with the push descriptor flag VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set. Checks added: VALIDATION_ERROR_04c00268 VUID-VkDescriptorSetAllocateInfo-pSetLayouts-00308 Change-Id: I81bed8e7eb5396f7a716b6a14b648b5051127259
2018-01-26layers: Add push descriptor set layout create VUIDJohn Zulauf
Add VUID checks to vkCreateDescriptorSetLayout for push descriptor sets. Additional checks include: VALIDATION_ERROR_05000230 VkDescriptorSetLayoutCreateInfo-flags-00280 VALIDATION_ERROR_05000232 VkDescriptorSetLayoutCreateInfo-flags-00281 Also added check for use of VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR when the required extension VK_KHR_push_descriptor is not enabled. Updated CreateDescriptorSetBindingWithIgnoredSamplers test, which violated the above check. Change-Id: Ie009019bbb7859553df92473796a1a929a9464f7
2018-01-18layers: Add validation for destroyed layoutsJohn Zulauf
Add three tests to flag with descriptor set update operations are being done to descriptor sets with destroyed descriptor set layouts. The tests use overload VUID (generic "must be valid * handles) which need to be replaced 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 create from destroyed layout Change-Id: I8a3edc67b3e86037cdaa6353176814abfddef1a0
2018-01-16layers: Fix Android buildYuly Novikov
ndk-bundle/sources/cxx-stl/llvm-libc++/include/set expects comparator's operator() to be const.
2018-01-16layers: Fix typos in ValidateUpdateDescriptorSetsArtem Kharytoniuk
2018-01-08layers: Make DescriptorSetLayout robust for CTSJohn Zulauf
CTS sends an invalid descriptor set that the validation tracking was not robust to -- two binding with identical binding ID values. After reporting the invalid input data, the test application could crash. Validation internal data is now created in a way that invalid data should less easily cause program termination. Change-Id: Ib84a5234267f7bece9be377badd22696e3633b1b
2018-01-04layers: Add validation caching for draw/dispatchJohn Zulauf
Validation of descriptors at draw or dispatch time is now cached, s.t. without changes that affect validity, validation checks are not repeated. Change-Id: I713662d00813989bf4441921456afca431d730d7
2018-01-04layers: Replace iterative DS Get.* with maps/setsJohn Zulauf
Profiling indicated hot spots in DescriptorSet Get functions which iterated in binding space to lookup values. Replaced iterative searches with maps/sets. Additionally simplified construction, optimized map/set creation and Get.* for DescriptorSet and DescriptorSetLayout. Change-Id: Ia2948e56333d3643d4377b39e75acf4c951d558b
2018-01-04layers: Combine global binding start/end lookupJohn Zulauf
Binding start/end lookup where using two separate maps indexed on a common key. Combined to avoid repeated lookups. Change-Id: I57ed71736537de5eb83fe41599a8acec9bf23d13
2017-12-12build: Clear some compiler warningsPetr Kraus
- remove unnecessary ";" after function definitions and namespaces - fix wrong type match in printf for handle types - convert some left-overs to `HandleToUint64`
2017-10-16layers: Remove validation error for copying nonupdated descriptorsJózef Kucia
The spec doesn't say much about descriptors copy update valid usage, but it doesn't seem to require that descriptors are updated before copying.
2017-10-12layers:Verify valid buffer for tex buff ds updateTobin Ehlis
Fixes #2104 Make sure that buffer underlying the bufferView of texel buffer for a uniform or storage texel buffer update has a valid buffer behind it. Object tracker only checks to make sure that the view itself hasn't been destroyed, so need this extra level of checking at this level to avoid crash.
2017-09-21layers: Correctly check if descriptor was updatedJózef Kucia
2017-09-13layers: Use layout flags to test for push descriptor setsJózef Kucia
2017-08-31layers: Account for push descriptor sets in CVMark Lobodzinski
Change-Id: I1095edce0f26e2a4ced6fa301143622dc5cd0afd
2017-08-09layers:Fix consecutive binding updatesTobin Ehlis
Fixes #1992 When we're wrapping a descriptor update for consecutive bindings, fix code so that index into update array consistently increases.
2017-07-24layers: Resolve TODO about actual layoutsChris Forbes
This VU exists now in recent specs.
2017-07-24layers: Implement check for binding of maint1 slice of 3d image to DSChris Forbes
Fixes #1910
2017-07-17layers:Handle deleted image view in descriptorTobin Ehlis
When an image descriptor with a destroyed image view was used we hit an assert. This is not caught upstream and can occur if a descriptor is re-used following image view deletion. Add code to catch this case and report the destroyed image view.
2017-07-07layers:Identify layout from pipelineLayoutTobin Ehlis
When checking IsCompatible() for a DescriptorSetLayout, the passed-in layout is always from a pipelineLayout, however this was not specified in the code. Add comment to specify this usage and update the error message to always distinguish which of the layouts using in the compare is from the pipelineLayout.
2017-06-21layers:IsCompatible uses raw DSLayout ptrTobin Ehlis
Update IsCompatible calls for DescriptorSetLayout class to use raw ptrs instead of shared_ptr as the calls just temporarily use the ptr and don't affect ptr ownership.
2017-06-21layers:Set DescriptorSetLayout in DS to constTobin Ehlis
The DescriptorSetLayout pointed to by shared_ptr in DescriptorSet is const so add const across uses as appropriate.
2017-06-21layers:Pass shared_ptr by const refTobin Ehlis
DescriptorSetLayout shared_ptr will always survive the lifetime of the DescriptorSet constructor so pass by const ref.
2017-06-20layers:Migrate DSLayout to shared_ptrTobin Ehlis
Update Descriptor Set Layout copy in Descriptor Set, as well as various ptr references to use shared_ptr. This fixes some potential memory leaks and makes Descriptor Set class lighter weight.
2017-06-13layers: Use copies of layout data for descriptorsetsMark Lobodzinski
DescriptrSets used pointers to descriptorsetlayout data, which caused invalid references if the layouts were deleted before the descriptor sets. Changed the layer to copy the data. Change-Id: I671f1efed2aa0986f3a370b51f2f96c07b555af7
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