These binaries are necessary for testing whether the loader correctly
ignores binaries of the wrong architecture. Since they are data files
more than executables, they are being checked in.
Currently only Unix binaries are added but in the future windows along
with any other platform binaries will be added.
This changes the loader to always set the version to the one which was used when
generating the source files that are checked into the repo, instead of using the
version gotten from the Vulkan-Headers find cmake file.
Change-Id: Id0955ddfd10e35e0f358f5a77799d8baa4992b04
Previously, clang-format was required for all new commits but the codebase
itself wasn't conformant. This commit formats the source files in the loader
folder.
Adds FALLBACK_DATA_DIRS, FALLBACK_CONFIG_DIRS, SYSCONFDIR, and EXTRASYSCONFDIR
to the list of redirected paths. They were previously 'covered' by manual entries.
This commit makes them responsive to changes in the build system.
This commit also makes sure that the path used for redirection is one searched by
the loader by using the SYSCONFIG variable. Previously it would use /usr/local/etc/
which was only correct on systems where CMAKE_INSTALL_PREFIX was set to /usr/local.
KhronosGroup/Vulkan-ValidationLayers switched to this method a while ago
and this syncs the KhronosGroup/Vulkan-Loader version of
helper_file_generator.py to match.
Add logging that will allow end-users to specifically just look at
messages for layers and implementations/ICDs.
Setting VK_LOADER_DEBUG to include one of the following:
- layer : enables layer-specific logging
- implem : enables implementation/ICD-specific logging
The loader_log messages were using the DEBUG_REPORT log levels
which just happened to coincide with the existing LOADER_ log levels.
Going forward, to add layer logging in its own level, this would not
have worked.
Vulkan Loader loads the meta layer list and filters the ones that are
not valid. During filter it deallocates the attributes of the loaded
meta layer but does not deallocate the associated extension list.
Calling `dlclose` doesn't necessarily mean that the static variables will
be reset nor the libraries destructor gets called. This caused cascading
errors in tests on linux with GCC. By always manually resetting the ICD
or Layer before each test, we prevent any funny business from occuring.
The loader debug environment variable (VK_LOADER_DEBUG) is not inclusive
of higher importance messages, it is exclusive to the types specifically
enabled.
Requires adding ability for device to return functions with
vkGetDeviceProcAddr that aren't necessarily useable functions.
Also added checks to make sure that the handle passed in by the loader
to the TestICD is the 'right handle' where necessary, as some functions
do not need to know which device is being called on, just that it is correct.
This flag was recently enabled by default in Chrome and ANGLE
and other projects inherit these build settings. Explicitly
dsiable this warning until it is enabled in the non-GN build.
Change-Id: I8f353f8abc3f7857481ff9cc774aff3618eaf35a
Win7 does not support D3DKMTEnumAdapters2, as such when the loader goes to
query it, it gets NULL back. Except, instead of just erroring out, it would
return VK_ERROR_OUT_OF_HOST_MEMORY. Problem was that change
73296a0467
starts checking for OOM, and finding one when running in Win7. This change
alters that behavior so that it doesn't report an OOM when one hasn't occured.
Remove them from the calling scripts where appropriate. Notably the 'get count
then run tests and pass in count' are now using the framework where that is
completely redundant.
Change-Id: I00d561a85047742a849df48818398b10c62d3b74
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.
* `get_instance_func` needed to have __stdcall (VKAPI_ATTR) added
* Several .def files were incorrect
* vk_layer.h forward declares vkNegotiateLoaderLayerInterfaceVersion. This is
problomatic because it doesn't have __declspec(dllexport), a token added by
FRAMEWORK_EXPORT on windows. We have to special case the export macro here to
prevent that mismatched definition.
Functions needed in the various layer interface versions are now
exported as well as guarded behind macros configurable from CMake.
The export_definitions folder was populated as well.
Change-Id: Iebfdd8ae02062eb81b8aa9f705885c9384c95be9
This replaces instances of `#ifdef MACRO_NAME` with `#if MACRO_NAME` as now
MACRO_NAME will have a value of 0 or 1, instead of it being defined or not
defined.
Change-Id: I27a4330511a0f0d779f41851fe816fc79e868de2
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