aboutsummaryrefslogtreecommitdiff
path: root/layers/parameter_validation_utils.h
AgeCommit message (Collapse)Author
2017-06-08layers: Fix some valgrind issuesChris Forbes
2017-06-06layers: Remove unused extension enable data structsMark Lobodzinski
Change-Id: Id70d38c4e2d6f0d78b7e2d6e2108b0f39f3e99db
2017-06-06layers: Unify extension enable trackingMark Lobodzinski
Switch parameter validation code-generated extension dependency checks to use the existing data in vk_extension_helper.h. Change-Id: I6e3c83f68430c1d3de915e05a84944782b4a55a2
2017-06-06layers: Rename PV device extension enablesMark Lobodzinski
Change-Id: I4078b279dd812694c358fdcc9f23f5620befaca0
2017-06-06layers: Move PV to use new extension helperMark Lobodzinski
Change-Id: Ia11632d241b0c717364cc8a2a26d3daaa66bcde5
2017-05-31Layers: Implement PV per-API ext dependency checksMark Lobodzinski
As each API is used, PV will now us a code-generated check to verify that all of the required extensions for this particular API call have been enabled via CreateInstance or CreateDevice. Change-Id: I1c11d0b8322edf005b2b197a415c92a82e0cb810
2017-05-31layers: Move PV layer data structs into headerMark Lobodzinski
Change-Id: Ie8fb823f1bfa97047cb2d361bc0daea5ee504673
2017-05-31Layers: Add code-gen'd calls to val extsMark Lobodzinski
Modified PV code gen to insert and make calls to validate extension dependencies. Change-Id: I90103b16d36fb868b32df796b1dae7741dfcba34
2017-05-31layers: PV code gen for FlagBits enum parametersMike Schuchardt
Extend validate_flags to work in instances where a single Vk*FlagBits enum value is valid instead of a bitmask with multiple values. Change-Id: Ib8d34551923f7ecb2549500dfde674fa1094ac8b
2017-05-19layers: is_extension_added_token(VK_*_MAX_ENUM) returns falseCort Stratton
Also implemented the VkSamplerAddressMode variant in terms of the generic variant, and added a test to make sure that path is covered.
2017-05-10layers: Add exclusion list to validate_result in PVMark Lobodzinski
Allows specifying return codes to ignore in parameter validation. Change-Id: Iebf11920c3921c39190903b2750f4b3d61fe6242
2017-05-03layers: Use InstanceExtensions in PVChris Forbes
2017-04-22layers: Use UNKNOWN object type instead zero-castMark Lobodzinski
Change-Id: I36c175e78d7a33667f1485ed0e53f1dadab62a31
2017-03-28layers: Add pNext cycle/redundancy checks to PVMark Lobodzinski
Change-Id: I06d311821ef0c10683ad8bdaf076231143cde22f
2017-03-01vulkan: update to header 1.0.42Mark Young
Updated all necessary files to 1.0.42. This includes the various headers as well as the loader, and the parameter validation, object tracking, and threading layers. Additionally, bump all layer JSON files to 1.0.42. Also, in this change: - Enable loader extension automation so that the loader now generates all extension entry-points automatically during build to reduce likelihood of missing a critical piece on header update. - Enable layer dispatch table extension automation for the same reason. - Fixes from Mark Lobodzinski and Tony Barbour to resolve crash in loader when working with Intel's Windows driver due to GetInstanceProcAddr getting called on inappropriate command names. Change-Id: Ic18d3fac2e145c386c0192031deb5089c91a00d8
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
2017-01-26repo: Clang-format c/cpp/h LVL files using LLVMMark Lobodzinski
Bring all source files in the repo up to date with consistent coding style/standard. Change-Id: Iceedbc17109974d3a0437fc4995441c9ad7e0c23
2017-01-24loader: Update the loader to 1.0.39Mark Young
Add new extensions for 1.0.39. Also, updated layers to include minimal set of functionality for 1.0.39 extensions. Extensions include: - VK_KHR_get_physical_device_properties2 - VK_KHR_shader_draw_parameters - VK_EXT_direct_mode_display - VK_EXT_display_surface_counter - VK_EXT_display_control Also, redo the LoaderAndLayerIf document. Change-Id: I10412086da7a798afe832a3892e18f606259b5af
2016-12-15layers: PR1276, Fix Clang compiler warningsJamie Madill
fixes - error: using namespace directive in global context in header - error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' Change-Id: If56d5b9c33f0de813fbb67120650a887eb9368b0
2016-11-07layers: Add tracking for VK_KHR_display extension in PVChris Forbes
Signed-off-by: Chris Forbes <chrisforbes@google.com>
2016-11-07layers: Rename ambiguous 'wsi_enabled' to 'surface_enabled' in PVChris Forbes
Signed-off-by: Chris Forbes <chrisforbes@google.com>
2016-11-07layers: Move platform WSI extension checks from swapchain to PVChris Forbes
We want to do all extension checks in PV-- we'll return a good FP for anything we recognize, and complain upfront if the appropriate extension wasn't enabled. Signed-off-by: Chris Forbes <chrisforbes@google.com>
2016-10-14layers: Suppress warning generation after app acknowledges an errorChris Forbes
The app already knows about the problem-- it has requested that the call be skipped. Producing another warning afterward is just noise. Signed-off-by: Chris Forbes <chrisforbes@google.com>
2016-10-11layers: Updating some CreateBuffer checks to use unique enumsKarl Schultz
Small batch of updates to use unique validation error enums and messages for a few checks. Updated the database file and flagged some other checks that are missing with the error enums and TODO notes. Change-Id: I2020a88bbdcf7ea6d725f667523e89b160fe7ab8
2016-09-23layers: Prevent reading uninitialized "count" when validating array parametersJózef Kucia
2016-08-24layers: Fix parameter_validation array name formatDustin Graves
Replace std::string with ParameterName for the parameter_validation utility functions so that the parameter names printed by these functions contain the correct array subscript values. Issues-Addressed: GitHub #462 Change-Id: I09fc6a45e8e41ba28ef7d8fc44ce9e8874feefad
2016-08-11layers: Update PV variable names, clang-formatMark Lobodzinski
Change-Id: I1c1da95bbfa1dce31b2b109ec7dea0c770af44c9
2016-08-11layers: Add WSI support to parameter_validationMark Lobodzinski
Change-Id: Ieb52e121632c6297eee5e37baeade5f0c8f8f3e5
2016-07-20layers: Change pNext validation error to warningDustin Graves
Change the severity level of the parameter_validation layer's pNext parameter validation messages from error to warning. Also add an explanation that the warning is derived from the Valid Usage language from version X of the Vulkan spec/header, which may be out of date: This warning is based on the Valid Usage documentation for version %d of the Vulkan header. It is possible that you are using a struct from a private extension or an extension that was added to a later version of the Vulkan header, in which case your use of pNext is perfectly valid but is not guaranteed to work correctly with validation enabled Issues-Addressed: LunarXchange 560 Change-Id: I97f55cba7538506d246e45ef603a86db9ad1adcb
2016-06-29layers: Move devlimits validation into PVMark Lobodzinski
Moved CreateRenderpass and BeginCommandBuffer validation into parameter validation and hooked up enumeratePhysicalDevices. Change-Id: Ie074b055c1d6252e503bce744cb7d718e6eb528f
2016-05-17layers: Fix transposed messagesDustin Graves
Fix parameter_validation::get_result_rescription utility function, which had the messages for VK_ERROR_DEVICE_LOST and VK_ERROR_INITIALIZATION_FAILED transposed. Change-Id: I47126389cbfafce663ec474fa04b899e6f2f663c
2016-05-12layers: Additional vkCreateImage param validationDustin Graves
Add more vkCreateImage parameter validation, based on the valid usage section for VkImageCreateInfo. Issues-Addressed: GitHub #354 Change-Id: Ia978a64f6c03c3cf115a07e707099253104e04a1
2016-05-09layers: Add error codes for parameter_validationDustin Graves
Add error codes to the parameter_validation layer: - Add parameter_validation::ErrorCode enum defining common parameter validation errors to parameter_validation_utils.h - Replace the '1' in parameter_validation log_msg calls with the appropriate error code - Add parameter_validation error code documentation to vk_validation_layer_details.md - Remove 'typedef enum' declaration requirement for error code enumerations from vk_layer_documentation_generate.py; It will now recognize error code enmerations declared wihtout the typedef Change-Id: Icf18b9124000159f7436f66e48a95d0c58047a07
2016-05-09layers: Add parameter_validation namespaceDustin Graves
Add parameter_validation namespace for utility functions. Namespace will be extended to include core layer functions in a future update. Change-Id: I0929f5caacbf3e1b4509f051ea020566cce44e3e
2016-05-06layers: Fix param check debug report levelDustin Graves
Change VkFlags and enumeration debug report levels from WARNING to ERROR. Change-Id: I06bf454c77dee2cd46db29cd1ffcb67febfba666
2016-04-28layers: Add 0 check for VkFlags array elementsDustin Graves
- Add parameter validation for the case where the elements in an array of VkFlags values must not be 0 - Replace the template parameter in the VkFlags validation functions with the VkFlags base type. Change-Id: Ie85d4d048b21e73409ff817425a1db64570e1b2f
2016-04-28layers: Add VkFlags parameter validationDustin Graves
Add parameter validation for VkFlags derived types to the parameter_validation layer's code generation scripts. The following validation checks are performed: - If a VkFlags parameter is not marked as optional in the XML, a message is generated when the parameter is 0. - If a VkFlags parameter is not 0, a message is generated if it combines bits that are not defined by its associated flag bits enumeration. - If a VkFlags parameter does not have an associated flag bits enumeration it is treated as a reserved value that must be 0. Change-Id: I6daed360cde46e2a27c84deda1e0798621f92d50
2016-04-28layers: Merge enum array NULL/value checksDustin Graves
- Merge the NULL checks and enumeration value checks performed for arrays of enumeration values into a single function call. This is consistent with the validation for arrays of other types. - Reduce duplicate array checking code. Change-Id: I8c4e05542bb2f52f5623fe6c7ed3629b9b2680e0
2016-04-20layers: Add handle NULL checks to codegenDustin Graves
Add support for validating that required handle parameters are not specified as VK_NULL_HANDLE to the parameter validation layer's code generator. - Add new parameter validation utility functions to validate required handles and arrays of handles. - Add new parameter validation layer entrypoints for functions that previously had no parameters to validate. - Add handle validation logic to the parameter validation code generator. Change-Id: I7a5680954245db4c1b12587f78e30e17c3903d6c
2016-04-19misc: Update licenses to Apache 2.0Jon Ashburn
Change-Id: Id447f4c8c53d33f9192940bdd3ae727b7b738a97
2016-04-06layers: Fix unsafe bool mix warnings (part 2)Dustin Graves
Fixes the MSVS warnings regarding unsafe mix of VkBool32 and bool for the device_limits, image, parameter_validation, and threading layers. Converts all Boolean usage internal to the layers to bool/true/false. The VK_TRUE and VK_FALSE values continue to be used with the Vulkan API components. Change-Id: I612d3f26050fadcd77ffca4d8723a7c734613816
2016-04-02layers: fix spelling mistakesEric Engestrom
2016-04-01layers: Update param_checker VkResult validationDustin Graves
VkResult validation now prints a description of the error code being returned. Change-Id: Ia6dc4e71ef6d1b27365e3c0499b24a3fc1d332ac
2016-04-01layers: Codegen VkBool32/enum parameter validationDustin Graves
Now generating the VkBool32 and enum checks: - Warns if a VkBool32 parameter is neither VK_TRUE nor VK_FALSE - Warns if an enum token value falls outside of the enum's begin/end range and the token was not added by an extension. Only checkes enum's that have a begin/end range. Detection of tokens added by extensions is based on the base_value defined in appendic C.10 of the Vulkan specification. Change-Id: Id49ace52fea8a35972f96d54247b98aba182c09e
2016-03-21layers: Rename param_checker to parameter_validationMark Lobodzinski
Also, param_check.h -> parameter_validation.h and .json files changed. Change-Id: I9db10563bcc2640fe6b90588d3c80c4fe50a8a83