Enable /W4 errors on MSVC and fix all corresponding errors.
Refactor the CMakeLists.txt to allow for compiling with clang-cl. This required
figuring out that -Wall -Wextra mangle the set of warnings used. The solution
is to use /W4 instead when compiling with clang-cl on Windows.
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.
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
Generated functions stubs had either a return type of void or
VkResult. Recent vulkan extensions had functions which returned
uint32_t, uint64_t, and VkDeviceAddress. The
dispatch_table_helper_generator didn't account for this and GCC would
complain about mismatching types. While likely not an issue, it did
create very noisy builds.
Modified files:
loader/generated/vk_dispatch_table_helper.h
scripts/dispatch_table_helper_generator.py
Change-Id: Iba229093461b75fd6ccd195cf60e200a22b8678f
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
This change removes the assumption that vk_layer.h will include
vk_layer_dispatch_table.h, since it will be removed from vk_layer.h
in the near future.
Change-Id: I3fed5efbc35781c96aa9d0977d046c8555e04a7c
Modified dispatch table helper to replace null device extension
function pointers with an appropriate stub function.
Change-Id: If5e22333f084d3f41c0eefdf3e82c9060b872e8c
In some situations, the loader wouldn't directly use the
GetInstanceProcAddr or GetDeviceProcAddr function overrides directly.
Instead, the loader would call vkGetInstanceProcAddr with an
argument of "vkGetInstanceProcAddr" and vkGetDeviceProcAddr with an
argument of "vkGetDeviceProcAddr". This short-cuts that.
NOTE: Layers still need to support these queries because if another
layer is above you, it may call "vkGetInstanceProcAddr" with
to get "vkGetDeviceProcAddr".
Change-Id: I810945f45121d42d23b69d0b3334d6bad3a8ed2f
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