Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / vulkan / 
vulkan-loader


Commits:
4b705abe by Charles Giessen at 2023-01-16T17:23:45-07:00
Add Vulkan Loader and Driver Interface Version 7

The changes made by Version 7 are as follows.
If a Driver supports any of the following functions,
they must be exposed by with vk_icdGetInstanceProcAddr:
 * vk_icdNegotiateLoaderICDInterfaceVersion
 * vk_icdGetPhysicalDeviceProcAddr
 * vk_icdEnumerateAdapterPhysicalDevices (Windows only)
This makes it optional for a driver to export these functions. Drivers may still
export them for compatibility with older loaders.

Loader and Driver Interface Version 7 allows for drivers provided through the
VK_LUNARG_direct_driver_loading extension to support the entire Loader and 
Driver
Interface.

This commit makes many small fixes to the documentation. Main changes are adding
Version 7 of the Loader and Driver Interface, clarifies when the functions
associated with this version must be exported, when they can be optionally 
exported
and when they must be exposed through vk_icdGetInstanceProcAddr. This also
clarifies LDP_DRIVER_10 to note the exact behavior of drivers that is 
disallowed.
In the process of these documentation changes, the glossary was amended with
definitions for Exported Functions, Exposed Functions, and Querying Functions.

- - - - -
c77aeff4 by Mike Schuchardt at 2023-01-19T10:27:49-07:00
build: Update to header 1.3.239

- Update known-good
- Generate source

- - - - -
125b4f66 by Juan Ramos at 2023-01-19T12:09:59-07:00
docs: Notify users about upcoming master to main change

- - - - -
0a2c1bec by Juan Ramos at 2023-01-23T12:45:23-07:00
github: Use main instead of master

closes #1107

- - - - -
ced1be17 by Charles Giessen at 2023-01-24T11:26:02-07:00
Log when VK_LAYER_PATH is ignored

The current design of the loader make the Override Layer, with its override
paths, take priority over VK_LAYER_PATH. This is fine, but if the override
layer accidentally was left around, it can cause confusion as VK_LAYER_PATH
suddenly stops working for no apparent reason. This commit adds a log message
to indicate that it is being ignored.

- - - - -
32a1a766 by Charles Giessen at 2023-01-25T16:33:21-07:00
Fix copyright in windows .rc file

This commit makes the copyright date to be taken from the day of the build
instead of it being hardcoded, which is liable to be out of date.

This commit also makes the loader.rc be generated into the build directory
rather than the source tree. Because this commit modifies the version info to
include the current header version for debug builds, this prevents needing to
update the file whenever the headers update.

- - - - -
f383fbb7 by Juan Ramos at 2023-01-26T18:01:55-07:00
ci: Fix CI warnings

- - - - -
3948415e by Charles Giessen at 2023-01-26T20:47:06-07:00
Re-checking loader.rc file

The loader.rc file is now checked into the source, and is automatically updated
by python whenever the headers are updated so that it contains the version used
to build the loader.

If BUILD_DLL_VERSIONINFO is set in the command line, then the loader will use
that version to configure a new loader.rc and place it in the build directory.
Then it will use that loader.rc rather than the checked in file. This allows
Vulkan Runtimes to be built with an exact version.

The file is checked in to allow builds without modifying the source directory
and allowing GN builds to not need any additional configuration to work.

- - - - -
62fd1a35 by Mike Schuchardt at 2023-01-27T10:52:54-08:00
build: Update to header 1.3.240

- Update known-good
- Generate source

- - - - -
935faa68 by Mike Schuchardt at 2023-01-27T10:52:54-08:00
ci: Update GN toolchain

- - - - -
3520c825 by Juan Ramos at 2023-01-27T11:54:47-07:00
cmake: Update minimum to 3.17.2

Matches what VVL currently uses

- - - - -
043d6702 by Juan Ramos at 2023-01-27T12:00:12-07:00
ci: Fix GitHub warnigs about setup-python@v2

- - - - -
8eb7636a by Juan Ramos at 2023-01-27T17:19:54-07:00
cmake: Add scripts/CMakeLists.txt

- Abstracts update_deps code similar to VVL
- Reduce(s) variable polution

- - - - -
270c5451 by Juan Ramos at 2023-01-27T17:19:54-07:00
cmake: Cleanup BUILD_TESTS code

- - - - -
38379d23 by Juan Ramos at 2023-01-27T17:19:54-07:00
cmake: Remove custom install code

- - - - -
11883676 by Mike Schuchardt at 2023-01-30T11:00:31-08:00
gn: Add ninja to DEPS

Instead of relying on the version in depot_tools

- - - - -
3a799ab0 by Charles Giessen at 2023-01-30T13:10:21-07:00
Remove newlines in log messages

The loader_log() function adds a new line at the end of every log message.
Having the string contain an extra new line is redundant and makes the output
inconsistent due to having random blank lines.

- - - - -
0c63db1a by Charles Giessen at 2023-01-30T14:00:03-07:00
Implement VK_LUNARG_direct_driver_loading

VK_LUNARG_direct_driver_loading is an instance extension which allows
applictations to include drivers directly to the loader, instead of relying
on system installed drivers or environment variables specifying where the
desired driver is located. This allows applications to 'ship' a driver 
with
themselves and easily provide it to the system loader.

Changes related to direct driver loading:
* Source implementation
* Documentation of new extension, interactions with existing driver discovery
mechanism, and issues with implicit layers
* Extensive tests covering many feature combinations.

Changes also made in this commit:
* Add EnvVarWrapper which more cleanly handles setting, modifying, and
removing Environment Variables. This has the effect of allowing all tests to
run from the test executable without leaking env-vars, which previously
caused spurious test failure. Note - CTest runs each test in a separate
process which hides this issue.
* Adds -Wshadow=local for the gcc compiler (only for gcc 7 and up).
The MSVC compiler already enables this check with W4 so it was added for 
consistency.
* Add <!-- omit from toc --> to Documenation pages. This prevents the
"Markdown all in one" extension from adding labels to the table of 
contents.
* Add ManifestDiscoveryType::null_dir, to separate tests that want to write
a manifest file to a place the loader normally does not search and tests which
do not write any manifest file at all.
* Updated copyright to 2023 for changed files

- - - - -
dda78723 by Charles Giessen at 2023-01-30T14:42:20-07:00
Ensure VkPhysicalDevice unwrapping in Device functions

Certain functions, like vkSetDebugUtilsObjectNameEXT can take a physical device
as a parameter. When this function is queried through vkGetInstanceProcAddr,
the trampoline is returned, whereas when queried through vkGetDeviceProcAddr,
the trampoline wasn't returned, allowing the physical device parameter to 
not
get unwrapped before calling down the chain, causing a crash.

This commit modifies the codegen to always use the trampoline for these
functions, and adds tests for them. These changes require the the loader check
that the appropriate extensions are enabled during the application's call to
vkGetDeviceProcAddr, since it otherwise always return a non-null function
pointer.

- - - - -
e90b9e01 by Ludovico de Nittis at 2023-01-31T10:01:42-07:00
Clarify the VK_LOADER_DRIVERS_SELECT example

In the documentation examples, if we set
`VK_LOADER_DRIVERS_SELECT=nvidia`, we are saying to the loader to select
only the driver whose JSON manifest is called exactly `nvidia`.

This is likely not what we want, because the Nvidia drivers are usually
called something like `nvidia_icd.json`, and not just `nvidia` without a
file extension.

In the "Behavior" column it already states that:
"Since drivers don’t have a name like layers, this glob is used to
compare against the manifest filename."
So, to avoid confusion, we just need to change the example to reflect
how the loader glob works.

This commit also adds an additional automated test to ensure that this
full-name string glob actually works as described in the documentation.

Signed-off-by: Ludovico de Nittis <[email protected]>

- - - - -
3bc9d7c0 by Juan Ramos at 2023-01-31T21:54:48-07:00
cmake: Remove pointless conditionals

CMake min is now 3.17

- - - - -
ebb932a4 by Juan Ramos at 2023-02-01T10:23:43-07:00
ci: Test CMake min for Linux builds

- - - - -
f5fa389d by Juan Ramos at 2023-02-13T14:15:50-07:00
cmake: Use PkgConfig to find XCB, X11, and DirectFB

- - - - -
e2a3fc1b by Juan Ramos at 2023-02-13T14:15:50-07:00
cmake: Remove custom find_package code

- - - - -
74221a9a by Juan Ramos at 2023-02-13T17:45:33-07:00
cmake: Add VULKAN_LOADER_VERSION

- - - - -
02ac9a77 by Christophe at 2023-02-14T10:30:44-07:00
Warn user when using device layers field #1086

The device layer fields in VkDeviceCreateInfo are deprecated and have
been for years. Users should not be adding anything to them (and if
they do, it should match the layers added in VkInstanceCreateInfo).

This would be a warning that 'device layers are deprecated, they do
nothing' in case a user is trying to enable validation layers using
them. Charles has seen multiple users not knowing that they are
deprecated and get burned by the API due to not having validation
layers enabled.

Since there may be applications in the wild which currently do provide
a list of layers to device create info, this warning should only be
issued if the list differs from instance creation. That way no spurious
warnings are created.

- - - - -
189762fa by Christophe at 2023-02-14T10:30:44-07:00
Testing C.I. memory leak hypothesis

- - - - -
d237b906 by Christophe at 2023-02-14T10:30:44-07:00
gni

- - - - -
933f8694 by Christophe at 2023-02-14T10:30:44-07:00
Use calloc instead of alloc

- - - - -
dbad6e0d by Christophe at 2023-02-14T10:30:44-07:00
A bit more safe string copy

- - - - -
20154742 by Christophe at 2023-02-14T10:30:44-07:00
Only allocate layers if initialization succeed

- - - - -
3ba0bf51 by Charles Giessen at 2023-02-17T14:49:17-07:00
Fix documentation to use the correct function name

`vk_icdNegotiateLoaderICDInterfaceVersion` was intended but due to a copy paste 
error `vk_icdGetInstanceProcAddr`
was used instead.
- - - - -
ba41638d by Mike Schuchardt at 2023-02-20T13:40:56-07:00
build: Update to header 1.3.241

- Update known-good
- Use new 'depends' attribute for extension dependencies
- Generate source

- - - - -
ebf8ae00 by Mike Schuchardt at 2023-02-27T11:20:06-08:00
build: Update to header 1.3.242

- Update known-good
- Generate source

- - - - -
3db19f3e by Charles Giessen at 2023-02-27T13:41:16-07:00
Call DestroyInstance on each driver in error path

If CreateInstance successfully calls terminator_CreateInstance but subsequently 
fails on the way
back up the chain, the loader should call DestroyInstance on each driver to 
give them a chance to
clean up. This path is possible during CTS OOM tests which cause VVL to fail 
which then causes
leaks to occur.

Additionally, the layer name allocations needed to be cleaned up in this error
path as well, since there is no chance for vkDestroyInstance to run.

- - - - -
e4895e86 by Charles Giessen at 2023-03-07T16:39:27-07:00
Allow the loader to enable ASAN outside of testing

This commit promotes the build option TEST_USE_ADDRESS_SANITIZER and
TEST_USE_THREAD_SANITIZER to not be behind BUILD_TESTS. This allows users
of the loader to enable ASAN & TSAN support on the loader without enabling
the loader's tests.

The new options are called LOADER_ENABLE_ADDRESS_SANITIZER and
LOADER_ENABLE_THREAD_SANITIZER.

There is also a new build option: `LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING`.
This is to allow layers & drivers that use Address Sanitizer to get useful
stack traces when running their code. Because vkDestroyInstance unloads all
layer and driver dynamic libraries, leak sanitizer cannot create complete
stack traces, making debugging the leaks much more difficult than necessary.
This option is only available when LOADER_ENABLE_ADDRESS_SANITIZER is also
enabled, due to that being the only reason to prevent the unloading of
libraries.

- - - - -
dde24e46 by Charles Giessen at 2023-03-09T11:36:49-07:00
Set github actions to only have read only permissions

Because the loader only uses github actions to perform CI runs, it is good to 
set
the 'read-all' only, helping harden the github actions runners from 
potentially
compromised access.

For more context
https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions

Fixes #1148

- - - - -
36e12d2d by Charles Giessen at 2023-03-09T13:43:51-07:00
Add clang-format-diff.py

Turns out this script was never checked in, causing the check_code_format.sh 
script to
never run. This is due to python *not* returning an error when it fails to find 
the
python script, which results in the shell script passing while never actually 
checking
the formatting.

- - - - -
eb130942 by Charles Giessen at 2023-03-09T13:43:51-07:00
Make check_code_format.sh not care about includes

The code being removed here was a fix for travis CI which is no longer in
use. The git diff ignores files in the gitignore, so this workaround is no
longer necessary.

- - - - -
dc32470f by Mike Schuchardt at 2023-03-13T12:18:04-07:00
build: Update to header 1.3.243

- Update known-good
- Generate source
- Add new return code to test_util.h

- - - - -
22407d78 by MeeSong at 2023-03-14T07:25:06-06:00
Docs: Add missing ".md"
- - - - -
011d7a4a by Charles Giessen at 2023-03-16T13:39:18-06:00
Add missing backtick in LoaderInterfaceArchitecture.md
- - - - -
53def698 by Mike Schuchardt at 2023-05-16T16:32:09-06:00
build: Update to header 1.3.244

- Update known-good
- Generate source

- - - - -
b56a115f by Mike Schuchardt at 2023-05-16T16:32:09-06:00
build: Update to header 1.3.245

- Update known-good
- Generate source

- - - - -
c497e768 by Charles Giessen at 2023-05-16T17:03:04-06:00
Add 4th component to version in loader.rc

FILVERSION is supposed to be a 4 component field. The previous commit to make 
loader.rc
be generated did not account for that and so requires this fix to make sure it 
has four
components. Thankfully, this issue is not present in SDK released loaders 
thanks to the
SDK specifying its own version string that has 4 components.

- - - - -
3ca6405f by Mike Schuchardt at 2023-05-16T17:03:27-06:00
build: Update to header 1.3.246

- Update known-good
- Generate source

- - - - -
9012d243 by Charles Giessen at 2023-05-16T17:03:28-06:00
Make correct layer be used when duplicates are present

When there are multiple versions of the same layer found through environment 
variables
or from implicit layer locations, the loader would use the *last* one that 
appeared rather
than the first, causing surprising behavior. This commit fixes that by checking 
to make
sure that layers do not already exist in the list of layers to be enabled 
before adding a
layer to the list, preventing duplicates from appearing in the list.

This commit adds a check in vkEnumerateInstanceLayerProperties to skip over 
layers that do
wish to intercept the function. The missing check would only cause a spurious 
log message
which said that the loader was unable to load a symbol names "" (as 
in an empty string)
from the layer.

This commit also amends the test framework with the following fixes:
* Create Layer JSON manifests that contain multiple layers
* Only add layers to the registry if they are generic (meant to simulate 
installed layers)
* Allow layers to print messages during vkCreateInstance - a mechanism to 
double check that
only the correct layer(s) are loaded
* Fixes env-var added layers not using full paths
* Only have 1 XDG env-var set, making all other XDG env-var have an empty string
* Set the XDG env-vars even on macOS (github actions seems to have them set)

- - - - -
87ce439f by Charles Giessen at 2023-05-16T17:03:28-06:00
Fix ordering regression for VK_INSTANCE_LAYERS

The commit to add VK_LOADER_LAYERS_ENABLE/DISABLE inadvertently broke the
ordering guarantees of VK_INSTANCE_LAYERS. This commit restores that order.
If both VK_INSTANCE_LAYERS and VK_LOADER_LAYERS_ENABLE add layers, the order
will be VK_INSTANCE_LAYERS enabled layers, in the order specified by the
env-var, followed by any layers enabled by VK_LOADER_LAYERS_ENABLED enabled in
the order they are found on the system.

In addition to this, the test framework receieved two changes:
* Make env-var folders report their contents in a deterministic order (aka the
order the items were added to the framework). This mirrors existing behavior
for redirected folders.
* Make platform shim resilient to shutdown ordering issues. Namely, set a flag
during shutdown so that any interception functions go straight to the real
version of the functoin. This works around an issue during the destruction of
the FolderManagers for the environment variables, where the readdir shim
function was trying to use the FolderManager's data but Address Sanitizer
declared that such a use was 'heap use after free'.
* Rename set_path to set_fake_path to better indicate its purpose

- - - - -
6e3f4462 by Charles Giessen at 2023-05-16T17:03:28-06:00
Use Ubuntu 22 in github actions

Remove the unneded pkg-config-i686-linux-gnu package since its gone in 22.

- - - - -
a2c5794e by Mike Schuchardt at 2023-05-16T17:03:28-06:00
build: Update to header 1.3.247

- Update known-good
- Generate source

- - - - -
c1797475 by Charles Giessen at 2023-05-16T17:03:28-06:00
Log ERROR when layers in VK_INSTANCE_LAYERS are missing

It is unhelpful to have zero diagnostics emitted when the layers listed in
VK_INSTANCE_LAYERS are not found.

- - - - -
87b0ee15 by Mike Schuchardt at 2023-05-16T17:03:28-06:00
build: Update to header 1.3.248

- Update known-good
- Generate source

- - - - -
2b081647 by Mike Schuchardt at 2023-05-16T17:03:28-06:00
build: Update to header 1.3.249

- Update known-good
- Generate source

- - - - -
5347d430 by Mike Schuchardt at 2023-05-16T17:03:28-06:00
build: Update to header 1.3.250

- Update known-good
- Generate source

- - - - -
f372068d by juan-lunarg at 2023-05-16T17:03:28-06:00
docs: Update README.md

- - - - -


27 changed files:

- .github/workflows/build.yml
- .gn
- BUILD.md
- CMakeLists.txt
- CONTRIBUTING.md
- README.md
- build-gn/DEPS
- − cmake/Copyright_cmake.txt
- − cmake/FindDirectFB.cmake
- − cmake/FindPCIAccess.cmake
- − cmake/FindPthreadStubs.cmake
- − cmake/FindUDev.cmake
- − cmake/FindValgrind.cmake
- − cmake/FindX11_XCB.cmake
- − cmake/FindXCB.cmake
- − cmake/cmake_uninstall.cmake.in
- − cmake/generated_header_version.cmake
- docs/LoaderApplicationInterface.md
- docs/LoaderDebugging.md
- docs/LoaderDriverInterface.md
- docs/LoaderInterfaceArchitecture.md
- docs/LoaderLayerInterface.md
- loader/CMakeLists.txt
- loader/generated/vk_dispatch_table_helper.h
- loader/generated/vk_layer_dispatch_table.h
- loader/generated/vk_loader_extensions.c
- loader/generated/vk_object_types.h


The diff was not included because it is too large.


View it on GitLab: 
https://salsa.debian.org/xorg-team/vulkan/vulkan-loader/-/compare/fa421a02686e7f01c8e4af24650fa04374df8338...f372068d09fc13bcf54b8c81274f37aa5f46aea3

-- 
View it on GitLab: 
https://salsa.debian.org/xorg-team/vulkan/vulkan-loader/-/compare/fa421a02686e7f01c8e4af24650fa04374df8338...f372068d09fc13bcf54b8c81274f37aa5f46aea3
You're receiving this email because of your account on salsa.debian.org.


Reply via email to