Jan Palus [Mon, 28 Nov 2022 12:29:21 +0000 (13:29 +0100)]
cmake: fix pkgconfig file for absolute install paths
Fixes #1076
Charles Giessen [Fri, 18 Nov 2022 00:20:17 +0000 (17:20 -0700)]
Add more OOM handling paths and refactor OOM tests
There were more cases where OOM wasn't being propagated correctly, or
even caught in the first place. This change makes all of those paths
report OOM to the application as is expected. One case was due to linux
sorting erroring out but then leaking memory, which wasn't caught because
the tests didn't create devices that supported PhysDevProps2.
Lastly, since the Allocation tests were taking much longer due to making
many more allocations, the MemoryTracker was rewritten to use
std::unordered_map to speed up insertion and lookup of allocations made.
Mike Schuchardt [Thu, 17 Nov 2022 17:45:13 +0000 (09:45 -0800)]
build: Update to header 1.3.235
- Update known-good
- Generate source
Charles Giessen [Wed, 16 Nov 2022 23:29:09 +0000 (16:29 -0700)]
Add complex json file to allocation tests
This helps exercise the cJSON OOM handling code. The json file is
just a copy of the validation layer manifest file.
Charles Giessen [Wed, 16 Nov 2022 23:04:59 +0000 (16:04 -0700)]
Propagate OOHM error from json parsing
There was a few places where an out of memory error could be generated
by parsing json but were not passed on upwards, causing CTS tests to fail.
Charles Giessen [Wed, 16 Nov 2022 04:16:55 +0000 (21:16 -0700)]
Fix cases where OOM was handled wrong
goto's were replaced by returns erroneously. This caused unfreed memory in
certain OOM scenarios, caught by CTS. The reason the loader tests didn't catch
this was because the fake drivers did not report any extensions, thus no memory
was allocated (which would later be leaked). This commit addressess this
deficiency in the tests as well, which included correctly incrementing the
MemoryTracker's allocation count during realloc.
Charles Giessen [Thu, 10 Nov 2022 22:00:04 +0000 (15:00 -0700)]
Handle invalid files & symlinks properly
If loader_get_json fails due to the file missing or the file being a
stale symlink, it returns VK_ERROR_INITIALIZATION_FAILED
which loader_parse_icd_manifest passed upwards. Since the caller of
loader_parse_icd_manifest wasn't expecting that error code, it didn't
skip the ICD, causing an infinite recusion in EnumInstExtProps due
to the call to dlsym("vkEnumerateInstanceExtensionProperties");
This also required changes to callers of loader_get_json which would
propagate VK_ERROR_INITIALIZATION failed during layer searching to
no longer cause vkCreateInstance to abort if any invalid files were
found.
Added tests for symlinks as the origin of this bug is due to 'stale'
symlinks after driver installers
Charles Giessen [Thu, 3 Nov 2022 17:37:15 +0000 (11:37 -0600)]
Recheck API version in terminator_CreateInstance
Layers are liable of changing the API version during the call down
vkCreateInstance. Certain layers use the guarantees of 1.1 to allow
using VK_KHR_get_physical_device_properties2 functionality. This
commit checks and assignes a new API version if it was modified.
Add tests for when the application forgets to enable 1.1 and when
a layer enabled 1.1 on behalf of the application.
Waffl3x [Fri, 11 Nov 2022 06:06:47 +0000 (01:06 -0500)]
Remove redundant code
loader_make_version recently was changed to zero out the patch version, explicitly doing it is no longer necessary.
Juan Ramos [Thu, 10 Nov 2022 23:46:39 +0000 (16:46 -0700)]
cmake: CMake cleanup
- Use idiom for CMAKE_MODULE_PATH
- find_package(PkgConfig) instead of include(FindPkgConfig)
- Remove CMake 2.X code workaround
- Use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR
- CMakeParseArguments is now part of the language
Charles Giessen [Wed, 9 Nov 2022 23:24:05 +0000 (16:24 -0700)]
Add macOS-latest CI action
Re-enables using the macOS-latest github actions runner now that the loader
has been fixed for newer macOS versions.
Mike Schuchardt [Thu, 10 Nov 2022 16:30:24 +0000 (08:30 -0800)]
build: Update to header 1.3.234
- Update known-good
- Generate source
Charles Giessen [Fri, 14 Oct 2022 23:51:02 +0000 (17:51 -0600)]
Call both EnumPhysDevs & EnumAdapterPhysDevs on drivers
This change is necessary to allow drivers that have both real physical
devices with a LUID and software based physical devices which lack a LUID.
It works by calling both vk_icdEnumerateAdapterPhysicalDevice and
vkEnumeratePhysicalDevice then deduplicating the returned physical devices
using the VkPhysicalDevice handles.
This commit also fixes an issue where tests would erroneously add a layer to the
driver registry.
Charles Giessen [Sat, 15 Oct 2022 00:08:49 +0000 (18:08 -0600)]
Remove log message of ICD extension lists
Charles Giessen [Sat, 5 Nov 2022 22:12:00 +0000 (16:12 -0600)]
Dont abort when WSI functions are NULL.
Commit
d1db6c5bce9ed474ca124f0bffed9aa2468f3973 changed a few WSI functions
to abort when the driver's function was NULL, which is a change of existing
behavior. It should instead return VK_SUCCESS. At least now there is a
warning message.
This commit also adds tests for the above situation and for debug utils
& debug marker functions to make sure the pre-existing behavior is maintained.
This was tested by running the loader with a previous build through the new
tests and verified that they both passed. The tests run the cases of whether
the extensions were enabled, how the functions were queried (GIPA vs GDPA), and
whether the hardware supports the extensions.
Juan Ramos [Tue, 8 Nov 2022 21:04:18 +0000 (14:04 -0700)]
cmake: Use new VulkanHeaders cmake support
Removes need to have FindVulkanHeaders.cmake
Charles Giessen [Mon, 7 Nov 2022 22:50:00 +0000 (15:50 -0700)]
Remove USE_CCACHE build option
The way to use ccache has changed since this documentation & build
option were added. Update the docs with the new way to enable ccache
and remove the build option.
Mark Mentovai [Mon, 7 Nov 2022 15:11:03 +0000 (10:11 -0500)]
loader/cJSON: replace sprintf calls with snprintf
This makes it possible to build Vulkan-Loader without warnings using the
macOS 13 SDK. Calls to sprintf are replaced with snprintf, passing
appropriate buffer sizes.
It doesn’t appear that any of the changed uses of sprintf were actually
unsafe, so no behavior change is expected aside from SDK compatibility.
The macOS 13 SDK deprecates sprintf as it’s difficult to use safely. The
deprecation warning message is visible when building C++, but it is not
normally visible when building plain C code due to a quirk in how
sprintf is declared in the SDK. However, the deprecation message is
visible when building plain C under Address Sanitizer
(-fsanitize=address). This discrepancy was discovered at
https://crbug.com/
1381706 and reported to Apple with a copy at
https://openradar.appspot.com/
FB11761475.
The macOS 13 SDK is packaged in Xcode 14.1, released on 2022-11-01. This
also affects the iOS 16 SDK and other 2022-era Apple OS SDKs packaged in
Xcode 14.0, released on 2022-09-12.
Vulkan-Loader is visible to the Chromium build via PDFium, and this
change is needed to allow Chromium to move forward to the macOS 13 SDK.
Charles Giessen [Wed, 26 Oct 2022 18:24:24 +0000 (12:24 -0600)]
Fix vulkan.pc Libs.private for static builds
The Libs.private field shouldn't be present for shared library builds,
so now the field wont be present in that case. For static library builds
it should be present, but the fields should be deduplicated as well.
Additionally, this adds a github actions run for testing the static
build of the loader on MacOS. This requires making the test framework
capable of using a statically built loader, which mainly took making
VulkanFunctions capable of assigning the statically defined functions
instead of loading them with dlsym.
The static build option required changes to the unix_shim.cpp to not
cause infinite loops.
Charles Giessen [Thu, 3 Nov 2022 22:18:20 +0000 (16:18 -0600)]
Fix tests for env-var filtering due to previous commit
The previous commit altered vkCreateInstance erroring out if the
application tries to enable an env-var disabled layer, so the tests
need to be revised for it. This commit also makes lot of modifications
to the tests in addition to that.
Also adds tests for when the override layer is present and when
implicit layer's enable-environment variables are present.
Charles Giessen [Tue, 1 Nov 2022 20:45:32 +0000 (14:45 -0600)]
Fix env-var filtering in layer enumeration
Disabled layers would appear in the output of EnumerateInstanceLayers, which was
not intended. Move the removal of layers that are disabled by the env-var to after
the explicit layers are found.
Charles Giessen [Mon, 31 Oct 2022 23:27:29 +0000 (17:27 -0600)]
Add the 1.3.224 Header version to the Env-Var documentation
This way users know exactly which version of the loader contains the
new environment variables.
Charles Giessen [Tue, 4 Oct 2022 22:49:24 +0000 (16:49 -0600)]
Remove redundant layer searching in term_EnumDevExts
When terminator_EnumerateDeviceExtensionProperties is called, the app
now only checks that the type flag is implicit rather than building up a new
list of implicit layers, as building a list could cause many suprious log
messages and was unecessary. This commit also removes some redundant copies &
for loops in the function.
Mark Young [Wed, 7 Sep 2022 19:34:46 +0000 (13:34 -0600)]
Update and clarify filter documentation
Based on review feedback from @hadess
Mark Young [Wed, 7 Sep 2022 18:57:35 +0000 (12:57 -0600)]
Put placeholder for loader version
TODO: Replace all 1.3.yyyy with appropriate header version after
approval.
Mark Young [Wed, 7 Sep 2022 18:51:19 +0000 (12:51 -0600)]
Update so filters apply results to vkEnumInstanceLayerProps
Also remove duplication so that common code is used in several places.
Mark Young [Tue, 26 Jul 2022 19:35:25 +0000 (13:35 -0600)]
Add loader enable/disable env vars
Add new environment variables that will allow the loader to filter
layers and drivers in specific ways.
This control should give developers ways to more quickly narrow down
issues with a layer or driver.
Also, it should give CI environments a mechanism to selectively enable
only drivers and layers that are needed for testing.
Add tests to support validating the new changes.
Add documentation that describes the new changes and also create new
loader debugging markdown document to help people debug issues with
drivers or layers using the new filter enums.
Rename the old get_environment.* source files to loader_environment.*.
Then put all the environment variable helpers from loader.c into the
new files.
Jeremy Gebben [Fri, 4 Nov 2022 15:25:04 +0000 (09:25 -0600)]
Do not include vk_sdk_platform.h
Nothing in this file was being used.
Mike Schuchardt [Thu, 3 Nov 2022 16:16:39 +0000 (09:16 -0700)]
build: Update to header 1.3.233
- Update known-good
- Generate source
Charles Giessen [Wed, 2 Nov 2022 19:53:39 +0000 (13:53 -0600)]
Dont abort when driver doesn't support debug utils
A recent change made it so that when either vkDebugMarkerSetObjectTagEXT,
vkDebugMarkerSetObjectNameEXT, vkSetDebugUtilsObjectNameEXT, or
vkSetDebugUtilsObjectTagEXT is called, if a driver doesn't support any
of those functions the loader would abort. This is incorrect because drivers
may not support the debug utils extension while the loader & layers might.
Now the loader only aborts if the Device handle is invalid, and simply
returns VK_SUCCESS if a driver doesn't support those functions.
Charles Giessen [Tue, 1 Nov 2022 03:55:30 +0000 (21:55 -0600)]
Remove override layer expiration
This was an undocumented feature of the override manifest layer.
Since vkconfig is the primary user of the override layer, and vkconfig
makes no effort to include expiration support, this feature is not being
used. Thus, it is best to remove it entirely.
Charles Giessen [Tue, 1 Nov 2022 04:37:31 +0000 (22:37 -0600)]
Remove implicit fallthroughs; Add warning
Previously, cJSON used implicit fallthrough in a switch statement. Naked
fallthroughs are a common bug source, and while this use case was well
behaved, it did require disabling the compiler warnings for it. Thus,
converting it to an explicit for loop prevents unnecessary compiler
warning flags being disabled.
Charles Giessen [Mon, 31 Oct 2022 22:38:45 +0000 (16:38 -0600)]
Test Wrap Layer didn't unwrap in vkGetInstanceProcAddr
Wrapping layer should be unwrapping the instance handle inside of GetProcAddr
functions.
Charles Giessen [Mon, 31 Oct 2022 22:37:14 +0000 (16:37 -0600)]
Null check vk_icdGetPhysicalDeviceProcAddr
Forgotten NULL check causes crashes if a driver forgets to export
vk_icdGetPhysicalDeviceProcAddr but does report a 4 or higher
ICD Interface Version.
Charles Giessen [Mon, 31 Oct 2022 17:57:42 +0000 (11:57 -0600)]
Use macos-11 in github actions to work around bugs
There seems to be an incompatible change in macos-12 which breaks the loader's test
framework. While this is being resolved, move the github actions runners from the latest
to only using 11.
Charles Giessen [Wed, 12 Oct 2022 19:51:17 +0000 (13:51 -0600)]
Remove Device functions from ICD Dispatch table
There are numerous terminators to device level functions that the loader must
insert in the call chain. However, the Device Dispatch Tables contain pointers
to these terminators rather than the driver's function. This was worked around
by storing the driver's functions in the ICD dispatch table and calling those.
This leads to rather confusing code where the application is querying for the
ICD dispatch table inside a device level function.
The solution is to create a bespoke dispatch table for device level functions
that require a terminator, and use that table when required.
Mike Schuchardt [Thu, 27 Oct 2022 15:25:21 +0000 (08:25 -0700)]
build: Update to header 1.3.232
- Update known-good
- Generate source
Charles Giessen [Wed, 26 Oct 2022 16:11:45 +0000 (10:11 -0600)]
Revert "Remove vkCreateSwapchainKHR from ICD Dispatch table"
This reverts commit
d79e2731d45bf4c81f650f27205e208a023269aa.
Charles Giessen [Wed, 26 Oct 2022 16:11:45 +0000 (10:11 -0600)]
Revert "Document vk_icdGetInstanceProcAddr querying device functions"
This reverts commit
068e83f5f20e38c3ae1687e7f1aeb59bf6ce3e72.
Charles Giessen [Wed, 12 Oct 2022 19:57:22 +0000 (13:57 -0600)]
Document vk_icdGetInstanceProcAddr querying device functions
vk_icdGetInstanceProcAddr has similar semantics to vkGetInstanceProcAddr.
It was created to prevent dynamic linker issues. It stated that it should support
global & instance level function querying. But this differs from the Vulkan spec
which states that vkGetInstanceProcAddr should be able to query all functions.
This creates confusion about what takes precendence, the spec or the loader's docs.
This commit makes it explicit that it should have the same semanics what the spec
says.
Charles Giessen [Wed, 12 Oct 2022 19:51:17 +0000 (13:51 -0600)]
Remove vkCreateSwapchainKHR from ICD Dispatch table
vkCreateSwapchainKHR and vkGetDeviceGroupSurfacePresentModesKHR were added to
the icd dispatch table then loaded with GIPA. While this is possible, for best
performance and consistency, the loader should use the device's dispatch table
for these functions. This required changing the terminators for both functions
so that they checked that the dev pointer isn't null and its dispatch entry for
each function isn't null.
Additionally, various debug marker/util functions checked if an ICD supported
surfaces by checking the ICD's dispatch table for vkCreateSwapchainKHR. These
have been updated to use the device's dispatch table instead.
Charles Giessen [Wed, 19 Oct 2022 21:08:10 +0000 (15:08 -0600)]
Add 32 bit github actions CI
Charles Giessen [Fri, 21 Oct 2022 18:01:45 +0000 (12:01 -0600)]
Fix linux 32 bit unknown function error handling
The issue was that passing a string to loader_log wouldn't work, likely due
to relocation issues. Workaround is to create a bespoke function that contained
the format string embedded in it.
Additionally, CMAKE_SYSTEM_PROCESSOR is incorrect in the case of x86 builds on
x64. Checking for sizeof(void*) == 8 allows distinguishing building for 32 bit
and 64 bit, and so the correct gen_defines.asm is created while cross compiling.
Also rename the error to note that its a function which isn't supported, not
an extension.
Charles Giessen [Tue, 25 Oct 2022 20:41:30 +0000 (14:41 -0600)]
Revert "Don't query vkCreateSwapchainKHR with GIPA"
This reverts commit
af67fccebe59e8d8e30e8c02b7b0069ce4242fc4.
Charles Giessen [Tue, 25 Oct 2022 20:41:30 +0000 (14:41 -0600)]
Revert "Document vk_icdGetInstanceProcAddr querying device functions"
This reverts commit
e5680db8ae5640dde10b58b8ab45e4a6201ae3e9.
Danny Zhu [Tue, 25 Oct 2022 14:37:56 +0000 (22:37 +0800)]
fix: format code
Danny Zhu [Tue, 25 Oct 2022 14:30:29 +0000 (22:30 +0800)]
fix: add null pointer checking
Danny Zhu [Sat, 22 Oct 2022 03:06:31 +0000 (11:06 +0800)]
fix: add dev pointer checking
danny.zhu [Fri, 21 Oct 2022 06:10:16 +0000 (14:10 +0800)]
fix: add dev pointer checking before using
Charles Giessen [Wed, 12 Oct 2022 19:57:22 +0000 (13:57 -0600)]
Document vk_icdGetInstanceProcAddr querying device functions
vk_icdGetInstanceProcAddr has similar semantics to vkGetInstanceProcAddr.
It was created to prevent dynamic linker issues. It stated that it should support
global & instance level function querying. But this differs from the Vulkan spec
which states that vkGetInstanceProcAddr should be able to query all functions.
This creates confusion about what takes precendence, the spec or the loader's docs.
This commit makes it explicit that it should have the same semanics what the spec
says.
Charles Giessen [Wed, 12 Oct 2022 19:51:17 +0000 (13:51 -0600)]
Don't query vkCreateSwapchainKHR with GIPA
Previously, the loader would initialize vkCreateSwapchainKHR and
vkGetDeviceGroupSurfacePresentModeskHR with vkGetInstanceProcAddr, instead
of what should have happened, which is to use vkGetDeviceProcAddr.
Charles Giessen [Fri, 21 Oct 2022 18:01:45 +0000 (12:01 -0600)]
Update BUILD.md
Remove references to VS 2015, as it is no longer supported.
Update the build instructions to include UPDATE_DEPS more prominently.
Move mentions of tests to the very end, and to use `ctest`.
Mention Cross Compilation caveats.
Charles Giessen [Fri, 21 Oct 2022 17:34:00 +0000 (11:34 -0600)]
Restore asm_offset printing code
The cross compiling workaround for asm_offset requires python, but this meant
that all builds required python. This commit re-adds the removed asm_offset
logic and then only requires python during cross compilation.
Charles Giessen [Fri, 21 Oct 2022 20:44:16 +0000 (14:44 -0600)]
Use correct allocator in debug_utils.c
loader_calloc_with_instance_fallback is used in places where a user can
supply their own allocator, but should default to the allocator used with
the instance otherwise. The issue was that loader_free was being used with
objects created with the instance allocator, but loader_free only takes the
user provided one, leading to leaks.
Charles Giessen [Mon, 17 Oct 2022 21:26:47 +0000 (15:26 -0600)]
Only deduplicate driver manifests
Code which was originally meant to deduplicate drivers that moved from the old
registry HKEY_LOCAL_MACHINE/SOFTWARE/Khronos/Vulkan/Drivers to PnP locations
was incorrectly applied to layers as well. The issue is that multiple layers
can share the same json file name but not actually contain the same manifest.
Worse, the first layer found would be assumed to be correct, even the file had
been deleted from the file system.
Charles Giessen [Fri, 9 Sep 2022 23:50:14 +0000 (17:50 -0600)]
Write gen_defines.asm using a python script
This allows cross compilation to enable unkonwn function handling as
gen_defines.asm will be generated without needing to run code meant for the
target platform. Previously, asm_offset.c wrote the gen_defines.asm file
by being run. Now, compilers emit their intermediate assembly output that the
parse_asm_values.py script knows how to find the relevant information from.
Additionally set the test framework `framework_config` build option to always
copy, instead of copy_if_different. This is needed since cmake wouldn't update
this file when changing from/to debug & release mode.
Juan Ramos [Tue, 18 Oct 2022 17:38:15 +0000 (11:38 -0600)]
ci: Use MACOS_DEPLOYMENT_TARGET
- This approach matches what our SDK release process expect
- Since setting CMAKE_MACOS_DEPLOYMENT_TARGET ignores env variable which SDK
release process uses, which could will cause issues in the future, if
the version is changed
- CMAKE_MACOS_DEPLOYMENT_TARGET doesn't propogate to dependencies via
update_deps.py
Mike Schuchardt [Thu, 13 Oct 2022 14:27:58 +0000 (07:27 -0700)]
build: Update to header 1.3.231
- Update known-good
- Generate source
Charles Giessen [Wed, 12 Oct 2022 22:12:58 +0000 (16:12 -0600)]
Correctly handle layers not being loaded in vkCreateDevice
This reverts the previous commit which reverted bad behavior.
Charles Giessen [Wed, 12 Oct 2022 21:45:58 +0000 (15:45 -0600)]
Revert "Don't load layer libraries in vkCreateDevice"
This reverts commit
cd9b4afed4e556ac88a75371eb7283fed94ca3c6.
Charles Giessen [Fri, 20 May 2022 18:18:41 +0000 (12:18 -0600)]
Guard loader.instances access with mutex.
While the adding and removing of data from this global linked list
was guarded, GetInstanceProcAddr & GetDeviceProcAddr did not have
such guards. This results in race conditions that were detected with
thread sanitizer. This commit adds a mutex solely for the
loader.instances global variable.
Charles Giessen [Tue, 11 Oct 2022 18:07:08 +0000 (12:07 -0600)]
Fix issue with MSVC 15 failing to compile test code
Was a basic case of googletest not allowing implicit conversion between
types.
Charles Giessen [Mon, 10 Oct 2022 18:24:58 +0000 (12:24 -0600)]
Don't abort when drivers don't support WSI calls
Instance extensions are aggregated, therefore an application has no way of
knowing whether an ICD supports a WSI function or not. This necessitates
returning instead of aborting from WSI functions, as well as writing 0,
NULL, or returning false as needed for each function. This also needs
additional NULL checks before calling down into the driver.
Charles Giessen [Thu, 6 Oct 2022 21:18:42 +0000 (15:18 -0600)]
Enable cross compile test discovery
gtest_discover_tests() doesn't work in cross compilation environments, so if
that is happening fall back to gtest_add_tests().
Charles Giessen [Tue, 4 Oct 2022 17:24:39 +0000 (11:24 -0600)]
Don't load layer libraries in vkCreateDevice
These libraries will always be loaded in vkCreateInstance, so we don't
need to load them again in vkCreateDevice. This has the added benefit
of not printing 'unloading library X' twice in the log.
Juan Ramos [Mon, 3 Oct 2022 23:12:50 +0000 (17:12 -0600)]
build: Fix CMake warnings
- CMAKE_GENERATOR_PLATFORM is only valid on Visual Studio generators
- Remove FindWayland since it's no longer needed. See this discussion for details: https://github.com/KhronosGroup/Vulkan-Docs/pull/1905
Mike Schuchardt [Thu, 29 Sep 2022 17:26:54 +0000 (10:26 -0700)]
build: Update to header 1.3.230
- Update known-good
- Generate source
PaperChalice [Sat, 24 Sep 2022 06:52:56 +0000 (14:52 +0800)]
loader: fix log message
Mike Schuchardt [Thu, 22 Sep 2022 16:48:57 +0000 (09:48 -0700)]
ci: Do apt update before install to fix 404 errors
Mike Schuchardt [Thu, 22 Sep 2022 16:16:10 +0000 (09:16 -0700)]
build: Update to header 1.3.229
- Update known-good
- Generate source
Mike Schuchardt [Thu, 15 Sep 2022 15:47:25 +0000 (08:47 -0700)]
build: Update to header 1.3.228
- Update known-good
- Generate source
Charles Giessen [Mon, 12 Sep 2022 17:53:34 +0000 (11:53 -0600)]
Make old layer with new app API version warning clearer
The previous message incorrectly labled all layes as Explicit layers
and didn't indicate what the 'warning' was about very well.
Charles Giessen [Thu, 8 Sep 2022 17:50:29 +0000 (11:50 -0600)]
Allow implicit layers for all API versions
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.
Mike Schuchardt [Thu, 8 Sep 2022 16:07:10 +0000 (09:07 -0700)]
build: Update to header 1.3.227
- Update known-good
- Generate source
Brad Smith [Fri, 2 Sep 2022 23:00:53 +0000 (19:00 -0400)]
build: Also include XCB header path
Steve Lhomme [Tue, 30 Aug 2022 06:08:25 +0000 (08:08 +0200)]
fix typo in CMakeLists
Steve Lhomme [Tue, 30 Aug 2022 06:17:51 +0000 (08:17 +0200)]
Fix the pkg-config import library name with mingw-w64
The common name for import libraries in mingw-w64 ends with .dll.a so we need
to use it so the pkg-config file ends up use -lvulkan-1.dll.
Steve Lhomme [Tue, 30 Aug 2022 05:42:27 +0000 (07:42 +0200)]
Generate the same DLL name with mingw-w64 as with MSVC
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
Brad Smith [Fri, 2 Sep 2022 22:55:12 +0000 (18:55 -0400)]
loader: Only use alloca.h if it exists otherwise fallback to stdlib.h
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.
Brad Smith [Thu, 1 Sep 2022 07:05:12 +0000 (03:05 -0400)]
loader: Fix CMake detection of OpenBSD/FreeBSD / amd64
Charles Giessen [Thu, 25 Aug 2022 16:19:06 +0000 (10:19 -0600)]
Remove unneeded exports in test_wrap_layers
Some functions in the wrapping test layer exported functions that are not necessary.
This caused some warnings in builds. Removing them fixes the warnings.
Charles Giessen [Wed, 24 Aug 2022 23:04:38 +0000 (17:04 -0600)]
Refactor loader_icd_scan()
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.
Charles Giessen [Wed, 24 Aug 2022 17:30:00 +0000 (11:30 -0600)]
Remove redundant checks for NULL
Calling free() doesn't require checking for NULL, but many places were
checking for NULL before calling the appropriate freeing function.
xantares [Thu, 1 Sep 2022 15:41:58 +0000 (17:41 +0200)]
appmodel.h is not yet available on mingw stable
https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/CALK-3mLynzo8%3D9tOoGjwUUWTCtG_MHb5L1Pzd_GCQ%2B8pR637MQ%40mail.gmail.com/#msg37677890
Charles Giessen [Fri, 22 Jul 2022 16:04:04 +0000 (10:04 -0600)]
Refactor unknown function tests
Allow multiple layers to intercept an unknown function and then create a single test
which tests many common combinations.
Charles Giessen [Wed, 13 Jul 2022 23:04:26 +0000 (17:04 -0600)]
Enable layer interception of unknown functions
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.
Charles Giessen [Tue, 12 Jul 2022 23:00:14 +0000 (17:00 -0600)]
Rename GIPA, GPDPA, & GDPA terminators
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.
Brad Smith [Thu, 1 Sep 2022 05:53:59 +0000 (01:53 -0400)]
tests: Further fixes to be able to build on OpenBSD
Mike Schuchardt [Thu, 1 Sep 2022 15:32:22 +0000 (08:32 -0700)]
build: Update to header 1.3.226
- Update known-good
- Generate source
Brad Smith [Wed, 31 Aug 2022 19:56:19 +0000 (15:56 -0400)]
loader: Add stub function for OpenBSD executable path
Charles Giessen [Thu, 25 Aug 2022 18:16:54 +0000 (12:16 -0600)]
Dont pass portability bit to ICDs that dont expect it
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.
Brad Smith [Wed, 31 Aug 2022 00:14:18 +0000 (20:14 -0400)]
loader: Add OpenBSD support
Mike Schuchardt [Thu, 18 Aug 2022 19:32:49 +0000 (12:32 -0700)]
build: Update to header 1.3.225
- Update known-good
- Generate source
Charles Giessen [Tue, 9 Aug 2022 00:18:02 +0000 (18:18 -0600)]
Separate Major.minor version checks from Full version checks
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.
Mike Schuchardt [Thu, 4 Aug 2022 16:49:24 +0000 (09:49 -0700)]
build: Update to header 1.3.224
- Update known-good
- Generate source
Charles Giessen [Fri, 29 Jul 2022 21:49:56 +0000 (15:49 -0600)]
Use memmove for copying pApplicationInfo
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.
Mike Schuchardt [Thu, 28 Jul 2022 15:46:56 +0000 (08:46 -0700)]
build: Update to header 1.3.223
- Update known-good
- Generate source
Mike Schuchardt [Thu, 21 Jul 2022 16:28:00 +0000 (09:28 -0700)]
build: Update to header 1.3.222
- Update known-good
- Generate source
Pan [Fri, 15 Jul 2022 06:10:08 +0000 (14:10 +0800)]
Fix typo in setting linux environment variables
Replace `;` with `:` in setting linux environment variables.
Mike Schuchardt [Thu, 14 Jul 2022 16:10:27 +0000 (09:10 -0700)]
build: Update to header 1.3.221
- Update known-good
- Generate source