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
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>
Xuelian Bai [Fri, 23 Sep 2022 06:09:21 +0000 (14:09 +0800)]
Upgrade to v1.3.240
Change-Id: Ibcdb636a32951e23bd0871a93dd7ffa88a7cc2c6
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>
jinbong, Lee [Wed, 10 Aug 2022 04:15:16 +0000 (13:15 +0900)]
remove double slash in vulkan.pc
Change-Id: I891e70bd36594aa31fc6f405006e233c58ad35d1
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>
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>
SooChan Lim [Thu, 29 Nov 2018 12:29:50 +0000 (21:29 +0900)]
add spec file
Mike Schuchardt [Fri, 13 Oct 2023 17:34:36 +0000 (10:34 -0700)]
build: Update to header 1.3.268
- Update known-good
- Generate source
Juan Ramos [Sat, 7 Oct 2023 19:45:18 +0000 (13:45 -0600)]
cmake: Fix vulkan.pc regressions
closes #1318, #1319
Mike Schuchardt [Fri, 6 Oct 2023 15:29:38 +0000 (08:29 -0700)]
build: Update to header 1.3.267
- Update known-good
- Generate source
Christopher Degawa [Thu, 5 Oct 2023 00:02:04 +0000 (19:02 -0500)]
github: split mingw-no-asm job
Splits the mingw-no-asm job into an explicit -D USE_MASM=OFF and one
without to test the automatic detection of MASM.
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Christopher Degawa [Wed, 4 Oct 2023 18:42:44 +0000 (13:42 -0500)]
loader: Add check for working MASM compiler
CMake's detection of MASM is very broken, especially if not using MSVC.
This adds a check to see if MASM is working, and if not, disables it,
going back to the fallback path, as intended.
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Juan Ramos [Thu, 5 Oct 2023 17:50:15 +0000 (11:50 -0600)]
cmake: Don't REQUIRE find_package(VulkanHeaders)
Allows use of add_subdirectory with the loader
This is the same approach used by the validation layers.
Juan Ramos [Wed, 4 Oct 2023 23:12:01 +0000 (17:12 -0600)]
gn: asm_offset.c shouldn't be compiled
asm_offset.c only makes sense for an executable
Juan Ramos [Wed, 4 Oct 2023 22:41:42 +0000 (16:41 -0600)]
docs: New SDK branch convention
Next SDK we will be changing branch/tag naming scheme from
sdk-1.x.yyy to vulkan-sdk-1.x.yyy
Juan Ramos [Wed, 4 Oct 2023 21:58:15 +0000 (15:58 -0600)]
cmake: Remove CMAKE_INSTALL_INCLUDEDIR_PC
Currently this just will default to `include` IE it will default
to system includes.
Which gcc already searches for:
https://stackoverflow.com/a/
19839946/
19739129
Now vulkan.pc will more closely match VulkanLoaderConfig.cmake
Juan Ramos [Wed, 4 Oct 2023 21:15:35 +0000 (15:15 -0600)]
cmake: Remove PRIVATE_LIBS from vulkan.pc.in
We don't ship APPLE AND BUILD_STATIC_LOADER so supporting
the pkg-config for it is unneccessary and error prone.
This makes both configuration files consistent.
Juan Ramos [Wed, 4 Oct 2023 20:34:47 +0000 (14:34 -0600)]
cmake: Cleanup package config code
Charles Giessen [Wed, 4 Oct 2023 17:35:56 +0000 (11:35 -0600)]
Remove unnecessary comment in build.yml
Christopher Degawa [Tue, 3 Oct 2023 00:17:07 +0000 (19:17 -0500)]
github: re-enable normal mingw build
pulls uasm from msys2
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Christopher Degawa [Mon, 2 Oct 2023 04:38:11 +0000 (23:38 -0500)]
actions: Re-add -DUSE_MASM=OFF
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Christopher Degawa [Mon, 2 Oct 2023 04:37:04 +0000 (23:37 -0500)]
loader/asm_offset: Add __USE_MINGW_ANSI_STDIO
This fixes warnings generated when compiling with mingw-w64 regarding
printf format specifiers that are not available with base msvcrt.
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Christopher Degawa [Mon, 2 Oct 2023 03:37:08 +0000 (22:37 -0500)]
loader: Add uasm as an alternative name for jwasm
uasm is a drop-in replacement for jwasm most of the time, but doesn't
always provide a binary named jwasm (such as on archlinux).
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Christopher Degawa [Mon, 2 Oct 2023 02:38:28 +0000 (21:38 -0500)]
loader: Fix cross-compiling with jwasm
fixes a few issues when cross-compiling from linux to windows using
mingw-w64. Particularly with the result of jwasm not being used in the
library. Additionally, allows running the generated asm_offset binary
with wine, if the user provided the wrapper in their toolchain with
`-DCMAKE_CROSSCOMPILING_EMULATOR=wine`.
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Charles Giessen [Thu, 28 Sep 2023 19:08:46 +0000 (13:08 -0600)]
Fix problems detected by CodeQL static analysis
3 types of issues were found:
* Incorrect format specifiers
* Not providing required format specifies
* Using alloca in a loop
There are multiple instances of alloca in loops, but to fix them would
require significant refactoring. This commit includes 1 move of alloca inside
a for loop to the outside, but this is because the logic was redoing work
in a for loop that could have been done once at the start of the function.
Christopher Degawa [Thu, 6 Jul 2023 18:57:56 +0000 (13:57 -0500)]
loader/cJSON: Prefix/mark static/remove symbols
Prefixes the symbols that are used outside the file with `loader_` to
match the others. Marks symbols that are not used outside as static.
Removes the symbols that are not used at all.
Prevents conflicts with other libraries that might also use cjson.
This may cause issues if the internal checkout of cJSON is updated, in
that case, it may be simpler to just prefix all of cJSON's symbols with
`loader_cJSON_`.
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Mike Schuchardt [Fri, 29 Sep 2023 14:59:43 +0000 (07:59 -0700)]
build: Update to header 1.3.266
- Update known-good
- Generate source
Joyce Brum [Thu, 28 Sep 2023 19:12:29 +0000 (19:12 +0000)]
feat: enable codeql
Signed-off-by: Joyce Brum <joycebrum@google.com>
Richard S. Wright Jr [Tue, 26 Sep 2023 22:22:15 +0000 (18:22 -0400)]
XCode fix - warnings as errors and unused parameter triggers it
Richard S. Wright Jr [Tue, 26 Sep 2023 21:48:16 +0000 (17:48 -0400)]
Tweaked CMakeLists.txt for better organization
Richard S. Wright Jr [Tue, 26 Sep 2023 20:02:14 +0000 (16:02 -0400)]
removed toolchain
Richard S. Wright Jr [Wed, 19 Jul 2023 15:41:11 +0000 (11:41 -0400)]
WIP: Added defines for iOS
Richard S. Wright Jr [Thu, 6 Jul 2023 21:43:01 +0000 (17:43 -0400)]
WIP: Loader seems to work on iOS
Mike Schuchardt [Mon, 25 Sep 2023 17:27:53 +0000 (10:27 -0700)]
build: Update to header 1.3.265
- Update known-good
- Generate source
Charles Giessen [Tue, 19 Sep 2023 21:23:29 +0000 (15:23 -0600)]
Fix warning message refering to layers instead of ICDs
The warning message about the binary having the wrong bitness for
ICD's was wrongly stating it was about layers having the wrong
bitness.
Charles Giessen [Mon, 18 Sep 2023 00:10:39 +0000 (18:10 -0600)]
Use backtick instead of single quote in Loader Debugging
Surrounding text with ~ causes markdown to format the text with strike through, which is not intended. Surrounding the ~ with backticks instead of single quotes fixes it.
Charles Giessen [Fri, 15 Sep 2023 19:31:51 +0000 (13:31 -0600)]
Check correct magic value in device dispatch table
The check for a correct magic value in the device dispatch table used
LOADER_MAGIC_NUMBER instead of DEVICE_DISP_TABLE_MAGIC_NUMBER. This causes
every device creation to emit the 'invalid magic value' message, which is
wrong. This commit fixes that, as well as adds the expected value to the
log message.
Juan Ramos [Wed, 13 Sep 2023 16:36:52 +0000 (10:36 -0600)]
cmake: Add find_package support
Juan Ramos [Wed, 13 Sep 2023 16:01:02 +0000 (10:01 -0600)]
cmake: Simplify install code
sfan5 [Tue, 12 Sep 2023 21:38:47 +0000 (23:38 +0200)]
cmake: Only search for MASM when using MSVC
Juan Ramos [Tue, 12 Sep 2023 20:50:39 +0000 (14:50 -0600)]
cmake: Fix MinGW vulkan.pc
Reverts KhronosGroup/Vulkan-Loader/pull/670 which produces an
invalid .pc file
closes #1278
Charles Giessen [Tue, 22 Aug 2023 21:49:17 +0000 (15:49 -0600)]
Add device dispatch table magic value check
The device dispatch table has a magic value to ensure consistency, but
there was no message logged in case the magic value was corrupted. This
commit adds that check, fixes the message being printed for the instance
magic value check, and adds tests to ensure they are contining to be
checked in the future.
Mike Schuchardt [Mon, 11 Sep 2023 14:44:29 +0000 (07:44 -0700)]
build: Update to header 1.3.264
- Update known-good
- Generate source
Charles Giessen [Fri, 8 Sep 2023 20:28:35 +0000 (14:28 -0600)]
Make test_layer delete destroyed devices
Destroyed devices need to be removed from the test_layer's created_devices
vector, so that it doesn't accidentally mistake dead devices for alive ones
when checking for whether a device extension is supported or not.
This caused multiple days of debugging headache as it caused sporadic test
failures due to the re-use of VkDevice handle values (which is caused by
the memory manager reusing allocations). Since a second VkDevice could share
the handle value of the first, and the first wasn't removed from the vector,
test_layer would use the data assocated with the first device by mistake.
Charles Giessen [Tue, 5 Sep 2023 22:44:38 +0000 (16:44 -0600)]
Add Debug extension support to test layer
Debug utils, debug report, and debug marker are now supported directly in the
test layer, allowing easy testing of the behavior of layers which support
these debug extensions.
This allows testing the matrix of combinations between drivers, layers, and
loader support for these debug extensions.
This commit also adds a 'injected_extension' concept into the test_layer,
which allows recreating the behavior of layers which modify the extension
list returned by the driver.
Charles Giessen [Tue, 5 Sep 2023 22:36:57 +0000 (16:36 -0600)]
Fix incorrect handling of Debug Marker functions
The implementation for VK_KHR_maintenance_5 exposed a bug in how the function
for debug_marker functions were gotten. The bug was to only check if a
driver supports a physical device when querying for device function pointers,
which ignores the possibility of a layer supporting a device extension. This
is an issue for VK_EXT_debug_marker, which requires trampoline functions to
properly unwrap data passed in, resulting in the various debug marker functions
returning NULL instead of a valid function pointer.
Shahbaz Youssefi [Fri, 8 Sep 2023 13:39:28 +0000 (09:39 -0400)]
MSAN fixes
Mike Schuchardt [Tue, 5 Sep 2023 18:18:17 +0000 (11:18 -0700)]
build: Update to header 1.3.263
- Update known-good
- Generate source
Mike Schuchardt [Fri, 25 Aug 2023 18:39:57 +0000 (11:39 -0700)]
build: Update to header 1.3.262
- Update known-good
- Generate source
Juan Ramos [Fri, 25 Aug 2023 17:59:19 +0000 (11:59 -0600)]
cmake: Fix gtest CMake warning
https://github.com/google/googletest/pull/4288
Juan Ramos [Fri, 25 Aug 2023 17:52:28 +0000 (11:52 -0600)]
cmake: Cleanup Threads::Threads logic
Android isn't supported
Juan Ramos [Fri, 25 Aug 2023 17:51:45 +0000 (11:51 -0600)]
cmake: Fail when building for Android
Mike Gorchak [Thu, 24 Aug 2023 17:19:39 +0000 (13:19 -0400)]
1. Update build-qnx content to make it buildable again.
2. Switch __QNXNTO__ macro check to __QNX__
During last 23 years the QNX Neutrino microkernel was active, __QNXNTO__ macro belongs to it. Now QNX Muon microkernel is under development, so __QNX__ macro covers both versions: Neutrino and Muon.
First public announce of QNX Muon was here: https://blogs.blackberry.com/en/2023/04/get-in-the-sdv-podcast-from-blackberry-season-2-episode-3
Charles Giessen [Thu, 17 Aug 2023 22:12:26 +0000 (16:12 -0600)]
Add support for AppleClang and iOS cross compilation
Compiling for iOS on an intel mac failed due to not handling the locations of
gen_defines.asm and asm_offset.s when running under AppleClang. This solution
works for the toolchain file used during development but may not work in other
situations.
iOS does not support secure_getenv, which is fine, except that the cmake
code check_function_exists seems to think it is supported, causing compilation
to fail. Just hardcoding secure_getenv to not be supported is enough for
the unix shim logic to compile.
The compilation revelaed a few issues in the test code, like not using
[[maybe_unused]] and a signed/unsigned comparison.
Charles Giessen [Wed, 9 Aug 2023 19:48:01 +0000 (13:48 -0600)]
Document VK_DRIVER_FILES ability to look in folders
Orinigally VK_ICD_FILENAMES was documented to only be able to use full paths to
ICD Manifest files. This is untrue, as VK_ICD_FILENAMES, and its replacement
VK_DRIVER_FILES is able to find drivers using full paths as well as paths to
folders containing manifest files. This commit amends the documentation to
reflect that capability as well as adding a test for that use case.
Charles Giessen [Tue, 1 Aug 2023 23:22:15 +0000 (17:22 -0600)]
Add VK_LOADER_LAYERS_ALLOW environment variable.
This new environment variable prevents the VK_LOADER_LAYERS_DISABLE
env-var from applying to layers in the VK_LOADER_LAYERS_ALLOw env-var.
The purpose of it is to act like VK_LOADER_LAYERS_ENABLE in regards to
VK_LOADER_LAYER_DISABLE without force enabling the layers. That way,
implicit layers which normally would only be enabled in certain
circumstances (eg their enable_environment is set) can be allowed
while still disallowing other implicit layers.
Charles Giessen [Tue, 1 Aug 2023 20:56:57 +0000 (14:56 -0600)]
Move filter Env-Var parsing to top level functions
The loader was querying the layer environment variable filters multiple
times during instance creation. The solution is to move the queries out
of the function that use them and do them once at the start of every
API call that needs them. That way the filters can be passed into each
function and shared.
Charles Giessen [Tue, 1 Aug 2023 20:03:09 +0000 (14:03 -0600)]
Consolidate envvar filters into single struct
There are many places where both the enable & disable envvar filter are
passed down into functions. This commit consolidates that by introducing
a new struct to hold both the enable & disable envvar filter. This
reduces the number of parameters to many functions and streamlines the
logic. It also enables future changes to what filters are available.
Charles Giessen [Sat, 29 Jul 2023 19:02:30 +0000 (13:02 -0600)]
Add CRT Warnings & fix them
Fixes the many uses of strncpy and strncat to use versions of the functions
which the CRT approves of. This means adding the length of the destination
string as a parameter.
The function loader_platform_combine_path was removed and the single use of
it was replaced with a call to snprinf, which achieves the same goal.
There are a few other functions that the CRT warns about, like fopen and
the wide char version of strcpy. These were also replaced with the 'safe'
functions.
Mike Schuchardt [Fri, 4 Aug 2023 21:59:15 +0000 (14:59 -0700)]
build: Update to header 1.3.261
- Update known-good
- Generate source
Charles Giessen [Wed, 2 Aug 2023 18:31:06 +0000 (12:31 -0600)]
Make maintenance 5 require the feature to be enabled
The maintenance 5 behavior should only apply when the feature is enabled in
addition to the extension being enabled.
Charles Giessen [Mon, 31 Jul 2023 21:28:40 +0000 (15:28 -0600)]
Enable VK_KHR_maintenance_5 support
The extension changes the behavior of vkGetDeviceProcAddr to no longer allow
querying of core functions beyond the version specified in VkApplicationInfo.
Thus, a check is needed to ensure that if the extension is enabled, the
apiVersion is sufficient for the function to be returned.
Charles Giessen [Mon, 31 Jul 2023 19:30:49 +0000 (13:30 -0600)]
Unwrap VkInstance in set name/tag debug functions
It is possible for a layer to wrap the instance handle, and when the various
Set Name/Tag debug functions are called, the passed structure may contain an
instance handle which was previously not being unwrapped before calling down
the chain. This caused renderdoc to crash, as the instance handle was not
known to it.
Mike Schuchardt [Mon, 31 Jul 2023 15:58:07 +0000 (08:58 -0700)]
build: Update to header 1.3.260
- Update known-good
- Generate source
Charles Giessen [Sat, 29 Jul 2023 19:15:13 +0000 (13:15 -0600)]
Fixed the value of the FATAL_ERROR bit
0x160 is *not* the next highest power of two in hex after 0x80, it is in fact 0x100.
This error caused the log function to always log every message, rather than just
fatal ones and whatever messages match the VK_LOADER_LOG environment variable.
Charles Giessen [Thu, 25 Aug 2022 17:38:49 +0000 (11:38 -0600)]
Add relative path support to test harness
Makes sure the loader test framework can create relative paths in
the library_path fields. Adds a test to insure those paths still
work.
Since the contents of "library_path" is mututally exclusive with
the existing use_dynamic_library_default_search_paths, a new enum
was added to allow tests to choose which of the three content
types a given ICD or Layer manifest should use.
Charles Giessen [Thu, 27 Jul 2023 22:37:46 +0000 (16:37 -0600)]
Make fatal log messages be written to stderr
When the loader is about to call abort(), it calls loader_log to tell the user
why the loader is crashing. Unfortunately, unless the user set VK_LOADER_DEBUG
before starting the loader, they will not see this message. This commits adds
a new debug flag to signal to loader_log() that this message should be written
to stderr no matter what. This commit also changes all current loader_log call
sites that subsequently call abort() to use this flag.
Gregory Schlomoff [Thu, 27 Jul 2023 19:21:24 +0000 (12:21 -0700)]
Fix wrong file name in comments
Charles Giessen [Thu, 27 Jul 2023 20:10:06 +0000 (14:10 -0600)]
Make Disabling Dynamic Library unloading a runtime option
This behavior was previously only available if compiled with a specific
option, but its useful enough to be moved into a runtime option.
To enable the behavior, set the environment variable
VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING to "1".
Charles Giessen [Wed, 13 Jul 2022 17:23:59 +0000 (11:23 -0600)]
Add tests for explicit layers with pre_instance_functions
Makes sure that any explicit layers with pre_instance_functions are
ignored, even if they would be enabled by an override layer or the
settings file.
Charles Giessen [Wed, 21 Jun 2023 01:19:14 +0000 (19:19 -0600)]
Check api version when querying device commands
Note: This behavior is not enabled at this time. Future work is needed
to determine when to enable the behavior described below
Device commands from versions newer than the apiVersion should not be used,
since the app did not enable support for them. But querying for the functions
ignored the API version. This commit makes the loader check the apiVersion
before deciding whether to return a valid function pointer or NULL.
Tests were added for verifying each behavior, however the tests are
only partially implemented as there is no mechanism to enable the behavior
at the current time.
Charles Giessen [Thu, 20 Jul 2023 19:53:04 +0000 (13:53 -0600)]
Set correct API version in tests
The manifest file version and physical device properties versions should match
in many of the tests, to insure that there isn't unintended behavior occuring.
This commit also cleans up the LayerPhysDeviceMod tests so they aren't adding
an ICD at the very top, which appears to have been accidental. Making that fix
did require modifying the test logic to put physical devices in a slightly
different order in the physical device groups.
Charles Giessen [Thu, 20 Jul 2023 19:51:14 +0000 (13:51 -0600)]
Remove unecessary version setting in tests
The default value is 1.0, so it isn't necessary to set it.
Charles Giessen [Thu, 20 Jul 2023 18:25:12 +0000 (12:25 -0600)]
Cleanup how tests create PhysicalDeviceGroup vectors
Makes use of the vectors initialization constructor to remove iterating over
the elements of the vector to set the sType manually.
Also zero's out the VkPhysicalDevice array in the TestICD so that non-filled
in elements have a value of zero instead of being uninitialized.
Charles Giessen [Thu, 20 Jul 2023 18:23:01 +0000 (12:23 -0600)]
Add VK_LAYER to layer names in tests
Layer names should begin with VK_LAYER, which wasn't being done in certain
tests which this commit fixes.
Charles Giessen [Thu, 20 Jul 2023 18:16:22 +0000 (12:16 -0600)]
Warn when ICD Manifest version differs from vkEnumerateInstanceVersion
The apiVersion inside of the ICD Manifest is the first version the loader uses
to determine what the driver is capable of. If it is 1.1+, it will query for
vkEnumerateInstanceVersion & call it. This commit adds warnings for when the
returned version is 1.0 as well as when the function failed to be queried,
which a 1.1+ driver should not fail.
This warning is in response to a real issue due to behavioral differences in
the loader between 1.0 and 1.1 drivers, as the manifest file reported 1.1
while the vkEnumerateInstanceVersion reported 1.0.
Charles Giessen [Mon, 24 Jul 2023 16:37:25 +0000 (10:37 -0600)]
Enhance warning messages for portability enumeration
There are three different ways for applications to fail to enumerate
portability drivers, not enabling the flag bit, not enabling the extension,
and both. These were all reported as the same error, which isn't as helpful
as it printing a separate message for each case.
This also makes it possible to emit a VUID for the case of setting the flag
bit but not the extension.
Mike Schuchardt [Mon, 24 Jul 2023 16:47:32 +0000 (09:47 -0700)]
build: Update to header 1.3.259
- Update known-good
- Generate source
Juan Ramos [Fri, 21 Jul 2023 22:18:58 +0000 (16:18 -0600)]
cmake: Remove cmake-format
Mike Schuchardt [Fri, 21 Jul 2023 16:31:31 +0000 (09:31 -0700)]
build: Update to header 1.3.258
- Update known-good
- Generate source
Charles Giessen [Mon, 3 Jul 2023 23:35:45 +0000 (17:35 -0600)]
Set SYSCONFDIR in linux-32 actions CI run
Ensures that this build setting is exercised.
Charles Giessen [Mon, 3 Jul 2023 21:45:23 +0000 (15:45 -0600)]
Add test for override layer path logging
Charles Giessen [Mon, 3 Jul 2023 21:44:02 +0000 (15:44 -0600)]
Fix wrong pointer usage
get_override_layer_override_paths logs the path used, but during the refactor it
failed to dereference the double pointer properly, leading to the loader_log
message reading garbage. This was not caught on x64 address sanitizer builds, but
was on the 32 bit build.
Charles Giessen [Mon, 3 Jul 2023 20:18:10 +0000 (14:18 -0600)]
Fix duplicate layer test which used /etc
The ImplicitLayers.DuplicateLayers test requires there to be two separate
files on the file system, located in different paths. To accomplish that, the
test writes a file to /etc and another to the default location. By default,
that is typically /usr/local/share. If the project is configured to set /etc
as that default location, only one file will be written.
The fix is to move the duplicate file from /etc to the default home directory,
since that is configured from inside the tests itself. This does change the
order the layers are found in, so the logic of the test had to be flipped.
Joyce [Fri, 14 Jul 2023 19:55:54 +0000 (16:55 -0300)]
Create SECURITY.md
Signed-off-by: Joyce <joycebrum@google.com>
mylifeyouwill [Thu, 13 Jul 2023 08:53:34 +0000 (16:53 +0800)]
Fix Condition Statement Error
Mike Schuchardt [Mon, 10 Jul 2023 15:49:22 +0000 (08:49 -0700)]
build: Update to header 1.3.257
- Update known-good
- Generate source
Pino Toscano [Sun, 2 Jul 2023 16:30:58 +0000 (18:30 +0200)]
loader: add support for GNU/Hurd
* add the Hurd to COMMON_UNIX_PLATFORMS, as it is a POSIX OS
* use the Linux paths for getting the executable path (i.e. using
/proc/self/exe): the Linux procfs provides both "self" and
"<pid>/exe"
* follow the Linux behaviour in tests w.r.t. the platform shim
behaviour, the test dummy binaries, and few more other bits
Mike Schuchardt [Fri, 30 Jun 2023 18:53:36 +0000 (11:53 -0700)]
build: Update to header 1.3.256
- Update known-good
- Generate source
Mike Schuchardt [Fri, 23 Jun 2023 17:39:22 +0000 (10:39 -0700)]
build: Update to header 1.3.255
- Update known-good
- Generate source
Charles Giessen [Fri, 23 Jun 2023 03:42:26 +0000 (21:42 -0600)]
Add test for layer_prop_list out of bounds indexing
This test makes sure that we correctly query for unknown functions implemented
only in a single layer while there are other layers present. This commit
successfully reproduces the error that the previous commit fixes. It was
difficult to reproduce because to get an crash, the test has to have the
instance_layer_list be in a different order than how they appear in
expanded_activated_layer_list.
Charles Giessen [Fri, 23 Jun 2023 03:36:39 +0000 (21:36 -0600)]
Remove indexing on layer_prop_list
The usage of the layer property list inside of
loader_check_layer_list_for_phys_dev_ext_address was modified when the
list changed from an array of struct loader_layer_properties, to an array
of pointers to struct loader_layer_properties. Except, the usages of
layer_prop_list were not updated in kind, leading to out of bounds indexes
when searching for unknown physical device functions in layers. This causes
crashes in the validation layer tests, which make use of this functionality.
Charles Giessen [Fri, 23 Jun 2023 03:46:17 +0000 (21:46 -0600)]
Cleanup test layer GIPA & GDPA function exports
Splits apart the Version 0 layer into one with 'vkGetInstanceProcAddr'
and one with 'test_layerGetInstanceProcAddr' (with a similar change for
vkGetDeviceprocAddr). This is more in line with how layers in the wild
are written.
Removes the NO_PREFIX GIPA & GDPA exports as that is not supported by
the loader.
Charles Giessen [Fri, 23 Jun 2023 03:45:05 +0000 (21:45 -0600)]
Clarify requirements for Layer Interface Version 1
The loader has never searched for `GetInstanceProcAddr` or `GetDeviceProcAddr`,
yet has documented that Layer Interface Version 1 supports layers that export
those functions.
Juan Ramos [Wed, 21 Jun 2023 18:04:34 +0000 (12:04 -0600)]
cmake: Update update_deps.py logic
Charles Giessen [Mon, 19 Jun 2023 03:47:51 +0000 (21:47 -0600)]
Refactor return value of env.add_icd()
Make it return the driver that was just added rather than the ICD that
holds the driver, allowing for more concise code. This is because most
tests which modify the driver in some fashion do it in one go, and by
using the builder pattern, can be done all in a single statement.
Charles Giessen [Mon, 19 Jun 2023 02:52:43 +0000 (20:52 -0600)]
Cleanup test creation of queues
This commit removes queue creation from many tests because they were not a
primary part of the test. Many tests are written by first copying a previous
test and modifying it, which meant that a handful of initial tests would
include queue creation logic then get copied into many other tests where it
does not make sense.
Charles Giessen [Mon, 19 Jun 2023 02:08:35 +0000 (20:08 -0600)]
Refactor how tests load function pointers
The `load()` helper function exists so that tests dont need to
manually reinterpret_cast the returned value.
Also took liberty to change the names of function pointers which
come from extensions to include the extension in the name.
EX: AcquireDrmDisplay -> AcquireDrmDisplayEXT
Charles Giessen [Mon, 19 Jun 2023 00:30:49 +0000 (18:30 -0600)]
Add EnumerateLayerDeviceExtensions helper to tests
Removes code duplication by taking EnumerateDeviceExtensions and modifying
it to accept a layer parameter.