Validate the Vulkan dispatchable handles (VkInstance, VkPhysicalDevice, etc) for
any trampoline functions the loader uses to query the dispatch table from.
This is so we can at least report errors before something bad happens.
Also, add tests to the test framework to catch this case. Right now they simply
check to make sure we aborted, but they don't know why the loader aborted.
Eventually, we need to come back and check the loader messages and make sure it
aborted for the reasons we want.
Fix a generator warning in dispatch_table_helper_generator.py where a compare was
the wrong type.
Fixes GH Issue #64.
KhronosGroup/Vulkan-ValidationLayers switched to this method a while ago
and this syncs the KhronosGroup/Vulkan-Loader version of
helper_file_generator.py to match.
When calling in the vulkan header python generator the options have
changed in 1.2.142 which causes the options passed by the loader to be
off by one. This ends up setting the emitExtensions to the value of the
sortProcedure and eventually causes the script to fail.
This CL updates the loader to used named parameters for the generator so
that the addition of the genpath does not throw off the parameter
positioning.
Change-Id: I14fda7e90be985216c5243457a22fdcb01b5c82b
There was some old codegen that was used for generating validation
layers when those were in the same repo as the loader. Since they're
separate, we can remove the files so they only exist in the layers
repo.
Change-Id: Ia72f235ea0617f25258631e1003123ec3edd88d4
Changes:
- Integrate upstream script changes: We have to plumb-through the new
conventions object to continue using the makeCParamDecl utility function
- Add GGP to available platforms
- Add handling for extension dependencies: Previously, the codegen for
loader trampolines could not handle an extension command that depends on
more than one extension being present. This removes that limitation
- Add checks for device extensions: This adds a check for two functions
at device creation time:
* VK_KHR_device_group
* VK_EXT_full_screen_exclusive
The loader needs to know about these extensions for proper handling
of the vkGetDeviceGroupSurfacePresentModes2EXT terminator
- Update known-good file
Updated:
- `loader/loader.c`
- `loader/loader.h`
- `scripts/common_codegen.py`
- `scripts/dispatch_table_helper_generator.py`
- `scripts/helper_file_generator.py`
- `scripts/known_good.json`
- `scripts/loader_extension_generator.py`
- `scripts/loader_genvk.py`
Change-Id: I9f0828a8eee0e8e95b479e1b8feb31acaa10040d
This is a trivial change that replaces `==` operator with `is` operator, following PEP 8 guideline:
> Comparisons to singletons like None should always be done with is or is not, never the equality operators.
https://legacy.python.org/dev/peps/pep-0008/#programming-recommendations
Change-Id: I4f9f6c921e4158365d4e41965bfcd43b7a3c07e0
The 1.1.90 header introduced the use of "\textrm" in `vk.xml`, requiring
changes to `scripts/helper_file_generator.py`
Change-Id: I0ee5012611d95cfdd1715a4e870a3b2b4e7556ee
Add three missing device extensions to promoted device extensions list
in vk_extension_helper codegen.
VK_KHR_relaxed_block_layout
VK_KHR_shader_draw_parameters
VK_KHR_storage_buffer_storage_class
Change-Id: I392155d318ca580e576436ef46695218e5eb446e
Add additional metadata to *Extensions structs to enable extension
dependency validation at CreateInstance CreateDevice time.
Refactor the code generator for the extension helper prior to
refactoring the generated code to address an incomplete.
Change-Id: I79ae680d9c41f1f153ee8108d4deac8ec8c5a886
Refactor vk_extension helper prior to adding extension dependency
information to code gen. Refactor to simplify feature addition.
Change-Id: I7b2902dd1a4070c83810f57c0836b50cb6ecfb86
Sorted the extensions by name s.t. the output of the vk_extension_helper
generator would be consistent run-to-run.
Change-Id: Ief3d822b91260e469f7f2d563076d8a79f1a1bf0
Update and correct validation of passed apiVersion for 1.1 specified
behavior. Instances with apiVersion > 1.1 will be validated as 1.1
instances (and warn). Instances with apiVersions < 0 and < 1.0 will be
validated as 1.0 instances and generate an error. Instances with
missing or 0 apiVersions will be treated as 1.0 instances.
LOGCONSOLE warning converted to log_msg warning.
Change-Id: I2debb6175cf094918fc86cdea2973ddae9479a0b
Remove extraneous objecgt info from the validation logging message.
Extra object logging was added accidentally in my change to
incorporate VK_EXT_debug_utils.
Fix output of Debug Utils messenger output for validation layers
to list individual objects.
Also, fixed a few compiler warnings that were appearing on Linux.
Change-Id: I043d7f734683dfa79fe7a26a5973975bde011cce
The VK_ANDROID_external_memory_android_hardware_buffer extension uses
an android structure that is undefined before android 'O'. Worked around
this issue by defining a dummy structure for earlier android OS versions.
Change-Id: If515920d3b1707cbeb6a0377827c680d93d516ff
Modify enum cross reference table creation to handle missing items from
VK_DEBUG_REPORT_OBJECT_TYPE_ list, as it is no longer being updated.
Change-Id: I112a08f82249c446757495309699c80fe7094635
There is no corresponding DebugReportObjectType enum for
kVulkanObjectTypeDebugUtilsMessengerEXT, so map it to the unknown type.
The generation script skipped over this enum, causing buffer overflow
faults in the VkLayerTest.ValidationCacheTestBadMerge test.
Adding vk_enum_string_helper.h produced a warning that
GetPhysDevFeatureString was unused. Made it inline (as all
the other commands are in that header) and it made the compiler
happy.
Change-Id: I9452ddfc8de4af4c88b95e380b9520d9f59796da
This affects the loader, scripts, and layers and introduces the
changes to support the VK_EXT_debug_utils extension.
Change-Id: Ia5336f63e85b00f1e59416c06aacd4ae331fd692
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
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)
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
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
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
In the Enum string helper header, tack on a routine to convert an
index into a VkPhysicalDeviceFeatures structure into its
corresponding feature string.
Change-Id: I8fbfb6fcbfa63361a851ffc93ffd832696050d51
Replace all usages of the deprecated validextensionstructs member
attribute with the registry.validextensionstructs dict. Internally the
registry builds this extension dictionary using the new structextends
type attribute.
Change-Id: I072ff707bfdfa1f576266291e4196837da526287
Update the headers and xml file with the latest spec changes for
Vulkan 1.0.54. Also, make corresponding loader and layer changes
to support the new extensions.
Change-Id: I11273c5e3e828743f904e4f0b4b2f2c3a7804df0
This file replaces device_extensions.h and will help to unify
extension enable handling across the validation layers.
Change-Id: I00eb187423e5d912bae64c0e026f34496be185de