aboutsummaryrefslogtreecommitdiff
path: root/layers/parameter_validation.cpp
AgeCommit message (Collapse)Author
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-18layers: GH859 Fix error messages for viewport/scissors stateTobin Ehlis
The checks are correct but error messages were backwards and stated "contains" instead of "does not contain".
2016-08-15layers: GH785, Validate rasterinfo->polygonModeMark Lobodzinski
If fillModeNonSolid is not enabled, polygonMode cannot be set to POINT or LINE. Change-Id: I6cfdfac8f5c9ff7d27b94bf0aa80ae1249b0ce25
2016-08-15layers: Fix missing PV WSI registrationMark Lobodzinski
Change-Id: I1c924977a420bc7a417710b82f0a42f4ae5dd4c3
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-08-11layers: Validate Enabled Features in PVMark Lobodzinski
ParameterValidation was using the hardware supported feature set for validation -- these are now replaced with the application-enabled features at CreateDevice time. Change-Id: If52d3ae3e55c69611e02437d33a651d88ba7043d
2016-08-04layers: Fix function interception list for param validationChris Forbes
A bunch of things were missing here. Signed-off-by: Chris Forbes <chrisforbes@google.com>
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-07-12layers: Handle special layerCount caseDustin Graves
Make parameter validation logic for VkImageSubresource ignore layerCount when it is set to VK_REMAINING_ARRAY_LAYERS. Change-Id: Ib2e50e678c79f00850e085fe39c22631f9d00636 Issues-Addressed: GitHub VulkanTools #58
2016-06-29layers: Take care of DevLimits cleanup itemsMark Lobodzinski
Added some simplifying make_unique() calls, changed param_validation Log_msg calls to use LayerName var, added variable init to constructor, and fixed some c-style casts. Change-Id: I718e0d51b62a4b91a4c9b3645ff796d114a4432f
2016-06-29layers: Moved devlimits UpdateDescrSets to PVMark Lobodzinski
DevLimits GetDeviceQueue validation was redundant, moved updateDescriptorSets devlimits validation into parameter validation. Change-Id: Ic7bf2450c835cb5a35b687be5872cbbd0d70ac95
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-06-29layers: Add phyDevProps call to Param ValidationMark Lobodzinski
Change-Id: I3a8249c741d1695675842f1be09d3d63a92f900d
2016-06-10layers: GH536, Update CmdFillBuffer validationMark Lobodzinski
Was ignoring VK_WHOLE_SIZE. Moved validation cases for Update/FillBuffer to Parameter Validation layer (as they were stateless) and added the remaining additional stateless valid usage checks. Change-Id: I0f41c6ba55f218a6db9fb34736a2abc52f856edf
2016-06-06layers: Add default layer error message configMark Lobodzinski
Allows layers to output error messages even if no vk_layer_settings.txt config file is present. Sets defaults to LOG_MSG, error, stdout. A layer settings file will override any default values. If no settings file is present and an app creates a debug callback, the default callbacks will be removed and unregistered. Change-Id: I49f37189665816df58c258b9e9629f2bf76751c8
2016-06-02layers: simplify v0 function implementationsChia-I Wu
Since each of the layer library contains only a layer, we can simplify v0 functions by making them wrappers to the contained layer's corresponding commands. While we have to make changes to each layer individually, all the changes should be the same in spirit. The exception is vk-layer-generate.py where the missing vkEnumerateDeviceExtensionProperties is also added.
2016-06-01layers: More noautovalidity processing for structsDustin Graves
Apply 'noautovalidity' code generation logic to struct members. Previously, struct pointers tagged as noautovalidity were ignored by the code generator, but the members of non-NULL struct pointers were still processed. Now both the struct pointer and the struct members are ignored when the struct pointer has the 'noautovalidity' attribute. Change-Id: I14bc231210f2440fb8bb3df8c73ef165100f0daa
2016-05-21parameter_validation: avoid invalid GIPA call in vkCreateDeviceChia-I Wu
Save VkInstance in layer_data so that we query vkCreateDevice with a valid instance.
2016-05-21parameter_validation: handle device commands in GetInstanceProcAddrChia-I Wu
Call intercept_core_device_command in GetInstanceProcAddr.
2016-05-21parameter_validation: no interface functions in layer functionsChia-I Wu
Move handling of interface functions in parameter_validation::GetInstanceProcAddr to v0's vkGetInstanceProcAddr.
2016-05-21parameter_validation: refactor GetInstanceProcAddrChia-I Wu
Split command intercepting out to intercept_core_instance_command. Assert that instance is valid if intercept_core_instance_command returns nullptr.
2016-05-21parameter_validation: add intercept_core_device_commandChia-I Wu
It returns the function pointers for all intercepted core device commands. Call intercept_core_device_command from GetDeviceProcAddr. Assert that device is valid in GetDeviceProcAddr.
2016-05-21parameter_validation: improve EnumerateDeviceExtensionPropertiesChia-I Wu
Call down the next layer unless pLayerName is parameter_validation.
2016-05-21parameter_validation: add parameter_validation::global_layerChia-I Wu
Replace pc_global_layers with global_layer. There is no plan to define more than one layer in the same namespace.
2016-05-21parameter_validation: drop vk prefix for layer functionsChia-I Wu
Drop VK_LAYER_EXPORT as well.
2016-05-21parameter_validation: put layer functions into a namespaceChia-I Wu
Put all layer fucntions/data into parameter_validation namespace. I had to add some wrappers to make everything work.
2016-05-21parameter_validation: move vkEnumerate*Properties aroundChia-I Wu
Move them toward the end of the file.
2016-05-19layers: Fix intercepts of parameter_validationTobin Ehlis
Make parameter_validation register vkFreeDescriptorSets() and vkUpdateDescriptorSets() functions as intercepted.
2016-05-17layers: Ignore 'noautovalidity' params w/codgenDustin Graves
Add special handling to the parameter_validation layer's code generator for vk.xml parameters with the 'noautovalidty' attribute: - Ignore vk.xml parameters with the 'noautovalidity' attribute when generating code for the parameter_validation layer. - Implement custom validation routines for parameters with 'noautovalidity' tags. Issues-Addressed: GitHub 515 Change-Id: I1bd28cc79233fb8b040d6e107ed5e2176a84edb5
2016-05-12layers: Additional vkCreateImageView validationDustin Graves
Add more vkCreateImageView parameter validation, based on the valid usage section for VkImageViewCreateInfo in the Vulkan specification. Issues-Addressed: LX #502 Change-Id: I7fd743312f43a8ff36f2db9f6b50569d630f9dca
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-12layers: Adjust queue family index error messagesDustin Graves
Adjust parameter_validation layer's validate_queue_family_indices error messages: - Split validate_queue_family_indices into separate functions for arrays of indices and single index values, allowing error messages to be formatted with and without array brackets when appropriate. - Print the correct parameter name in error messages. Change-Id: I9a77ccbd0ad14da4732362d2694ed205e13c3a40
2016-05-11layers:LX#470 Fix poor use of hex vs dec outputMark Mueller
1) Introduce convention of explicitly placing "0x" before hex format requests for clarity (don't use "%#") 2) All lower case in hex output (except w/stringstream which refuses to do anything but uppercase, possibly only on windows). 3) Decorated pointers are printed for all Vulkan structure types. 3) Some intelligence in generators based on Vulkan variable name: if the Vulkan variable name contains ("flag", "bit", "offset", "handle", "buffer", "object", "mask") it will be output in hexadecimal format 4) Remove "using namespace std;" from global scope of vk_struct_string_helper_cpp.h Change-Id: Idbae73bfdaa3bc059543d43b209373cd0bcbc099
2016-05-10layers: Add missing parameter_validation functionsDustin Graves
Add the following to address missing functionality in the parameter_validation layer: - Add parameter_validation_vkResetCommandBuffer call to vkResetCommandBuffer - Add missing vkGetPhysicalDevice.* exports to GetInstanceProcAddress Change-Id: I73944933b0c318f691a14c305c192aa7a0bf8ded
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: Add missing vkCmdSetStencil param checksDustin Graves
Add missing parameter validation for vkCmdSetStencil* functions. Change-Id: Ib2d2527341815412bc441427ba1dbf6d3826f3c6
2016-04-28layers: Use tmp callback for msgs during vk{Create|Destroy}Instance().Ian Elliott
This is implements some relatively-new functionality of the VK_EXT_debug_report extension. An application can pass VkDebugReportCallbackCreateInfoEXT structs on the pNext chain given to vkCreateInstance(), in order to setup one or more callbacks that can be used during vk{Create|Destroy}Instance(). These special, "temporary callbacks" allow messages (e.g. errors) to be logged during the time when the debug_report extension is normally not setup. A set of utilities copy VkDebugReportCallbackCreateInfoEXT structs from the pNext chain given to vkCreateInstance(). These utilities are used by the validation layers that may have messages (e.g. errors) during vk{Create|Destroy}Instance().
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-18layers: Make logicOp param validation conditionalDustin Graves
- Only validate that VkPipelineColorBlendStateCreateInfo::logicOp is a valid VkLogicOp enumeration value when VkPipelineColorBlendStateCreateInfo::logicOpEnable is set to VK_TRUE. - Remove redundant VkPipelineColorBlendStateCreateInfo validation (hand written code replaced by generated code). Change-Id: I075c58342678219c5ed1dd5c401e0da2cea53232
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-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-29Remove device from layer_data_map at destroy in parameter_validationTony Barbour
Change-Id: I964302597c0cbcbb7bb8c73d55fd6b00ebe0e765
2016-03-24layers: LX450, Tighten up queueFamilyIndex validation, fix crashMark Lobodzinski
For CreateBuffer and CreateImage the QFIs should be ignored unless sharingMode is set to CONCURRENT. Also added QFI validation to CreateCommandPool and added a special case for when an index is incorrectly set to QUEUE_FAMILY_IGNORED. Change-Id: I17639230ea7aa58ab89b9b0dc33e55927e9f1c84
2016-03-22misc: Update to header version 1.0.6Jon Ashburn
Change-Id: Idf7a9d40278b796e16effa54e9b60668d275b8ec
2016-03-22Remove device from layer_data_map at destroy in parameter_validationTony Barbour
Change-Id: Ife2286cc807288c9900b084f5f7c5a09d830f87a
2016-03-21layers: Rename param_checker to parameter_validationMark Lobodzinski
Also, param_check.h -> parameter_validation.h and .json files changed. Change-Id: I9db10563bcc2640fe6b90588d3c80c4fe50a8a83