aboutsummaryrefslogtreecommitdiff
path: root/layers/buffer_validation.cpp
AgeCommit message (Collapse)Author
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
2017-04-22layers: Change obj type conversion routine nameMark Lobodzinski
Change-Id: I3b4208ca3777ac46b2c5ab2839c268ed4381a2ac
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-22layers: Use UNKNOWN object type instead zero-castMark Lobodzinski
Change-Id: I36c175e78d7a33667f1485ed0e53f1dadab62a31
2017-04-23layers: slim down draw countingChris Forbes
We used to care how many draws there were. Now we just care whether there were /no/ draws (in one place)
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-04-07layers:Refactor image layout validationTobin Ehlis
Streamline some of the image layout validation code. At the time of CmdBeginRenderPass() remove the layout transition from validation code and perform the layout transitions all at once. This allows a bit of transition code to be killed so that the initial transition code can share TransitionSubpassLayouts() function.
2017-04-05layers: Fix GH 1639.Jeremy Hayes
Check base+count instead of just base. Fix FramebufferCreateErrors test to use the correct number of mip levels. Also, add a test for count, fix a few function names, and apply some soothing const cream. Change-Id: Ib2deb8bc27e76138f83b3dd32529583a30085cda
2017-04-04scripts:Update unique IDs for spec v1.0.45.1Tobin Ehlis
Another massive update. Totally overhauled the mapping algorithm. The basic outline of the new algorithm is: -Try to map complete error message to prev ID -Then try to map error msg w/o link to prev ID -Finally try to map just core error string (no section) to prev ID -Else assign it a new unique ID See code for complete details. In anticipation of integrated uniqueIDs I took a little liberty with this update in that I didn't attempt to remap EVERY new ID to previous IDs. I did many of them and made sure to account for every previous ID that was implemented. IDs will all be undergoing a one-time change with their integration into the spec anyway so there is little harm in letting non-implemented IDs drift a bit for now and it helps save my sanity. I did add a validation step to the spec.py script to make sure and flag any IDs that previously were implemented and suddenly are no longer in the re-mapped version of IDs. I manually presevered IDs 911 & 912 which get masked from the extension spec. I also had to do some manual updates on an offline spec to keep the parser from breaking on the non-xhtml compliant spec. Command line was: python spec.py -update -remap 92-72:97-77:112-92:116-96:123-103:124-105: 133-114:148-2349:154-133,2:156-135:157-139:204-156:205-155:206-154: 417-269:1189-769:1417-938:1446-965:1448-967:1449-968:1487-974: 2193-1430,5:683-496:684-494:728-529:729-527:1628-1086:1731-1180: 1736-1183:1796-1234:1815-1251
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-23layers: Refactor ResolveRemainingLevelsLayersMark Lobodzinski
Simplified source and consolidated usage. Change-Id: I662a94381f3b6119978a53308dc616e942259941
2017-03-23layers: Add VU enums to VkQueueFlag checksMike Schuchardt
Split validation of command pool queue flag checks into a dedicated function and add valid usage error enums. Change-Id: I4fc4e71d96b818c281ad310dd0d15bca508efb94
2017-03-22layers: Add image handles to layout error outputMark Lobodzinski
Also fixed up validation tests to handle message formatting changes. Change-Id: I8671ae531d473bebdc034c33edcd9617ab96b836
2017-03-22layers: Fill in buffer_validation log_msg handlesMark Lobodzinski
Also updated some C-style casts and added TYPE_UNKNOWN where appropriate. Change-Id: Ia9c1d013dd73c4f6785df6151ee71715e310187b
2017-03-22layers:Refactor image layout verify/setTobin Ehlis
VerifyImageLayout had a side effect of setting image layout state if the layout had not been seen by the cmd buffer. This update moves the code to set the layout outside of the verify function and instead puts it into new SetLayout* functions that are now called in the appropriate PreCallRecord* functions. Note that the previous behavior caused a side effect where layouts could be updated even when the call down the chain did not occur. The updated behavior will always update the layout to what is passed as the explicit layout for any image copy operations whenever the call down the chain is made. This is desirable b/c if the layout didn't match the app saw the error during the Validate* portion of the call and if they chose to ignore it then validation should reflect the layout state of the image that was set by the call. Since the side effect mentioned above is no longer present, this change includes an update to InvalidImageLayout test where a second call to vkCmdCopyImage() is made in order to actually transition the initial image layout state so that expected errors are correct going fwd.
2017-03-22layers:Unify image layout validation functionsTobin Ehlis
VerifySourceImageLayout() and VerifyDestImageLayout() were nearly identical so I generalized a couple of pieces and combined them in the single VerifyImageLayout() function.
2017-03-16nop: Clean up commentsDave Houlton
Change-Id: I392aba1398381205728aead48d6cfd10aa47ac90
2017-03-16layers: Add VUs 1200&1201, and a testDave Houlton
Added 2 VU checks for aspectMask on image copy. Added test CopyImageAspectMismatch to provoke these VUs, and a handful of other aspect mask VUs previously done but missing tests. Change-Id: Ib9c3eb9d95a9295ec485bb14b4221d4198fa6904
2017-03-16layers: Add VU 01185 and a testDave Houlton
Added check for valid usage 01185. Added test CopyImageSampleCountMismatch() to verify the check. Change-Id: I51e76e0334bd4f1c0fe564f241646fc8b788da1e
2017-03-16tests: Fix ImageLayerUnsupportedFormat errorsJeremy Hayes
Fix ImageLayerUnsupportedFormat unexpected errors. Change-Id: I7dd4f2b9bae69885abf5031a6257ee3f6fad21fb
2017-03-14layers: Implement VU 00303-00308Mike Weiblen
Implement Valid Usages 00303-00308 with new function ValidateBarrierLayoutToImageUsage() which verifies an ImageMemoryBarrier's old/new ImageLayouts are compatible with its Image's ImageUsageFlags. Rename ValidateImageLayouts() to ValidateBarriersToImages(). Rename some variables: - internal vars to use Google style. - vars passed verbatim from Vulkan to use Vulkan names. Fix issues revealed in layer tests due to these new checks: - 2 new Unexpected messages in VkLayerTest. - 1 failing VkPositiveTest. Update VU database for check_implemented = Y. Change-Id: I8723f99d515fbea707299b4d1fcf33a4da6b7b0b
2017-03-13layers: Add sparseResidencyAliased feature checkMark Lobodzinski
Change-Id: I173c3d6e696e674c7a791838f6921763f03d1660
2017-03-13layers: Add sparseResidencyBuffer feature checkMark Lobodzinski
Change-Id: I53afd9b76957f1c955f3068a4d1ff99f0cc5f543
2017-03-13layers: Add sparseBinding device feature checksMark Lobodzinski
Change-Id: If1145276554ad8dda2839aa5bfc0b3c796873482
2017-03-13layers: #1522 #1523 Fix VK_REMAINING_* resolvePetr Kraus
ResolveRemainingLevelsLayers() modified a copy instead of the live data. Fixes issues #1522 and #1523
2017-03-07tests: Bugfix check and add mip copy testsDave Houlton
Fixed a bug in the buffer size calculation for compressed mip levels when copying less than a full block at the perimeter. Added a set of validation tests that exercise copies in/out of mip levels of compressed textures. Added an image init() fxn to the test framework that takes an imageCreateInfo input, to allow full control of image varieties. Change-Id: I240ed6e1f45889e58b759f8f261392725dadb498
2017-03-07layers: Clang-format only, no code changesDave Houlton
This is a whole-file clang format of buffer_validation.cpp, with no code changes. Left as a separate commit to avoid confusion with the actual code changes within this file in the other 2 commits. Change-Id: I4e09c0a465f5187d3753a88bcbafb0e8bee9d782
2017-03-07layers: Add VUs 1275, 1276, 1277 related to gh1507Dave Houlton
Adds 3 new valid usage checks related to the bugfix, and the layer_validation_tests code to exercise 2 of them. The third check, 01277, cannot be provoked by a test because it would require a compressed texture format with block z-dimension > 1, which does not (currently) exist for Vulkan. Change-Id: I6c467e64c420b6a453af57f7ff86e1465e132988