aboutsummaryrefslogtreecommitdiff
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-05build: Move layer_utils build to top-level cmakeMark Lobodzinski
DevSim requires this library, but it is only built in LVL if LAYERS are built. Moved the generation of this library out of the layers cmake file and into the root cmake file. Change-Id: I1c633e981fa1843cfb49204d2ac130beb8d99dfc
2018-02-05icd: Remove dead code from CMakeLists.txtMark Lobodzinski
Change-Id: I6b60b2e71568a3a88a3366b04ab7cf911fa05526
2018-02-05scripts: Update android-generate to support UUIDCody Northrop
This allows use of the script as is, automatically selecting git_dir vs. rev_file based on detected paths.
2018-02-05scripts: Fix error if spirv-tools dir had no .git (#2346)Cort Stratton
external_revision_generator.py generates a UUID for VkValidationCacheEXT objects created by the layers, based on the commit ID of the HEAD revision in the spirv-tools repo used to build those layers. This implicitly required that the spirv-tools source is hosted in a Git repository, which is not the case in all validation layers build environments. The script has been modified to accept *either* a path to a Git working directory to query *or* a path to a file whose contents are SHA1-hashed (if necessary) and treated as the "commit ID" for the project. Call sites for the script in the CMake and Android build paths have been updated to use the --git_dir approach by default, which matches the pre-existing behavior.
2018-02-05layers: Improve validation cache ID parsingCort Stratton
- Code previously assumed that SPIRV_TOOLS_COMMIT_ID was a SHA1 hash; this assumption is now more explicit. - Replace some literal constants with VK_UUID_SIZE. - Handle the purely hypothetical case where VK_UUID_SIZE*2 > SHA1 size
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-02-05layers: Fully normalize/populate CMD_TYPE enumJohn Zulauf
Add all vkCmd.* (plus vkEndCommandBuffer) to the CMD_TYPE, normalizing the naming to be consistent with the function names. Change-Id: I50503a4e180d726b330c42db050a1336221213f6
2018-02-05cmake: Move LVL temp/worker targets into subfolderMark Lobodzinski
This sets up cmake to locate the temporary or worker MSVC projects into a subfolder called lvl_cmake_targets. This simply unclutters the Visual Studio Solution Explorer projects pane, and does not affect functionality. Change-Id: I6933d05758d6f174a4f66ceaef51d43627210e4f
2018-02-01build: Need to build LVL layers in CI to get utilsKarl Schultz
Layer utils now exist only in LVL, so when we build VulkanTools in LVL CI (just to get devsim layer), we need to turn on LVL layer building in order to get the layer util libs. Change-Id: I4cc6df4ed0a782afeec19c61dc05bcc2bad47756
2018-02-01layers: Add LAYER_EXPORT specifiers to vk_layer_configMark Lobodzinski
Required for hassle-free linking to layer_utils lib.
2018-01-31demos: Fix output location of smoketestMark Lobodzinski
2018-01-31layers: Pass through bind mem 2 entry point namesMike Schuchardt
Change-Id: I62510d1759c7cd3ca81b3c7e57a153b7c863250b
2018-01-31layers: Bind mem 2 entry pointsMike Schuchardt
Add entry points for VK_KHR_bind_memory2 and wire up to existing validation Change-Id: Iab17ead7a6f6f44fdbdf2ad5033d2ea7e47447d0
2018-01-31layers: Mem reqs 2 entry pointsMike Schuchardt
Add entry points for VK_KHR_get_memory_requirements2 and wire up to existing validation. Change-Id: I3f9170b0171efc5a22ddb1e3b68185cedd17bca5
2018-01-31tests: Add unit test for push descriptor set VUIDsJohn Zulauf
Add the unit test case for the following added checks. VALIDATION_ERROR_1be02415 VALIDATION_ERROR_1be002d6 VALIDATION_ERROR_1be002da VALIDATION_ERROR_1be002d8 VUID-vkCmdPushDescriptorSetKHR-commandBuffer-recording Change-Id: Ib9aa008ab87dddead3eb086d5c8ed3fb94f5f187
2018-01-31layers: Add CmdPushDescriptorSet parameter checksJohn Zulauf
Added the stateful parameter checks for push descriptor. VALIDATION_ERROR_1be02415 VUID-vkCmdPushDescriptorSetKHR-commandBuffer-cmdpool The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations VALIDATION_ERROR_1be002d6 VUID-vkCmdPushDescriptorSetKHR-pipelineBindPoint-00363 pipelineBindPoint must be supported by the commandBuffer's parent VkCommandPool's queue family VALIDATION_ERROR_1be002da VUID-vkCmdPushDescriptorSetKHR-set-00365 set must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR VALIDATION_ERROR_1be002d8 VUID-vkCmdPushDescriptorSetKHR-set-00364 set must be less than VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created // Not implemented using VUID as ValidateCmd currently doesn't support (TODO) VUID-vkCmdPushDescriptorSetKHR-commandBuffer-recording commandBuffer must be in the recording state Change-Id: I52f39780003e23953dd2dc46ec007e884c04fa5b
2018-01-31layers: Improve doc validation init-list parsingJohn Zulauf
Change VALIDATION_ERROR_ parsing to correctly recognize error ids in initializer lists, including the formatting as done by clang-format. {VALIDATION_ERRROR_nnnn, ... VALIDATION_ERROR_nnnn} Change-Id: I25a1c0d0c9181ece458f7c83d2f184abea8d1f4a
2018-01-31tests: Add test for push descriptor allocationJohn Zulauf
Add unit test case for attempting to use vkAllocateDescriptorSets with a descriptor set layout created with the push descriptor flag VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set. Test cases added: VALIDATION_ERROR_04c00268 VUID-VkDescriptorSetAllocateInfo-pSetLayouts-00308 Change-Id: If11e12a3dd51f4c796178b89d8e9077a5227407c
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-26tests: Add tests for push DS layout create VUIDsJohn Zulauf
Added tests for additional valid usage checks: VALIDATION_ERROR_05000230 VkDescriptorSetLayoutCreateInfo-flags-00280 VALIDATION_ERROR_05000232 VkDescriptorSetLayoutCreateInfo-flags-00281 Added test for "required extension" present check for creation of DS layout with push descriptors flag set. Change-Id: Ia274d9ce3ee38ec686e52c4101a6d0573294f852
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-26icd: Add VK_KHR_push_descriptor to blacklistJohn Zulauf
As VK_KHR_get_physical_device_properties2 pNext structure queries are not implemented within mock_icd, VkPhysicalDevicePushDescriptorPropertiesKHR::maxPushDescriptors cannot be queried by the validation layers, causing numerous test failures when this limit is checked (in a subsequen commit). Added to ignore until such time it is correctly reported. Change-Id: I77b9a37c9ab2ce3e730b7fa6596e23ccc2be8d8c
2018-01-26layer: Add utility template for sType initJohn Zulauf
Add utility function to auto populate sType field based on typename given to autogen of typemap helper. Return value optimization (copy elision) should make this perfomance neutral vs. inline init. Change-Id: I231cf92d5063c19f9ad5b14189dd162fdac76a43
2018-01-26Don't complain about unused vertex buffers being VK_NULL_HANDLEChris Forbes
2018-01-25demos: Update cube/smoke for submodule compatibilityMark Lobodzinski
2018-01-23cmake: Fix glslang validator cmake hint pathMark Lobodzinski
Change-Id: I098b4ce4dcb924bcc1fc15da50332118a0756a43
2018-01-23tests: Add barrier queue family index testsJohn Zulauf
Add validation layer tests for Buffer and Image memory barriers. VUIDs test refactored(*)/new: VALIDATION_ERROR_0a000960* VUID-VkImageMemoryBarrier-image-01200 VALIDATION_ERROR_0a000962 VUID-VkImageMemoryBarrier-image-01201 VALIDATION_ERROR_0a00096a VUID-VkImageMemoryBarrier-image-01205 VALIDATION_ERROR_0a000dce VUID-VkImageMemoryBarrier-image-01767 VALIDATION_ERROR_0a000dd0 VUID-VkImageMemoryBarrier-image-01768 VALIDATION_ERROR_0a00095e VUID-VkImageMemoryBarrier-image-01199 VALIDATION_ERROR_0a000aca VUID-VkImageMemoryBarrier-image-01381 VALIDATION_ERROR_0a000dcc VUID-VkImageMemoryBarrier-image-01766 VALIDATION_ERROR_0180094e VUID-VkBufferMemoryBarrier-buffer-01191 VALIDATION_ERROR_01800dc6 VUID-VkBufferMemoryBarrier-buffer-01763 VALIDATION_ERROR_01800952 VUID-VkBufferMemoryBarrier-buffer-01193 VALIDATION_ERROR_01800dca VUID-VkBufferMemoryBarrier-buffer-01765 VALIDATION_ERROR_01800dc8 VUID-VkBufferMemoryBarrier-buffer-01764 VALIDATION_ERROR_0180094c VUID-VkBufferMemoryBarrier-buffer-01190 VALIDATION_ERROR_01800950 VUID-VkBufferMemoryBarrier-buffer-01192 VALIDATION_ERROR_01800958 VUID-VkBufferMemoryBarrier-buffer-01196 Change-Id: Icf5d7f1ddbeeab90324cfb034648813741a65398
2018-01-23layers: Refactor and add image/buffer barrier VUIDJohn Zulauf
Refactor existing image barrier VUIDs for source and destination queue family index validation to include all queue family tests. Refactor validation enables reuse by buffers, all VUID's have parallel usages. Extant test for VUID...1200 was converted to use VALIDATION_ERROR_... semantics. VUIDs refactored(*)/new: VALIDATION_ERROR_0a000960* VUID-VkImageMemoryBarrier-image-01200 VALIDATION_ERROR_0a000962 VUID-VkImageMemoryBarrier-image-01201 VALIDATION_ERROR_0a00096a VUID-VkImageMemoryBarrier-image-01205 VALIDATION_ERROR_0a000dce VUID-VkImageMemoryBarrier-image-01767 VALIDATION_ERROR_0a000dd0 VUID-VkImageMemoryBarrier-image-01768 VALIDATION_ERROR_0a00095e* VUID-VkImageMemoryBarrier-image-01199 VALIDATION_ERROR_0a000aca VUID-VkImageMemoryBarrier-image-01381 VALIDATION_ERROR_0a000dcc VUID-VkImageMemoryBarrier-image-01766 VALIDATION_ERROR_0180094e VUID-VkBufferMemoryBarrier-buffer-01191 VALIDATION_ERROR_01800dc6 VUID-VkBufferMemoryBarrier-buffer-01763 VALIDATION_ERROR_01800952 VUID-VkBufferMemoryBarrier-buffer-01193 VALIDATION_ERROR_01800dca VUID-VkBufferMemoryBarrier-buffer-01765 VALIDATION_ERROR_01800dc8 VUID-VkBufferMemoryBarrier-buffer-01764 VALIDATION_ERROR_0180094c VUID-VkBufferMemoryBarrier-buffer-01190 VALIDATION_ERROR_01800950 VUID-VkBufferMemoryBarrier-buffer-01192 VALIDATION_ERROR_01800958 VUID-VkBufferMemoryBarrier-buffer-01196 Change-Id: I9568e8f77df1cf030dfaf60877deab37e8e12e38
2018-01-23cmake: Fix externals for submodule/subtree buildsMark Lobodzinski
Change-Id: Ia1c31ff75c9bf5c3d1ae9b903213437c3ae1ef06
2018-01-23scripts: Exit from vuid_mapping.py with status 1 on errorsJean-François Roy
This patch modifies scripts/vuid_mapping.py to exit with status 1 on errors. This allows the build system to fail code generation rules that depend on this script. Change-Id: I5659ae80e1989ea7530c9257e7619a9b35cc7294
2018-01-22cmake: Fix non-existant cmake variableMark Lobodzinski
Specified cmake variable does not exist, caused problems in some out-of-source builds. Change-Id: I526117ef060efea40451752e5fe7bad1e7a5589e
2018-01-19loader: Fix static library initializationLenny Komow
Fix the loader's global initialization being skipped when the loader is built as a static library on windows Change-Id: I492f87104fb3bf32aed3c7d251dee2caeb4f00ba
2018-01-19loader: Restore pNext data in CreateDeviceJoey Bzdek
In the terminator for CreateDevice, the VkDeviceGroupDeviceCreateInfoKHX struct in the pNext chain is replaced by a copy that has VkPhysicalDevice handles remapped. At the end of the terminator, restore the modified pNext pointer to partially comply to the const argument and give consistent behavior to the caller. Change-Id: I83a60a0102a736d056729383733e62b38b0ace2c
2018-01-19travis: fix clang-format nitDave Houlton
Change-Id: I119143fbe481fcbdea527b44d0d64e6a150ce186
2018-01-19tests: add test for new multiplanar VUIDsDave Houlton
Change-Id: Ie3d95d1de3363f81eae31bc11cf9d3fe4655dec7
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-18loader: Fix enabling extensions from layersLenny Komow
This resolves a bug where it was impossible to enable an extension that was defined in a layer if that layer was not passed by the application. This applied to implicit layers, explicit layers enabled by environment variables, and metalayers. Change-Id: I03bee6fb778936d970f78b9142679654424f80ae
2018-01-18tests: Add validation for layout lifetime issuesJohn Zulauf
Add unit tests for valid usages that flag when descriptor set update operations are being performed with descriptor sets create from destroyed descriptor set layouts. The tests use overloaded VUIDs (generic "must be valid * handles) which need to be replaced (and unclaimed) 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 created from destroyed layout Change-Id: Ic37a745120899c072e2e5d8ceb96c5d93074355e
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-18layers: Add printf style formatting of std::stringJohn Zulauf
Added utility for formatting output to std::string, using sprintf style arguments. Change-Id: Ib95fb55f38cc85a1b24cf6aac7761fc9b7c67376
2018-01-18layers: clang-format parameter_validation_utils.cppDave Houlton
Change-Id: I3ade2b8c7dc63f0b902b17d8cc3f9c48ca21fb23
2018-01-18tests: Add tests for CmdDispatch paramsDave Houlton
Change-Id: I087f412f3eccd02f040936d917eeea057e55407e
2018-01-18layers: Add group size param checks to CmdDispatchDave Houlton
Added parameter validation checks to group size parameters against device limits, for vkCmdDispatch() and vkCmdDispatchBaseKHX(). Change-Id: Ic41031d694c6d311431fc49f48b1427a2b042337
2018-01-17layers: Fix doc validation file list checkJohn Zulauf
The check for required files was counting the files multiple times and aborting silently. The check now correct counts files and exits with non-zero exit code on failure. Change-Id: I5b158f7cca0dd541571d95c00c3450139daf32c4
2018-01-17header: Update to version 1.0.68 of the Vulkan hdrMark Lobodzinski
- updated vulkan.h - updated vk.xml - updated layer json files - built and updated vulkan.hpp - updated vk_validation_error_messages.h - updated vk_validation_error_database.txt Change-Id: I5aff6147531f9b91164849ee590f7f86e46e4652
2018-01-16loader: Clean up mutexes on destructionLenny Komow
Change-Id: I7d1524da9167a576420c109ebbce8ebb5121cad0
2018-01-16Loader: fix open registry handle leakSlawomir Cygan
Each handle returned by RegOpenKey*() API functions should be closed using RegCloseKey(). This change fixes AppVerifier warning on leaklin HKEY objects.
2018-01-16layers: Add checks for extention DynamicViewportsJeremy Kniager
Change-Id: I2819d47ab163519689ece94535c6c880f275bf72
2018-01-16Revert "MikeW's private development tools."Mike Weiblen
This reverts commit b103ee6a86b3296c4db52598d77ce792127a6082.