aboutsummaryrefslogtreecommitdiff
path: root/layers/parameter_validation_utils.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-01-18layers: clang-format parameter_validation_utils.cppDave Houlton
Change-Id: I3ade2b8c7dc63f0b902b17d8cc3f9c48ca21fb23
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-16layers: Add checks for extention DynamicViewportsJeremy Kniager
Change-Id: I2819d47ab163519689ece94535c6c880f275bf72
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
2017-12-19layers:Kill PV return code checkTobin Ehlis
Most of these return code warnings were already removed from validation so killing this one as well. They can potentially be re-added in an assistant layer.
2017-12-19layers: Work around bugs in old STL versions.Jamie Madill
Some old versions of the C++ STL have a few bugs with advanced features. This works around two such issues: - std::unordered_map::const_reference having the wrong type - an error with an explicit std::vector constructor
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: Fix Graphics Pipeline pointers not ignoredPetr Kraus
Some VkGraphicsPipelineCreateInfo pointers must be ignored under some conditions, but were not in the layers. Add relevant tests. Fix tests found broken (using depth or color without attachment in subpass)
2017-12-15layers: Fix PV overflowMike Schuchardt
Buffer pCreateInfo->size was being truncated to uint32_t before comparison with 0 Change-Id: Iba6b94f2a0df6514d1ffb79d38e6c0738ea44d71
2017-12-08layers: VS2013 compatibilityMike Schuchardt
Remove all usages of constexpr to restore compatibility with Visual Studio 2013. Also make a handful of other minor edits where the VS2013 compiler was reporting errors. Change-Id: I3c426bea460a4a902ab306b01deb1d76d60f5fa2
2017-11-30layers: Update pipeline multisample pnext checkJohn Zulauf
Updated validation check for VUID-VkPipelineMultisampleStateCreateInfo-pNext-pNext (VALIDATION_ERROR_1001c40d) to include the valid extension pNext sType values valid for the current spec: VkPipelineCoverageModulationStateCreateInfoNV, VkPipelineCoverageToColorStateCreateInfoNV, or VkPipelineSampleLocationsStateCreateInfoEXT Change-Id: Ic3e054110c2bad4b44121a67e7e61e627fa9c559
2017-11-30layers: Added PipelineMultiSample VUID checksJohn Zulauf
Added validation checks for: VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784 (VALIDATION_ERROR_10000620) If the sample rate shading feature is not enabled, sampleShadingEnable must be VK_FALSE VUID-VkPipelineMultisampleStateCreateInfo-minSampleShading-00786 (VALIDATION_ERROR_10000624) minSampleShading must be in the range [0,1] Change-Id: I21cdaf99f8970df4f2e03026a4dae00746ad8386
2017-11-28layers: Fix typos in viewport state validation msgsPetr Kraus
2017-11-28layers: Fix lineWidth checksPetr Kraus
- migrate to parameter_validatio - do not check against limit (outside limits is valid; impl clamps value)
2017-11-28layers: Quick fix odd create PSO param checksPetr Kraus
- param check did only check the first create info - `cullMode` check should be redundant to the automated part
2017-11-17layers: Rewrite ViewportState checks and testsPetr Kraus
- deal with #1685 - report correct object type - improve? msg texts a bit - add extension structs to pNext check - use correct printf token where possible - make tests to match changes + improve coverage (nullptr + multiViewport) - remove viewport state (and other stuff) from tests that do not use it - merge some tests together that are too related - remove unnecessary dynamic state from PSOLineWidthInvalid) - correct invalid VkViewport in some places - correct missing/null pViewport and pScissors in some places - update and correct the VUID database
2017-11-08layers: Adds createSampler VUID/test for IMG_CUBICJohn Zulauf
Added VUID check to parameter_validation_layer and matching test for VUID 12600872 (must disable anisotropy for CUBIC_IMG filters) Change-Id: I3d0f9449413637292c2726480ca7ce0e6b793e21
2017-11-08layers: VUIDs/test for vkCreateSampler anisotropyJohn Zulauf
Added VUID checks to parameter_validation_layer and matching tests for three VUID's: * VALIDATION_ERROR_12600868: Must disable anisotropy when unnormalized coordinates are enabled. * VALIDATION_ERROR_1260085e: maxAnisotropy must be in range [1.0, maxSamplerAnisotropy] * VALIDATION_ERROR_1260085c anisotropyEnable must be VK_FALSE if samplerAnisotropy feature is not enabled. Removed test for: "samplerAnisotropy feature was not enabled ... maxAnisotropy member ... must be 1.0" to conform with the resolution of https://github.com/KhronosGroup/Vulkan-Docs/issues/503. Change-Id: Ia1c561997adb9391ef463f6df90b424730366a7f
2017-11-03layers: Refactored pNext chain walks to templateJohn Zulauf
The while loops for the walking the pNext chains were implemented by repeated code. These were refactored into a common template. Added autogenerated 'traits' objects for the pNext linked structs. Delete cut and paste duplicate pNext chain walk. Change-Id: I46457bb5432219c74f9356e5230c70e4a9ef16df
2017-10-30layers: Capture device features from extensionJohn Zulauf
When the VK_KHR_get_physical_device_properties2 is present, physical device properties can be passed to VkCreate either in the pEnabledFeatures member or VkDeviceCreateInfo or in a VkPhysicalDeviceFeatures2KHR structure on the pNext chain. Neither the parameter validation or core validation layers were capturing device features from the pNext struct, causing false parameter checking errors, when the default (all false) state was used for later validations. Change-Id: I187827443f09aafaa80588a78bc5b67595d0acda
2017-10-04layers: Implement vkCreateDescriptorPool() checksPetr Kraus
Check explicit validity of vkCreateDescriptorPool(): - maxSets > 0 - pPoolSizes[].descriptorCount > 0 + implement relevant tests
2017-09-12Revert "layers: Fix Graphics Pipeline pointers not ignored"Mark Lobodzinski
This caused segfaults on Intel Skylake, NexusPlayer, and Samsung Galaxy S8 (Mali). This reverts commit 367d276ffe5c0748ff9d8e2b3551d4a00c9fc3c2.
2017-09-12layers: Fix Graphics Pipeline pointers not ignoredPetr Kraus
Some VkGraphicsPipelineCreateInfo pointers must be ignored under some conditions, but were not in the layers. Add relevant tests. Fix tests found broken (using depth or color without attachment in subpass) Change-Id: I3e2a3f61a52c72ce3a11483ff8b031189f4c61c9
2017-08-16layers: Move PV custom funcptrs into mapMark Lobodzinski
Simplifies steps necessary for new custom functions. Change-Id: Ib2d80346ebc42011dce74fdd8cee62adb4b3432c
2017-08-16layers: Re-architect parameter validation layerMark Lobodzinski
Changed the codegen to autogenerate validation functions for any new APIs without user intervention. Manual updates are only necessary to extend PV functionality. - parameter_validation.h is now checked into the layers directory - parameter_validation.cpp is now generated - parameter_validation_utils.cpp is new and contains any custom (non-generated) or housekeeping functions. - parameter_validation_utils.h is deprecated - updated database for new VUID coverage Change-Id: Ib9261894386145573ba9e8906ba4ad4e9fecbdfd