We've encountered situations where a layer removes physical devices
from the list which can cause issues on some systems if it's done
incorrectly. For now, simply throw a warning if the loader determines
that a layer has removed devices.
NOTE: In the long-run, I think we should define a policy which states
that layers can re-order devices, but not add or remove. If a layer
wants to add, it should become an ICD.
During SDK testing we identified that the runtime copyrights
were out-of-date. The loader runtime includes two separate
MIT copyrights, each attributed to a pair of source files,
one initiated by Dave Gamble and one by joseph werle.
I examined these files to discover that the last LunarG change to
three out of the four was actually in 2017, not 2016. This
date should be attributed to Khronos, Valve, and LunarG.
By updating the copyright notice in these files, we ensure that
the license registry remains up-to-date.
Note that no real content changed (which is why the copyrights are not
being updated to 2021).
but it changed the import lib name (libvulkan.dll.a instead of libvulkan-1.dll.a) which in turns breaks cmake detection in FindVulkan
now we go back to using the default cmake prefix which is equivalent to what #595 wants, (prior to #523), but without the broken behavior
cc @Biswa96
ReadDataFilesInRegistry would return VK_ERROR_INITIALIZATION_FAILED in several cases
which could cause the loader to short cirtuit and return that value when no drivers were
found in the registry. This is inconsistent with the later check of the size of the list
of manifest, which if it is 0 returns VK_ERROR_INCOMPATABLE_DRIVER. This commit changes
the instances of INIT_FAILED into INCOMPATABLE_DRIVER where relevant.
When the override layer or an implicit meta layer is detected, the loader will
go and find all of the explicit layers because the override/meta layer might
require them. During that process `loaderAddLayerProperties` is called. It was
accidentally called with `is_implicit = true`, which causes the loader to interpret the manifest files as if they were implicit, generating
many erroneous warnings.
Change-Id: I8bc6bfa0d2a81159ebc33406e18ebf2099355768
This solves the issue of debug asserts appearing in the output due to
mixed CRT's in the same build.
Change-Id: I06169c143614dd1102c901f57aa4bdf431df8846
Loader previously emitted WARN level log messages for unknown
function names. This isn't wrong behavior and is mainly useful to
loader developers. Many layers and applications try to load all
function pointers they know about, so this code path is well
travelled.
Change-Id: Ia3e4b47eddb36bd02bcbab8452e5a96d03f75bd3
Previously, we assumed that the extension VK_KHR_display would be
available on all systems. This appears to no longer be the case. If we
get two ICDs, one which supports the extension and one which does not,
we used to get a crash if trying to call any function from the
extension on the physical device which did not support it. This solves
that crash
If the json manifest file was too large, the loader would do a stack
allocation that would fail, throwing an exception or creating
undefined behavior. This changes to a heap allocation.
Currently the loader does not distinguish between 32 and 64 bit ELF
class files. This causes `dlopen` to fail but is expected because
the different ELF class libraries are located in the same directory.
We can safely ignore this error. If encountered, we will report it
with the INFO logging level.
Change-Id: Icb8e5351208f8a413a29ea9c457bc3fdac7de292
Add `vkEnumerateInstanceVersion` to the list of allowed pre instance
functions in the LoaderLayerInterface.md
Change-Id: I238aec5c3606af4d39bff5c50bbe75e909cd3224
- Update known-good
- Generate source
- Fix version parsing in FindVulkanHeaders.cmake
- Add to VK_ENABLE_BETA_EXTENSIONS to GN build to pick up beta
VkObjectType values
Change-Id: Ied4e4e71017e48d344b1c9cacf037ae989aceec9
QNX_screen moved from generated code to wsi.c but the generator was not run
so the old code wasn't deleted. This commit rectifies that.
Change-Id: Iba9cc3e6871605f50159acf7b6a97428f940b49e
Changes:
- Updated `known_good.json`
- Generated new source files
- Added `VK_USE_PLATFORM_SCREEN_QNX` to platform list in
`common_codegen.py`
Change-Id: I2ef49799434ff31ff81680413a8700caea46593c
An application program that overrides malloc with an implementation that
returns NULL for a zero-sized allocation will cause some loader and
trampoline functions to incorrectly return VK_ERROR_OUT_OF_HOST_MEMORY
if there are no layers on the system. This patch prevents these errors
by also checking the layer count.
Fixes: https://github.com/KhronosGroup/Vulkan-Loader/issues/543
The Android NDK doesn't provide a separate libpthread. Don't
explicitly link it in when builing for Android.
Signed-off-by: Kévin Petit <kevin.petit@arm.com>
Linux can support multiple ABIs, but Vulkan Layer manifest does not
allow to specify different library paths, based on the ABI.
As a solution, for ICDs, we can simply create multiple manifests, one
per ABI, and the Loader will try them one by one until it finds the
library that is compatible with the executable class.
Instead, for Vulkan Layers, this method doesn't work because the Loader
will discard the manifests that have a duplicated layer name.
To add support for multiple ABIs to Vulkan Layers, and to make the
behavior similar to the ICDs, with this commit we remove the duplicated
layer name check.
Instead we add to the output list all the Vulkan Layers that we find,
and only when we are actually going to dlopen them, we discard the
layers with the same name that we already successfully opened.
Fixes: #155
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
fread returns the count of values returned but was being ignored.
This commit makes sure to use that value when determining whether to
continue seeking to the end of the file.
Change-Id: Idb818cb3cda0cdde81aba1e5a4dd639c4814a923
The status message for the loader not searching environment
variables when running with elevated permissions didn't properly
check. This commit adds in proper guards to make sure the status
message only prints when compiled with explicit use of non-secure
getenv
Change-Id: I993bb08de21bb0e338852368c24fe615d0d1f9b9