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.
Shuffle the bus IDs for discrete devices pd0, pd3, and pd4. Notably this
puts pd0 from icd0 in between pd4 and pd3 from icd2, making default
sorted order extremely unlikely if not impossible.
When checking for unknown physical device functions, check the first layer that supports
vk_layerGetPhysicalDeviceProcAddr in the chain starting with the layer closest to the
application. This prevents unecessary work being done, and if any layer wraps VkInstance
will properly call through the wrapping layer first without calling into any other layer.
Better describe the function's purpose and behavior, moving the
reason for introducing vk_layer|icdGetPhysicalDeviceProcAddr to
a following section for clarity.
Various situations could cause an OOM to turn into a hard crash due to double freeing
of memory that was improperly cleaned up. Also fixed memory leaks when layers would
report OOM.
Previously the loader would destroy any debug callbacks created during instance creation
to later create new ones during instance destruction. This required a memory allocation
to occur inside vkDestroyInstance, which can cause leaks if an OOM occurs during
instance destruction.
This commit simplifies the logic by keeping around the allocations made during instance
creation by moving them into their own debug node chain. Then during instance destruction
moves them back.
Also renames several functions to better describe their intended purpose.
This prevents bugs where uninitialized memory is treated as a real path. It
should fix an issue where sometimes CI would fail due to what appears to be a
spurious path with junk characters.
Split up into two tables:
- Active
- Deprecated
Clean up restrictions into their own column for easier viewing.
Made text slightly smaller to fit more in a smaller space.
When checking for the portability driver field of driver manifests,
the loader did not check if inst was NULL first. Since this function
is called in pre-instance functions, this crashes the loader.
Make cJSON pass the VkAllocationCallbacks instead of the loader_instance.
This removes and unecessary dependency between cJSON and the loader headers.
It also somewhat simplifies the interface by not requiring the inst parameter
everywhere, just in the creation of cJSON pointers and freeing.
Created wrapper functions loader_alloc, loader_calloc, loader_free,
and loader_realloc. Made the existing loader allocation functions use
them. Replaced manual usage of VkAllocatorCallbacks with the new
wrapper functions.