aboutsummaryrefslogtreecommitdiff
path: root/layers/buffer_validation.cpp
AgeCommit message (Collapse)Author
2018-02-05layers: Add CreateImage valid usage checksDave Houlton
Adds 17 valid usage checks of ImageCreateInfo struct. 13 in core validation, 4 in parameter validation. Change-Id: I4bfe195f88d5e14237c1b01c5aca2de7c578aa67
2018-02-05layers: Add err-id/coverage for 'recording state'John Zulauf
Added map from CMD_TYPE to validation error for "must be in the recording state" valid usage ID. Add complete check coverage (except vendor/KHX extensions) for this class of VUID. Coverted existing checks to use common code. Change-Id: I38f71cce2a0f090f2685074239a1b429bbf95d8c
2018-01-19travis: fix clang-format nitDave Houlton
Change-Id: I119143fbe481fcbdea527b44d0d64e6a150ce186
2018-01-19layers: Add GetImgSubrscLayout multi-planar VUIDsDave Houlton
Adds new VUIDs defined in the VK_KHR_sampler_ycbcr_conversion extension to vkGetImageSubresourceLayouts(), and corrects the false positive error reported in GH issue #2350. Change-Id: Ia2814291291c7109fabd33af6119a9209e08dd51
2018-01-16layers: Make ValidateGreaterThan report vuid etc.Petr Kraus
- make ValidateGreaterThan report proper vuid and other log_msg parameters - make ValidateGreaterThanZero to avoid having to convert common 0 literal (for template deduction) - update check and remove redundant ones in core_validation
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
2017-12-18android: Update to NDK r16bCody Northrop
This allows us to switch to libc++ runtime as it is no longer beta: https://android.googlesource.com/platform/ndk/+/ndk-release-r16/CHANGELOG.md
2017-12-15layers: improve const-ness in buffer_validation.cppDave Houlton
Change-Id: Ic7a2ef6e26b76c1b5f3a4c279e0d15228513af9e
2017-12-15layers: Repro and fix GH 2239Dave Houlton
Modified positive test UncompressedToCompressedImageCopy to provoke the issue reported in GH 2239 Fixed destination extents calculations in buffer_validation.cpp to avoid the erroneous errors Change-Id: I268f14a6be678d767df14f0a6694aca479854c3
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-12-06layers:Add image checks for DS image being clearedTobin Ehlis
Adding checks for two new VUIDs related to vkCmdClearDepthStencilImage function. Making sure that the image being cleared supports use as a transfer destination and that the image was created with the usage bit VK_IMAGE_USAGE_TRANSFER_DST_BIT.
2017-12-05layers: Add warning for LOAD_OP_LOAD+LAYOUT_UNDEFINEDJason Ekstrand
While not technically an error (VK_IMAGE_LAYOUT_UNDEFINED is always allowed as an initial layout), this combination is almost never what you actually want. If nothing else, it's a potential performance problem because VK_ATTACHMENT_LOAD_OP_LOAD is liable to be more expensive than VK_ATTACHMENT_LOAD_OP_DONT_CARE. Give developers a helpful warning in this case. This would have caught an actual bug in some of the Sascha Willems demos as fixed in this PR: https://github.com/SaschaWillems/Vulkan/pull/400 Change-Id: I73c64ae60a65cfb200db00707d650ec8da7ba130
2017-11-17layers: add image layout validation to vkCmdBlitImage()Norbert Garnys
2017-10-20layers: GH2145, fix comp<->uncomp copy val errorsMark Lobodzinski
For image-to-image copies, there are special cases for copies between compressed and uncompressed images. These modifications to copy extents are now allowed for in the validation checks. Change-Id: I5d72e4ec621a6769a9a89e24aade5defa9ecabda
2017-10-10layers: Relax MinImageTransferGranularity checksMark Lobodzinski
Ignore depth for 1D, 2D transfers, height for 1D transfers. Change-Id: Ibbf6b9bf0af9d74833d901453c9e9f59b80820a5
2017-10-10layers: Remove AccessMask->ImageLayout checksMark Lobodzinski
Spec no longer calls out valid usage for image layouts related to access masks. Change-Id: Iedbe8689a0c3a569a4f7a473f801afae250c8256
2017-10-06layers: Add caller to ValidateObjectNotInUseMike Schuchardt
Make ValidateObjectNotInUse more generic so it can be used for cases other than delete/destroy Change-Id: I8983be88a42323021306c9d314ce6558fadcbd5e
2017-09-21build: Update for 1.0.61.0 SDKLenny Komow
Change-Id: I4b1f0289dace648153b6efdbfea0d83d37b28e60
2017-08-17layers: Fix memory leaks in functionsJeremy Kniager
Change-Id: I8e25adabefde3a04be5536ce4c5c2d5920a76140
2017-08-16layers: Add checks for Image/ImageView usageJeremy Kniager
Change-Id: Ibb2ac5b5f4b4176f5745007598c2fe64665237c2
2017-08-09layers: PR1950, Update subresource range VUIDsPetr Kraus
With updated test names in database. Change-Id: Ie6cb2dfa9fa84de2dd0dea645249fe03c6780eba
2017-07-28layers:Rename lambda function containerTobin Ehlis
Change name to queue_submit_functions to reflect the fact that validate functions in this container are executed at QueueSubmit() time.
2017-07-20LVL: Add validation check for CreateImageViewJeremy Kniager
Added validation checks, tests, and updated error database. Change-Id: Id4dfe66bc325ae0060b7668572026c8a40f83d64
2017-07-18layers:Refactor barrier validationTobin Ehlis
Migrate validation for renderpass barrier in CmdPipelineBarrier to its own function. Refactor some device and command buffer params to avoid duplicate look-ups. Add some const decls to command buffer state that shouldn't change down the pre-call path.
2017-06-30layers: More CmdBlitImage VU checksDave Houlton
Add 11 more VU checks to CmdBlitImage. Fix layer_validation_tests errors exposed by these new checks, add new tests for the new checks. Update database file and clang-format the modified source files. Change-Id: I3457dd0a31e04ab001bc8fb5bf638eb3f990f5d9
2017-06-27layers: Don't copy all the image subresources every submitChris Forbes
The set of subresources touched by this submission is likely to be very small compared to the complete set we're tracking. It doesn't make any sense to copy this entire hashtable in each submit call. Instead, maintain an overlay table with the submission's modifications in it. Saves approx 12s in an internal workload.
2017-06-19Remove dead cmd_type param from PreCallRecordCmdClearImageChris Forbes
2017-06-19Remove last cmd machineryChris Forbes
This isn't useful now.
2017-06-15layers: Clean up missing checks list for vkCreateBufferChris Forbes
2017-06-08layers: Update subrange checks+tests to new VUIDsPetr Kraus
i.e. disambiguate extension VUIDs from similar VUID in core
2017-06-06layers: Move CV to use new extension helperMark Lobodzinski
Change-Id: Idb18d0f358fd359c1c5862fba394c833e2fa13f1
2017-06-05layers: Fix some typosChris Forbes
2017-05-31layers: Add VU offset checks to BlitImageDave Houlton
Added 10 VU checks to CmdBlitImage around the offset values in the VkImageBlit struct. Cleaned up a few tests that were tripping these checks inadvertently. Added BlitImageOffsets test. Also updated the appended error message number to match the new 8-char hex format. Change-Id: I75d319cce6bbe96e8686e0bad3c4a0d58922b7a4
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-23layers: Fix layers check in CmdClearAttachmentsDave Houlton
Fix the layer count check in PreCallValidateCmdClearAttachments() to compare against the view's layers, rather than against the underlying image's layers. Update test CmdClearAttachmentTests to provoke both clauses of the test condition. Change-Id: I96d9440cbed3a290554410bb0574e6c443190a64
2017-05-22layers: Add VU checks to CmdCopyImageDave Houlton
Added 16 image copy checks called from PreCallValidateCmdCopyImage() in buffer_validation.cpp. VUs 1209-1217, 1742-1745, and 2603-2604. Change-Id: I5f63862a4451458b054c4b10cd218293d9e16289
2017-05-19layers: GH1752, Update ImageSubrange checksPetr Kraus
- fix #1752 - handle possible overflow of `level`+`count` - include correct err code in msges - update and add some tests
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-17layers: Transition all to HandleToUint64Petr Kraus
Mostly automatic (i.e. probably missed some cases)
2017-05-17layers: Add basic support for new extensionMark Lobodzinski
Add basic validation support for KHR_shared_presentable_image. Change-Id: If6cc5abe6b41ed8580fc89bcf7c8103af971abc9
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: Add vkCreateRenderPass subpass attachment VUsCort Stratton
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-05-03layers: clang-format only, no code changesDave Houlton
clang-format of buffer_validation.cpp, layer_validation_tests.cpp Change-Id: I98c581f6b343929f7812bf012084ad0abbb5a690
2017-05-03layers: Add VUs 01202..01207Dave Houlton
Added checks for 6 CopyImage VUs to buffer validation. Updated copy size tests to provoke each new VU. Change-Id: Ice7821b7c1b8aa0c90e68e8386c56bd021a616ed
2017-05-01layers: Don't insist on memory dependency for presentChris Forbes
When transitioning to/from VK_IMAGE_LAYOUT_PRESENT_SRC_KHR we don't need to insist on VK_ACCESS_MEMORY_READ_BIT. On the transition TO, it's automatically handled; in the transition FROM, it's a WAR hazard rather than RAW/WAW so only the execution dependency is needed. Fixes #1717.
2017-04-27layers:Add barrier imageAspect check for DS imageTobin Ehlis
Fixes #1703 Add validation check to make sure that both depth & stencil aspects of DS images are transitioned in image memory barrier.
2017-04-27layers: Remove GLOBAL_CB_NODE::imageSubresourceMapChris Forbes
This served no purpose. We can get the same result in the one place that matters, by consulting GLOBAL_CB_NODE::imageLayoutMap
2017-04-26layers: Fix some confused VkBool32 vs boolChris Forbes
These aren't the same type!
2017-04-24layers: Banish 'skip_call' once and foreverMark Lobodzinski
Except for swapchain.cpp, which is undergoing a merge into CV. Change-Id: I8b18518ef662a9a11a808ef3dce1b8f60d858fb3