This change makes the loader conform to the latests specification
update, 1.3.227, which removes the requirement that implicit layers
API version is at least as high as the application provided API
version.
This change reduces friction for layer developers and API users.
It should be the same name so mingw-w64 toolchains can generate/use the same
DLLs as the MSVC toolchains. The DLL and import libraries are compatible both
ways.
Fixes#997
Check for the existence of the alloca.h header and only use it it exists,
otherwise fallback to stdlib.h. Some OS's like macOS and QNX have both
headers and can use either (stdlib.h includes alloca.h), some OS's like
OpenBSD / FreeBSD / NetBSD do not have the alloca.h header and require
the stdlib.h header.
Some functions in the wrapping test layer exported functions that are not necessary.
This caused some warnings in builds. Removing them fixes the warnings.
Put all of the parsing for ICD Manifest data into a separate function.
This cleans it up by not requiring manual tracking of allocated resources
while parsing, and allow much saner 'skipping' of incorrect ICD's.
This commit also addresses an issue where OOM during ICD parsing wasn't
immediately ending parsing and returning.
Re-add previously reverted behavior that allows layers to setup dispatch chains for unknown physical
device and device functions during vkCreateInstance. Previously, functions not known to the loader could not
be queried by a layer during vkCreateInstance (when dispatch tables should be setup). The change adds support
for unknown functions in the trampolines of vkGetInstanceProcAddr and vkGetPhysicalDeviceProcAddr.
Unknown Device functions not listed in a layers manifest will now be found through vkGetInstanceProcAddr,
which was previously not used.
Use more correct terminology for the various terminators of the
get proc addr functions. This makes it more obvious when each function
is being called, as well as removing the unecessary
loader_gpdpa_instance_internal.
There was a small issue with the initial version of the portability
enumeration extension where the portability enumeration flag bit would
be passed down to ICDs which did not expect flags to contain anything
other than zero.
While an argument could be made for those drivers to ignore flags they
do not recognize, just like extensions and other 'unknown' things, it
is best to play nice as this is the first instance creation flag bit
added.
loader_make_Version previously would decode the major, minor, and patch info out of version data. This results in
erroneous version checks that took into account patch version when they shouldn't of. The loader_make_full_version
function is introduced for code that wishes to get the full major.minor.patch version and uses of
loader_make_version that need the full version have been replaced.
Replace memcpy with memmove in terminator_CreateInstance to prevent possible issues
with the same memory being the source of the copy and the dest, as there is a for
loop which makes it possible for that to happen.
Chromium still supports building for Win7, as such the newly added support for
VulkanOn12/Dozen needs to be excluded from said build. This is achieved by using
the SDK version macros defined in <sdkddkver>
When creating a device, the loader looks for the VkDeviceGroupCreateInfo
structure and replaces it with its own. This allows the loader to edit the
struct. However, to do this required editing the pNext chain. Because the
edited chain contained pointers to structures whose lifetimes end when the
vkCreateDevice function returns, the pNext chain is now corrupted.
This commit fixes that by storing a pointer to the user's
VkDeviceGroupCreateInfo and fixing up the pNext chain to use that instead.
Previously, the loader supported static linking. This capability was restricted
to MacOS only, however the necessary functionality was never implemented. This
commit adds the required code to properly initialize the loader when statically
linked with MacOS
Since the test framework was designed to dynamically load everything, it would
require significant rearchitecting to support it. As such, a simple verification
executable was added to the live_verification folder, instead of full support
in the test framework.
Use the order defined the FolderManager's to define the order readdir
uses, rather than leaving it undetermined. This makes tests more consistent
by forcing layers and drivers to always be found in the same order on all
systems.
Note: MacOS doesn't currently have consistent ordering due to a crash with
ASAN. But even if ASAN isn't running, the dirent structure is being filled
out incorrectly, causing further test failures. While not ideal to disable
consistent ordering on MacOS, it is needed for linux and thus the issue
isn't high enough priority to resolve.
Allows drivers and layers to specify if they are 32 bit or 64 bit in the
manifest file. This makes the loader able to prune manifests without
loading the library and finding that it failed to load.
The loader options dummy targets were being linked into the public
interface of the loader, meaning that they were also set in projects the
include the loader as a sub-project. These override the containing
projects settings and can break things. There don't seem to be any
interface requirements in these settings, so include them as PRIVATE, so
that they stay local to the loader.