platform/upstream/Vulkan-Loader.git
3 months agoUpgrade to sdk 1.3.296 15/319715/1 accepted/tizen_unified accepted/tizen_unified_x tizen accepted/tizen/unified/20250322.012742 accepted/tizen/unified/x/20250323.134044
Xuelian Bai [Mon, 17 Feb 2025 01:37:44 +0000 (09:37 +0800)]
Upgrade to sdk 1.3.296

Fix one issue: modify loader_destroy_generic_list avoid memory leak

Change-Id: I42dab9466475c2e801a55ea1dd50c80b486329ce

4 months agoUpgrade version to 1.3.268
Xuelian Bai [Fri, 1 Sep 2023 06:25:10 +0000 (14:25 +0800)]
Upgrade version to 1.3.268

1. Add dlog for Tizen
2. Fix memory leak issue for generic list

Change-Id: Id1d95430af27e11bf76c83e3933475bf8eb6886d

4 months agoFix crash on pixel phone
Xuelian Bai [Thu, 3 Aug 2023 06:36:49 +0000 (14:36 +0800)]
Fix crash on pixel phone

Change-Id: I89320faf4c1063b9404cfca1d528edef4cfa8fb3
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
4 months agoUpgrade to v1.3.240
Xuelian Bai [Fri, 23 Sep 2022 06:09:21 +0000 (14:09 +0800)]
Upgrade to v1.3.240

Change-Id: Ibcdb636a32951e23bd0871a93dd7ffa88a7cc2c6

4 months agoRemove unnecessary usages of prefix in pc
Joonbum Ko [Tue, 23 Aug 2022 06:37:40 +0000 (15:37 +0900)]
Remove unnecessary usages of prefix in pc

Change-Id: If03b32419c4c094b5645009a008549b5f8510315
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
4 months agoremove double slash in vulkan.pc
jinbong, Lee [Wed, 10 Aug 2022 04:15:16 +0000 (13:15 +0900)]
remove double slash in vulkan.pc

Change-Id: I891e70bd36594aa31fc6f405006e233c58ad35d1

4 months agoFix double free issue
Xuelian Bai [Mon, 23 May 2022 05:44:12 +0000 (13:44 +0800)]
Fix double free issue

dEQP-VK.api.object_management.alloc_callback_fail.device is crashed on
RPI4, it's caused by double free in icd_term->logical_device_list.
This patch intend to avoid duplicated item in
icd_term->logical_device_list.

Change-Id: Icfd35f8fad70a06a5697d9dc0c0a330f83e08fc6
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
4 months agoUpgrade to 1.3.208
Xuelian Bai [Mon, 21 Mar 2022 06:09:39 +0000 (14:09 +0800)]
Upgrade to 1.3.208

1. Change version number
2. Add default path for mesa icd

Change-Id: Iea5a2636cb8215c82cb901fed3bf4dc058e86c62
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
4 months agoadd spec file
SooChan Lim [Thu, 29 Nov 2018 12:29:50 +0000 (21:29 +0900)]
add spec file

8 months agobuild: Update to header 1.3.296 upstream upstream/1.3.296
Mike Schuchardt [Thu, 26 Sep 2024 15:03:19 +0000 (08:03 -0700)]
build: Update to header 1.3.296

8 months agoFix windows_read_sorted_physical_devices buffer overrun
Jordan Peck [Wed, 25 Sep 2024 16:25:54 +0000 (17:25 +0100)]
Fix windows_read_sorted_physical_devices buffer overrun

8 months agoSmall cleanup of regression tests
Charles Giessen [Wed, 11 Sep 2024 03:44:44 +0000 (22:44 -0500)]
Small cleanup of regression tests

8 months agoDocumentation fixes
Charles Giessen [Wed, 11 Sep 2024 03:44:28 +0000 (22:44 -0500)]
Documentation fixes

8 months agoAdd VK_IMPLICIT_LAYER_APTH & VK_ADD_IMPLICIT_LAYER_PATH env-vars
Charles Giessen [Mon, 9 Sep 2024 21:43:53 +0000 (16:43 -0500)]
Add VK_IMPLICIT_LAYER_APTH & VK_ADD_IMPLICIT_LAYER_PATH env-vars

Add the environment variables VK_IMPLICIT_LAYER_PATH and
VK_ADD_IMPLICIT_LAYER_PATH to control implicit layer path searching,
mirroring the existing explicit layer only VK_LAYER_PATH and
VK_ADD_LAYER_PATH.

This fixes a gap in environment variable controls over the behavior
of the loader.

8 months agoFixup note for VK_DRIVER_FILES env-var
Charles Giessen [Fri, 13 Sep 2024 20:53:08 +0000 (15:53 -0500)]
Fixup note for VK_DRIVER_FILES env-var

The original text was caused by a mistake during rebase which wasn't
caught. This commit take the original non-mistake text and cleans that
up further.

8 months agoAdd missing [[maybe_unused]] attributes in test_icd.cpp
Charles Giessen [Fri, 13 Sep 2024 20:38:30 +0000 (15:38 -0500)]
Add missing [[maybe_unused]] attributes in test_icd.cpp

8 months agoOnly add include paths for xcb, x11, & directfb instead of linking
Charles Giessen [Fri, 13 Sep 2024 20:33:58 +0000 (15:33 -0500)]
Only add include paths for xcb, x11, & directfb instead of linking

Previously, the loader linked to various windowing libraries but never
made any calls into them. These can safely be removed, as including
the libraries locations in the header search paths is sufficient.

Because vulkan_core.h includes directfb.h without a path, it is
necessary to add the search path found from pkg-config as well as
the same path with `/directfb` appended to get vulkan_core.h to be
able to find the header. This may be a bug in the vulkan_core.h
or just an inconsistency with the way directfb is packaged on
ubuntu 24, the system the change was developed on.

9 months agoStop reading json files twice
Branimir Ri\v{c}ko [Sat, 1 Jun 2024 22:38:06 +0000 (00:38 +0200)]
Stop reading json files twice

Split out the JSON file opening and reading logic into a Windows
and Posix function to allow only reading the contents of a file
once.

9 months agoRemove unused VkIcdSurface struct members
Charles Giessen [Tue, 13 Aug 2024 23:31:38 +0000 (18:31 -0500)]
Remove unused VkIcdSurface struct members

All of the VkIcdSurface<API> members, as well as the *_size & offset members
are unused by the codebase. And drivers do not have access to this struct, as
it is internal to the loader - no common definition exists elsewhere for
drivers to use either.

9 months agoDocument layer requirements for querying vkCreateInstance from GIPA
Charles Giessen [Tue, 3 Sep 2024 20:55:31 +0000 (15:55 -0500)]
Document layer requirements for querying vkCreateInstance from GIPA

The vkGetInstanceProcAddr function was ammended in header version 1.2.193
to require global functions be queried with NULL instance parameters,
including vkCreateInstance. Layers written before that time may not expect
the instance parameter to be NULL, so in order to maintain compatibility,
the loader code (which itself dates to before Vulkan's public release) is
left unmodified.

Instead, code comments were left to indicate the non-spec compliant
implementation as well as documentation in the LoaderLayerInterface mentioning
how layers should handle the now invalid API usage.

In the future, the loader could be modified to correctly follow the spec, but
a survey of existing and previous layer implementations would need to be done
to determine the impact of the change.

9 months agobuild(deps): bump github/codeql-action from 3.26.5 to 3.26.6
dependabot[bot] [Mon, 2 Sep 2024 17:10:22 +0000 (17:10 +0000)]
build(deps): bump github/codeql-action from 3.26.5 to 3.26.6

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.5 to 3.26.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/2c779ab0d087cd7fe7b826087247c2c81f27bfa6...4dd16135b69a43b6c8efb853346f8437d92d3c93)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months agobuild: Update to header 1.3.295
Mike Schuchardt [Fri, 30 Aug 2024 15:43:06 +0000 (08:43 -0700)]
build: Update to header 1.3.295

9 months agobuild(deps): bump github/codeql-action from 3.26.3 to 3.26.5
dependabot[bot] [Mon, 26 Aug 2024 17:29:34 +0000 (17:29 +0000)]
build(deps): bump github/codeql-action from 3.26.3 to 3.26.5

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.3 to 3.26.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/883d8588e56d1753a8a58c1c86e88976f0c23449...2c779ab0d087cd7fe7b826087247c2c81f27bfa6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months agobuild: Update to header 1.3.294
Mike Schuchardt [Fri, 23 Aug 2024 17:33:04 +0000 (10:33 -0700)]
build: Update to header 1.3.294

9 months agoupdate_deps.py: Support 32 bit arm
Charles Giessen [Sat, 13 Jul 2024 22:15:15 +0000 (15:15 -0700)]
update_deps.py: Support 32 bit arm

9 months agoAdd MARMASM support for Windows arm
Charles Giessen [Tue, 9 Jul 2024 07:23:10 +0000 (00:23 -0700)]
Add MARMASM support for Windows arm

Completes the support matrix for the unknown function assembly code by
adding Windows Arm assembly support. This requires using MARMASM which
require CMake 3.26 support

This support requires manually linking to Advapi32.lib which doesn't
appear to be required on any other platform.

9 months agoFix vkCreateSharedSwapchainsKHR not unwrapping handles correctly
Charles Giessen [Wed, 14 Aug 2024 16:24:18 +0000 (11:24 -0500)]
Fix vkCreateSharedSwapchainsKHR not unwrapping handles correctly

The loader would unwrap the first surface and use that for all created
swapchains rather than unwrap each surface handle individually for each
VkSwapchainCreateInfoKHR struct.

9 months agobuild(deps): bump github/codeql-action from 3.26.0 to 3.26.3
dependabot[bot] [Mon, 19 Aug 2024 17:35:21 +0000 (17:35 +0000)]
build(deps): bump github/codeql-action from 3.26.0 to 3.26.3

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.0 to 3.26.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/eb055d739abdc2e8de2e5f4ba1a8b246daa779aa...883d8588e56d1753a8a58c1c86e88976f0c23449)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months agobuild(deps): bump github/codeql-action from 3.25.15 to 3.26.0
dependabot[bot] [Mon, 12 Aug 2024 17:32:40 +0000 (17:32 +0000)]
build(deps): bump github/codeql-action from 3.25.15 to 3.26.0

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.15 to 3.26.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/afb54ba388a7dca6ecae48f608c4ff05ff4cc77a...eb055d739abdc2e8de2e5f4ba1a8b246daa779aa)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months agobuild: Update to header 1.3.293
Mike Schuchardt [Fri, 16 Aug 2024 15:50:27 +0000 (08:50 -0700)]
build: Update to header 1.3.293

loader_extension_generator.py needed a tweak to handle boolean logic in
the vk.xml extension dependency attributes.  Now that the dependency is
encoded in vk.xml we don't need to manually turn on device_group for
drivers >= 1.1. We DO need to track the driver api version since the xml
expressions references it.

9 months agoCheck that ar_path is defined before use
Charles Giessen [Tue, 13 Aug 2024 14:00:44 +0000 (09:00 -0500)]
Check that ar_path is defined before use

10 months agoUse ASM unknown function trampolines on GN
John Bauman [Thu, 8 Aug 2024 17:47:05 +0000 (17:47 +0000)]
Use ASM unknown function trampolines on GN

The GN build doesn't currently support unknown function trampolines. To
fix that, we can use the assembly trampolines. To generate
the asm_offset assembly file, we can build it in a static library and
pass -S to it; that causes the assembly file to be copied into the .a
file. The python script can then extract it. This requires access to the
"ar" executable, so this mechanism is only used if a path to ar is
specified in //build_overrides/vulkan_loader.gni.

To fix incremental builds, "gen_defines.asm" must be included using
"#include", not ".include", since .include isn't a preprocessor
directive and isn't picked up by clang's depfile creation.

10 months agobuild: Update to header 1.3.292
Mike Schuchardt [Fri, 2 Aug 2024 17:46:19 +0000 (10:46 -0700)]
build: Update to header 1.3.292

10 months agobuild(deps): bump github/codeql-action from 3.25.13 to 3.25.15
dependabot[bot] [Mon, 29 Jul 2024 17:18:15 +0000 (17:18 +0000)]
build(deps): bump github/codeql-action from 3.25.13 to 3.25.15

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.13 to 3.25.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/2d790406f505036ef40ecba973cc774a50395aac...afb54ba388a7dca6ecae48f608c4ff05ff4cc77a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
10 months agoaarch64: enable PAC/BTI
Bill Roberts [Wed, 10 Jul 2024 17:49:03 +0000 (12:49 -0500)]
aarch64: enable PAC/BTI

Enable Pointer Authentication Codes (PAC) and Branch Target
Identification (BTI) support for ARM 64 targets.

PAC works by signing the LR with either an A key or B key and verifying
the return address. Since the assembly code does not push and pop the
link register to the stack, and it remains in the register file, their
is no need to sign the LR, so PAC is essentially just adding it to the
GNU notes section for auditing purposes.

BTI works by marking all call and jump positions with bti c and bti
j instructions. If execution control transfers via an indirect branch
or call to an instruction other than a BTI instruction, the execution
is killed via SIGILL.

For BTI to work, all object files linked for a unit of execution,
whether an executable or a library must have the GNU Notes section of
the ELF file marked to indicate BTI support. This is so loader/linkers
can apply the proper permission bits (PROT_BRI) on the memory region.

PAC can also be annotated in the GNU ELF notes section, but it's not
required for enablement, as interleaved PAC and non-pac code works as
expected since it's the callee that performs all the checking.

Testing was done under the following CFLAGS and CXXFLAGS for all
combinations:
1. -mbranch-protection=none
2. -mbranch-protection=standard
3. -mbranch-protection=pac-ret
4. -mbranch-protection=pac-ret+b-key
5. -mbranch-protection=bti

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
10 months agobuild(deps): bump github/codeql-action from 3.25.12 to 3.25.13
dependabot[bot] [Mon, 22 Jul 2024 17:58:11 +0000 (17:58 +0000)]
build(deps): bump github/codeql-action from 3.25.12 to 3.25.13

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.12 to 3.25.13.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/4fa2a7953630fd2f3fb380f21be14ede0169dd4f...2d790406f505036ef40ecba973cc774a50395aac)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
10 months agoFixed compiler frontend generation for Clang with GNU frontend on Win32
Basit Ayantunde [Wed, 17 Jul 2024 01:23:33 +0000 (02:23 +0100)]
Fixed compiler frontend generation for Clang with GNU frontend on Win32

10 months agoOnly search system32 for gdi32.dll
Charles Giessen [Tue, 16 Jul 2024 21:52:07 +0000 (14:52 -0700)]
Only search system32 for gdi32.dll

LoadLibraryEx allows specifying where to search for dll's, including
system only paths which is useful for guaranteeing the authenticity
of a loaded dll, which is gdi32.dll in our case.

10 months agoRemove SetDllDirectory as it caused crashes
Charles Giessen [Tue, 16 Jul 2024 19:10:06 +0000 (14:10 -0500)]
Remove SetDllDirectory as it caused crashes

The removal of the current directory from windows Dll searching then using
the default search paths caused a crash in a shipping application. This
requires removal of the offending calls while a better solution for making
LoadLibrary not use the current directory is developed.

10 months agoMake layer interface deprecation notice conditional
Charles Giessen [Tue, 16 Jul 2024 05:40:57 +0000 (00:40 -0500)]
Make layer interface deprecation notice conditional

The notice that renaming vkGetInstanceProcAddr and vkGetDeviceProcAddr functions in the
layer manifest is deprecated will now only be printed if the layer does not also
rename the vkNegotiateLoaderLayerInterfaceVersion function.

10 months agobuild(deps): bump github/codeql-action from 3.25.11 to 3.25.12
dependabot[bot] [Mon, 15 Jul 2024 17:46:09 +0000 (17:46 +0000)]
build(deps): bump github/codeql-action from 3.25.11 to 3.25.12

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b611370bb5703a7efb587f9d136a52ea24c5c38c...4fa2a7953630fd2f3fb380f21be14ede0169dd4f)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
11 months agobuild: Update to header 1.3.290
Mike Schuchardt [Fri, 12 Jul 2024 17:47:15 +0000 (10:47 -0700)]
build: Update to header 1.3.290

11 months agoFix RegCloseKey exeption when double-closing hKeys
Charles Giessen [Thu, 11 Jul 2024 17:13:18 +0000 (10:13 -0700)]
Fix RegCloseKey exeption when double-closing hKeys

While the application still can run, RegCloseKey will throw an error when
key is double-closed. This was caused by the test framework not catching
when the double-close occurs.

11 months agoAdd unknown functions assembly code for linux-armhf
Charles Giessen [Fri, 5 Jul 2024 23:27:23 +0000 (18:27 -0500)]
Add unknown functions assembly code for linux-armhf

This allows linux loaders built for armhf architectures to support unknown
physical device and device functions. The previous fallback path could have
worked for armhf (using the appropriate compiler flags) so as to not disrupt
users, the aarch64 assembly code for unknown functions was ported to armhf.

Since CI support is limited, this was manually built & tested using on a
raspberry pi 4B.

11 months agoAdd clangd .cache to .gitignore
Charles Giessen [Thu, 27 Jun 2024 16:37:57 +0000 (11:37 -0500)]
Add clangd .cache to .gitignore

11 months agobuild(deps): bump github/codeql-action from 3.25.10 to 3.25.11
dependabot[bot] [Mon, 1 Jul 2024 17:50:30 +0000 (17:50 +0000)]
build(deps): bump github/codeql-action from 3.25.10 to 3.25.11

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.10 to 3.25.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/23acc5c183826b7a8a97bce3cecc52db901f8251...b611370bb5703a7efb587f9d136a52ea24c5c38c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
11 months agobuild: Update to header 1.3.289
Mike Schuchardt [Fri, 28 Jun 2024 17:24:40 +0000 (10:24 -0700)]
build: Update to header 1.3.289

11 months agoUpdate documentation of loader settings registry location
Charles Giessen [Tue, 25 Jun 2024 21:06:52 +0000 (16:06 -0500)]
Update documentation of loader settings registry location

11 months agoUpdate CI to macOS 12
Charles Giessen [Mon, 17 Jun 2024 17:25:06 +0000 (12:25 -0500)]
Update CI to macOS 12

macOS 11 is being removed from github actions.

11 months agobuild(deps): bump github/codeql-action from 3.25.8 to 3.25.10
dependabot[bot] [Mon, 17 Jun 2024 17:20:44 +0000 (17:20 +0000)]
build(deps): bump github/codeql-action from 3.25.8 to 3.25.10

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.8 to 3.25.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/2e230e8fe0ad3a14a340ad0815ddb96d599d2aff...23acc5c183826b7a8a97bce3cecc52db901f8251)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
11 months agoRevert "ci: Disable GHA windows build until image is fixed"
Mike Schuchardt [Fri, 14 Jun 2024 19:50:30 +0000 (12:50 -0700)]
Revert "ci: Disable GHA windows build until image is fixed"

This reverts commit 1bae807cd919890f7174fa14228b6e672e8d296e.

11 months agobuild: Update to header 1.3.288
Mike Schuchardt [Fri, 14 Jun 2024 19:27:23 +0000 (12:27 -0700)]
build: Update to header 1.3.288

11 months agoFix preloaded icd's being freed with custom allocators
Charles Giessen [Wed, 12 Jun 2024 21:44:26 +0000 (16:44 -0500)]
Fix preloaded icd's being freed with custom allocators

During unloading of unused drivers, the loader checks for the driver in its
list of preloaded ICD's, and removes it if it is in it. If the user provided
a custom callback during instance creation, this was being used during this
unloading, which is wrong because preloaded icd's weren't allocated with the
custom allocator in the first place.

12 months agobuild(deps): bump github/codeql-action from 3.25.6 to 3.25.8
dependabot[bot] [Mon, 10 Jun 2024 17:55:01 +0000 (17:55 +0000)]
build(deps): bump github/codeql-action from 3.25.6 to 3.25.8

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.6 to 3.25.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/9fdb3e49720b44c48891d036bb502feb25684276...2e230e8fe0ad3a14a340ad0815ddb96d599d2aff)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
12 months agoci: Disable GHA windows build until image is fixed
Mike Schuchardt [Fri, 7 Jun 2024 19:12:44 +0000 (12:12 -0700)]
ci: Disable GHA windows build until image is fixed

SEH exception with code 0xc0000005 thrown in the test body.
https://github.com/actions/runner-images/issues/10004

Unexpected compiler version, expected Clang 17.0.0 or newer.
https://github.com/actions/runner-images/issues/10001

12 months agobuild: Update to header 1.3.287
Mike Schuchardt [Fri, 7 Jun 2024 16:03:02 +0000 (09:03 -0700)]
build: Update to header 1.3.287

12 months agobuild: Update to header 1.3.286
Mike Schuchardt [Mon, 3 Jun 2024 16:40:47 +0000 (09:40 -0700)]
build: Update to header 1.3.286

12 months agobuild(deps): bump jidicula/clang-format-action from 4.12.0 to 4.13.0
dependabot[bot] [Mon, 27 May 2024 17:16:22 +0000 (17:16 +0000)]
build(deps): bump jidicula/clang-format-action from 4.12.0 to 4.13.0

Bumps [jidicula/clang-format-action](https://github.com/jidicula/clang-format-action) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/jidicula/clang-format-action/releases)
- [Commits](https://github.com/jidicula/clang-format-action/compare/v4.12.0...v4.13.0)

---
updated-dependencies:
- dependency-name: jidicula/clang-format-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
12 months agoFix GN build by removing unnecessary files
Charles Giessen [Fri, 24 May 2024 05:05:21 +0000 (00:05 -0500)]
Fix GN build by removing unnecessary files

The phys_dev_ext.c and dev_ext_trampoline.c are only needed when compiling
assembly support for unknown functions in, which is not the case for the GN
builds. Doing that causes linker failues which are resolved with this fix.

12 months agobuild(deps): bump jidicula/clang-format-action from 4.11.0 to 4.12.0
dependabot[bot] [Mon, 20 May 2024 17:15:36 +0000 (17:15 +0000)]
build(deps): bump jidicula/clang-format-action from 4.11.0 to 4.12.0

Bumps [jidicula/clang-format-action](https://github.com/jidicula/clang-format-action) from 4.11.0 to 4.12.0.
- [Release notes](https://github.com/jidicula/clang-format-action/releases)
- [Commits](https://github.com/jidicula/clang-format-action/compare/v4.11.0...v4.12.0)

---
updated-dependencies:
- dependency-name: jidicula/clang-format-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
12 months agobuild(deps): bump github/codeql-action from 3.25.5 to 3.25.6
dependabot[bot] [Mon, 20 May 2024 17:15:33 +0000 (17:15 +0000)]
build(deps): bump github/codeql-action from 3.25.5 to 3.25.6

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.5 to 3.25.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b7cec7526559c32f1616476ff32d17ba4c59b2d6...9fdb3e49720b44c48891d036bb502feb25684276)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
12 months agoci: Add mingw build test for USE_GAS=ON
Kacper Michajłow [Sat, 18 May 2024 16:11:38 +0000 (18:11 +0200)]
ci: Add mingw build test for USE_GAS=ON

12 months agobuild: Fix compilation with USE_GAS and WIN32
Kacper Michajłow [Sat, 18 May 2024 16:58:57 +0000 (18:58 +0200)]
build: Fix compilation with USE_GAS and WIN32

The loader-unknown-chain target is not defined when USE_GAS is used.

Fixes: 238cf14a59cc564d0614dc3c70cf3975b4b43b65
12 months agobuild: Normalize CMAKE_SYSTEM_PROCESSOR before use
Kacper Michajłow [Sat, 18 May 2024 16:55:33 +0000 (18:55 +0200)]
build: Normalize CMAKE_SYSTEM_PROCESSOR before use

This fixes inconsistencies in CMAKE_SYSTEM_PROCESSOR. On some platforms
it is uppercase. Also replace amd64 with x86_64.

This makes GAS usage compatible with more targets.

12 months agoChange loader-unknown-chain into a STATIC library
Charles Giessen [Thu, 16 May 2024 01:01:15 +0000 (20:01 -0500)]
Change loader-unknown-chain into a STATIC library

loader-unknown-chain is now a STATIC library instead of an OBJECT
library. Object libraries have limitations compared to 'normal' libraries,
and this simplifies the CMake usage present.

This change includes a fix for building using Ninja, as there is a bug
in cmake related to static libraries that contain assembly code that
affect builds using MSVC and clang-cl.

12 months agotests: Allow test ICD to handle NULL pApplicationInfo
Daniel Rakos [Thu, 16 May 2024 08:07:27 +0000 (10:07 +0200)]
tests: Allow test ICD to handle NULL pApplicationInfo

12 months agoRemove faulty fallback for unknown functions
Charles Giessen [Wed, 15 May 2024 23:53:12 +0000 (18:53 -0500)]
Remove faulty fallback for unknown functions

This code was only used when the required assembly code for unknown function
was missing or intentionally disabled. Because it relied on the implementation
of the compiler to optimize the code in such a way as to not disturb passed in
parameters, the fallback code could not be relied on to work. Removing the
fallback path simplifies the support matrix by making unknown functions
definitely not supported (and will return NULL when queried), whereas with the
fallback the code may work or may crash.

12 months agobuild(deps): bump github/codeql-action from 3.25.3 to 3.25.5
dependabot[bot] [Mon, 13 May 2024 17:43:01 +0000 (17:43 +0000)]
build(deps): bump github/codeql-action from 3.25.3 to 3.25.5

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.3 to 3.25.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/d39d31e687223d841ef683f52467bd88e9b21c14...b7cec7526559c32f1616476ff32d17ba4c59b2d6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
13 months agobuild: Update to header 1.3.285
Mike Schuchardt [Mon, 13 May 2024 17:25:32 +0000 (10:25 -0700)]
build: Update to header 1.3.285

13 months agoCheck for NULL in unloading of preloaded-icd's
Charles Giessen [Wed, 8 May 2024 19:31:15 +0000 (14:31 -0500)]
Check for NULL in unloading of preloaded-icd's

strcmp has undefined behavior if either parameter is NULL. Due to clearing
out unloaded entries, this would cause unload_drivers_without_physical_devices
to try to compare against already unloaded entries.

This commit also condenses the preloaded_icds list so that it doesn't contain
gaps.

13 months agobuild: Update to header 1.3.284
Mike Schuchardt [Wed, 8 May 2024 15:24:03 +0000 (08:24 -0700)]
build: Update to header 1.3.284

13 months agoDestroy Instance objects before Instance & use correct allocator
Charles Giessen [Mon, 6 May 2024 20:30:58 +0000 (15:30 -0500)]
Destroy Instance objects before Instance & use correct allocator

The loader was accidentally destroying instance level objects after
it called vkDestroyInstance. This only was caught during driver unloading
because in a well behaved app, all objects are destroyed before calling
vkDestroyInstance.

The other issue was that a non-null pAllocator was passed into
object destruction but the members of VkAllocatorCallbacks were NULL,
due to just taking a pointer to the instance's allocator callbacks.
That has been fixed. A possible issue is that the allocator callbacks
used during object creation weren't used in destruction, which has
also been fixed.

13 months agoAdd Create/DestroyDebugReportCallback to test_icd
Charles Giessen [Mon, 6 May 2024 20:30:17 +0000 (15:30 -0500)]
Add Create/DestroyDebugReportCallback to test_icd

13 months agoUse std::filesystem instead of custom fs::path
Charles Giessen [Fri, 12 Apr 2024 19:45:32 +0000 (14:45 -0500)]
Use std::filesystem instead of custom fs::path

Removes code and makes the codebase more understandable (by not
introducing weird behavior unique to fs::path).

Replaces a lot of the bespoke logic to handle string<->wstring due
to using std::filesystem::path.

13 months agoFix tests framework_config.h to work all the time
Charles Giessen [Thu, 2 May 2024 15:42:56 +0000 (10:42 -0500)]
Fix tests framework_config.h to work all the time

When using multi-config build systems such as MSVC, it was possible
for the framework_config.h to not be updated properly, resulting in
the wrong binaries being used during testing. By ditching the
common header file and directly specifying the header file to use
through a compiler definition, the code is now shorter and more
reliable.

13 months agoAllow layers to call global functions in vkCreateInstance
Charles Giessen [Thu, 2 May 2024 16:53:19 +0000 (11:53 -0500)]
Allow layers to call global functions in vkCreateInstance

Layers that want to call other global functions during vkCreateInstance
couldn't due to loader_gpa_instance_terminator missing the necessary logic.
Because those global functions have a different signature, it was decided
to update the terminator_<function> signatures to match the Vulkan API, and
make dedicated pre-instance intercetpion functions with the appropriate
Chain object as the first parameter.

Now during the call down to vkCreateInstance a layer can query for
pre-instance functions with vkGetInstanceProcAddr and is able to call them
using the Vulkan API function signature.

13 months agobuild(deps): bump github/codeql-action from 3.25.1 to 3.25.3
dependabot[bot] [Mon, 29 Apr 2024 17:35:05 +0000 (17:35 +0000)]
build(deps): bump github/codeql-action from 3.25.1 to 3.25.3

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.1 to 3.25.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/c7f9125735019aa87cfc361530512d50ea439c71...d39d31e687223d841ef683f52467bd88e9b21c14)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
13 months agoAdd VK_LAYER_PATH ordering test
Charles Giessen [Mon, 29 Apr 2024 17:40:13 +0000 (12:40 -0500)]
Add VK_LAYER_PATH ordering test

13 months agoAdd missing VKAPI_ATTR/VKAPI_CALL in test_icd.cpp
Charles Giessen [Thu, 25 Apr 2024 17:00:23 +0000 (10:00 -0700)]
Add missing VKAPI_ATTR/VKAPI_CALL in test_icd.cpp

Necessary for any functions called across dll boundaries on 32 bit windows.

13 months agoci: Update to python 3.11
Charles Giessen [Wed, 24 Apr 2024 21:46:37 +0000 (16:46 -0500)]
ci: Update to python 3.11

13 months agoRefactor instance level objects to not use icd_index
Charles Giessen [Tue, 26 Mar 2024 22:23:13 +0000 (17:23 -0500)]
Refactor instance level objects to not use icd_index

The previous way per-ICD instance level objects were accessed was
using the ICD's index into an array that was allocated with the object.
This solution worked while the indexes were static, but with the
recent change to remove unused ICD's that is no longer the case.

This commit replaces an array per object with object arrays, one for each
type (surface, debug messenger, & debug report) and per ICD. That flips
where the index comes from, with the instance storing an array indication
which indices are used and which are free.

Whenever an instance level object is created, the loader checks if there
is a free index available, reusing it if available. Otherwise it resizes
its own store as well as each ICD's array for that object.

13 months agoEnhance DriverUnloading tests
Charles Giessen [Fri, 22 Mar 2024 16:57:40 +0000 (11:57 -0500)]
Enhance DriverUnloading tests

Drivers resize after 32 elements, so to test that path we need to loop
over instance level handle creation (surface, debug messenger, debug
report).

The driver unloading tests needed to create a debug report callback, so
that functionality was added to the test framework, modifying
VulkanFunctions with a new init function and to make InstWrapper call it
when creating an instance.

Modify how test_icd_version_7 operates so that by default the functions
are exported which is the 'assumed' codepath. This results in a bit of
duplication between version 6 & 7, but was kept so as to not modify
every test. This also clarifies how a test should enable querying of
the functions through vkGetInstanceProcAddr versus exporting those
functions (it was combined before).

13 months agoUse ICD lib_name in error reporting instead of index
Charles Giessen [Thu, 21 Mar 2024 19:48:21 +0000 (14:48 -0500)]
Use ICD lib_name in error reporting instead of index

The index must be referenced against the loader's internal index of each
ICD. Instead, we should print the lib_name in the error message, making
it more clear which driver the error is coming from.

13 months agoFix TestICD enabled instance extension tracking
Charles Giessen [Thu, 21 Mar 2024 17:51:26 +0000 (12:51 -0500)]
Fix TestICD enabled instance extension tracking

13 months agoEnhance driver unloading tests
Charles Giessen [Mon, 18 Dec 2023 22:51:37 +0000 (15:51 -0700)]
Enhance driver unloading tests

13 months agoRename total_icd_count to icd_terms_count
Charles Giessen [Mon, 18 Dec 2023 22:51:08 +0000 (15:51 -0700)]
Rename total_icd_count to icd_terms_count

13 months agoUnload drivers which report 0 physical devices
Charles Giessen [Tue, 7 Nov 2023 21:45:35 +0000 (14:45 -0700)]
Unload drivers which report 0 physical devices

The loader did not unload any ICD's which contained zero physical devices, which
could cause premature exhaustion of memory in some circumstances, like 32 bit
applications. While the policy of the loader has been to keep things open for
the duration of the instance, these ICD's don't meaningfully participate in
anything due to the lack of VkPhysicalDevices.

This change adds a check after vkEnumeratePhysicalDevices where pPhysicalDevices
is not NULL such that all loader_icd_terms which reported zero physical devices
have its vkDestroyInstance called, and removed from the loader_instance's
icd_term linked list.

13 months agoAdd simple timer of ICD preloading in live tests
Charles Giessen [Sat, 4 Nov 2023 04:52:49 +0000 (22:52 -0600)]
Add simple timer of ICD preloading in live tests

Adds a simple executable that times how long vkEnumerateInstanceExtensionProperties
takes over and over to see how well the ICD preloading functions.

13 months agoGracefully handle error results from vkEnumeratePhysicalDevices
Charles Giessen [Fri, 12 Apr 2024 17:17:50 +0000 (10:17 -0700)]
Gracefully handle error results from vkEnumeratePhysicalDevices

If any driver returned non-VK_SUCCESS values (except for OOHM) when the
loader calls vkEnumeratePhysicalDevices, it would give up and return
immediately. This could result in perfectly functional drivers being
ignored.

The solution is to just skip over drivers that return non-VK_SUCCESS.

13 months agobuild(deps): bump github/codeql-action from 3.25.0 to 3.25.1
dependabot[bot] [Mon, 22 Apr 2024 17:17:30 +0000 (17:17 +0000)]
build(deps): bump github/codeql-action from 3.25.0 to 3.25.1

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.0 to 3.25.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/df5a14dc28094dc936e103b37d749c6628682b60...c7f9125735019aa87cfc361530512d50ea439c71)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
13 months agobuild: Update to header 1.3.283
Mike Schuchardt [Fri, 19 Apr 2024 15:47:14 +0000 (08:47 -0700)]
build: Update to header 1.3.283

13 months agobuild: Update to header 1.3.282
Mike Schuchardt [Tue, 16 Apr 2024 18:46:15 +0000 (11:46 -0700)]
build: Update to header 1.3.282

13 months agoFix update_deps.py script to handle Windows Arm64.
Alex Rønne Petersen [Sun, 14 Apr 2024 03:08:48 +0000 (05:08 +0200)]
Fix update_deps.py script to handle Windows Arm64.

13 months agobuild(deps): bump github/codeql-action from 3.24.10 to 3.25.0
dependabot[bot] [Mon, 15 Apr 2024 17:37:33 +0000 (17:37 +0000)]
build(deps): bump github/codeql-action from 3.24.10 to 3.25.0

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.10 to 3.25.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/4355270be187e1b672a7a1c7c7bae5afdc1ab94a...df5a14dc28094dc936e103b37d749c6628682b60)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
14 months agobuild(deps): bump github/codeql-action from 3.24.9 to 3.24.10
dependabot[bot] [Mon, 8 Apr 2024 17:22:02 +0000 (17:22 +0000)]
build(deps): bump github/codeql-action from 3.24.9 to 3.24.10

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.9 to 3.24.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/1b1aada464948af03b950897e5eb522f92603cc2...4355270be187e1b672a7a1c7c7bae5afdc1ab94a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
14 months agoCleanup tests
Charles Giessen [Thu, 4 Apr 2024 21:50:17 +0000 (16:50 -0500)]
Cleanup tests

Fixed a few bugs resulting in some tests not running everything they
were intended to, remove dead code, simplify codepaths, etc.

This was done using code coverage to find test code which wasn't being
executed.

14 months agoAdd support for the lcov code coverage tool
Charles Giessen [Thu, 9 Mar 2023 21:04:08 +0000 (14:04 -0700)]
Add support for the lcov code coverage tool

14 months agobuild(deps): bump github/codeql-action from 3.24.8 to 3.24.9
dependabot[bot] [Mon, 25 Mar 2024 17:07:19 +0000 (17:07 +0000)]
build(deps): bump github/codeql-action from 3.24.8 to 3.24.9

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.8 to 3.24.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/05963f47d870e2cb19a537396c1f668a348c7d8f...1b1aada464948af03b950897e5eb522f92603cc2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
14 months agobuild: Update to header 1.3.281
Mike Schuchardt [Fri, 22 Mar 2024 21:37:06 +0000 (14:37 -0700)]
build: Update to header 1.3.281

14 months agoUpdate version of detours in known_good.json
Anthony Roberts [Fri, 22 Mar 2024 12:12:05 +0000 (12:12 +0000)]
Update version of detours in known_good.json