Commit Graph

3790 Commits

Author SHA1 Message Date
Rutwik Choughule
3772b036e0 docs: Fix typo in MoltenVK url 2022-05-20 20:05:21 -06:00
Ludovico de Nittis
db0fb163d7 Update supported versions in the docs
Mention the supported versions that were missing.

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
2022-05-20 20:03:51 -06:00
Mike Schuchardt
ad05e878ee build: Update to header 1.3.214
- Update known-good
- Generate source
2022-05-17 08:43:02 -07:00
Mike Schuchardt
5aa2ee48c9 build: Update to header 1.3.213
- Update known-good
- Generate source
2022-05-11 10:31:02 -07:00
Charles Giessen
8dc9ab5ce8 Revert "Implement unknown function intercept in layers"
This reverts commit 0fd2ff8384.
2022-05-11 08:57:30 -06:00
Mark Young
08cad0c015 Output message if override app_keys mismatch on app name
Output a layer message if the override layer is present and the
app name is not in the app_keys list.
Fixes issue #917.
2022-05-05 16:46:41 -06:00
Mark Young
956139e991 Update layer manifest file
Some fields specific to manifest files were missing.  Also updated
file to clearly indicate where fields are valid and usable.
2022-05-04 16:04:38 -06:00
Charles Giessen
a9543c5ac3 Make portability drivers not load by default
Unless the portability enumeration extension is enabled and the create instance flags
contain VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR, do not enumerate drivers that
contain `is_portability_driver` in their JSON Manifest. This is phase 2 of the release
for the VK_KHR_portability_enumeration extension.

An error message will be printed when no drivers were reported but there was a
portability driver which was skipped over.
2022-05-04 15:40:27 -06:00
Charles Giessen
461f53cdb5 Fix CMake code for getting Git Version information
The ${CMAKE_SOURCE_DIR} uses the wrong directory when the loader is included as a
subproject. By using ${CMAKE_CURRENT_LIST_DIR}, the CMake code to find the git
commit and branch name will use the correct directory.

Additionally, the logic was ammended to curtail this issue in the future. Quotes are
included in the string to allow it to be used as a string literal, instead of
needing a const char[] variable and macros. Also, the CMake code was restructured
to always define GIT_BRANCH_NAME and GIT_TAG_INFO.
2022-05-04 14:46:53 -06:00
Charles Giessen
0fd2ff8384 Implement unknown function intercept in layers
Make it possible for layers to declare that they support unknown functions
and set up the layer dispatch table appropriately. A very niche use case
but helpful when developing validation for functions not yet out in the
public headers.
2022-05-03 17:38:09 -06:00
Charles Giessen
36a82e0de8 Correctly check for NULL in loader_get_dispatch 2022-05-03 13:39:00 -06:00
Sein Lee
191e261495 Fix typo 2022-05-02 16:29:21 -06:00
Mike Schuchardt
155ca6b868 ci: Remove fbactions/setup-winsdk
The default version 18362 started 404'ing and a new enough version is
present in the base image.
2022-04-21 10:26:19 -07:00
Mike Schuchardt
d16694d362 build: Update to header 1.3.212
- Update known-good
- Generate source
2022-04-21 10:26:19 -07:00
Charles Giessen
71bd6240af Add app_key OverrideMetaLayer tests 2022-04-14 13:18:54 -06:00
Erik Faye-Lund
f503824ff8 Update LoaderDriverInterface.md
Fix link-syntax.
2022-04-13 01:35:14 -06:00
Charles Giessen
5b84b6d09a Refactor FrameworkEnvironment API a bit
Redo some of API's for adding layers and ICD's to the test framework.
2022-04-12 13:00:32 -06:00
Charles Giessen
859fb722c2 Document VK_KHR_portability_enumeration support 2022-04-07 11:49:53 -06:00
Charles Giessen
717697987e Warn if portability_enumeration extension should be enabled
Log an error if an application creates a VkDevice from a physical device which
was enumerated from a driver that is a portability driver but the application
didn't correctly enable the portability enumeration flag & extension.
2022-04-06 18:25:09 -06:00
Charles Giessen
1de26aad69 Increase discovery timeout for Gtest test to 100 seconds 2022-04-06 16:23:51 -06:00
Charles Giessen
e7f0c75354 Revert 32bit linux unknown ext chain change
Fix breaking of builds due to the dropping of GOT addressing mode.
2022-04-06 15:43:25 -06:00
Mike Schuchardt
ae24c6e791 build: Update to header 1.3.211
- Update known-good
- Generate source
2022-04-05 10:27:27 -07:00
Charles Giessen
469aead205 Allow meta layers to have newer component layers
Relax the requirement that all component layers in a meta layer must equal the version of the meta layer.
This allows enabling layers that do not have the same API version as the meta layer.
2022-04-04 19:17:07 -06:00
Charles Giessen
a06dd5484a Clean up version checking logic
Add a few helper functions to simplify checking that a X.Y.Z version is sufficient.
2022-04-04 19:17:07 -06:00
Charles Giessen
aeec557162 Fix 32 bit linux unknown function handling
Building and running the regression tests reveals that the 32 bit unknown function
handling on linux is broken. It required the same fixes as did windows 32 bit, since
the code is almost identical.

wsi.c also would not compile in 32 bit linux due to the warnings-as-errors being enabled,
which has also been fixed.
2022-04-04 19:14:44 -06:00
Charles Giessen
d24a1045fd Fix missed Physical Devices in Windows
The previous logic would cause any non-sorted physical devices to be missed
when aggregating the final list. This caused crashes due to the phys_dev
value not being initialized. The fix is to make sure both sorted and non
sorted physical devices are included in the final output of
setup_loader_term_phys_devs().
2022-04-04 16:38:17 -06:00
Charles Giessen
d921b818b3 Use correct TestICD in tests
Many tests were using the V6 TestICD, which means that it exports the
EnumerateAdapterPhysicalDevices. The loader then only looks for devices
using that functionality and if the test didn't set it up, the driver
won't have its devices found.

Also:
* Cleaned up handle_validation_tests
* Added WSI setup helpers, which put all the setup code for WSI in one place
* Created a to/from_nondispatch_handle function for TestICD, probably should
be in a more general location
2022-04-04 16:38:17 -06:00
Charles Giessen
c70d9c29a8 Add test for different ICD interface versions
Fix Test Framework not skipping Drivers which have a different LUID.
2022-04-04 16:38:17 -06:00
Mike Schuchardt
7f84b1c2fa build: Update to header 1.3.210
- Update known-good
- Generate source
2022-04-01 10:55:08 -07:00
Charles Giessen
f8c97eea2f Dont emit warnings on unknown manifest file versions
Since the loader is meant to be forward compatible, it makes little sense to emit
a warning when an ICD or Layer manifest is found with a version that it doesn't
understand. Thus they now are INFO level.
2022-03-31 11:54:03 -06:00
Biswapriyo Nath
a59027c96d cmake: Add ENABLE_WERROR option
This adds a choice for the user whether to treat warnings as errors.
The remaining compiler options are moved where it was before.
2022-03-30 12:06:40 -06:00
unknown
ca66d5aa8b Fixup several small issues found by Visual Studio
The VS Analyzer went through the codebase and pointed out a dozen warnings and
one possible crash.
2022-03-30 10:06:23 -06:00
Charles Giessen
336508b06b Enable /W4 errors and support clang-cl
Enable /W4 errors on MSVC and fix all corresponding errors.

Refactor the CMakeLists.txt to allow for compiling with clang-cl. This required
figuring out that -Wall -Wextra mangle the set of warnings used. The solution
is to use /W4 instead when compiling with clang-cl on Windows.
2022-03-29 16:10:30 -06:00
Charles Giessen
edc995aef7 Replace TEST_F with TEST in most tests
Test fixturing (TEST_F) is useful when there is a lot of common code that needs
to be run for a suite of tests. However, the FrameworkEnvironment encapsulates
almost all of the setup work all tests needs, and so doesn't need to be in a
fixture. Making the add_icd call inside the tests makes it clear which binary
is being used.

This commit also uses the corrent signed/unsigned constants in tests, as was
warned by compilers when enhanced warnings were enabled (/W4 in msvc).
2022-03-29 16:10:30 -06:00
Mark Young
5edd2f06d4
Update issue templates
Expand Bug report and add Feature Request template.
2022-03-28 20:32:25 -06:00
Mark Young
30f623fd9f
Add Bug Reporting Template
Add initial bug reporting template with requested fields.
2022-03-28 20:23:07 -06:00
Mark Young
b383c5131e Apply code review comments from @charles-lunarg 2022-03-25 15:29:40 -06:00
Mark Young
d72909ee28 Fix #888 crash in Lutris with Linux sorting
The sorting algorithm needed to take into account both the application
API version as well as the driver API version.

This required additional changes to the sorting algorithm for the fallback
since even if the instance supports the extension or Vulkan 1.1, the individual
drivers may not.

Also, add supporting tests which would catch these cases in the future.
In the process, I realized we assumed that the presence of an extension in the
test_icd indicated "enablement" which was incorrect.  So I separated out
that into a set of "enabled instance extensions"
2022-03-25 15:29:40 -06:00
Charles Giessen
8354f108f5 Remove LDP_DRIVER_6
The cause for this policy was due to dynamic linker behavior which could have
resulted in the wrong symbols being used. However, this didn't occur in
practical usage of the dynamic linker. Also drivers exporting Vulkan
entrypoints was a useful behavior to enable testing and more flexible usage
that this policy actively interfered with.
2022-03-25 11:52:46 -06:00
Charles Giessen
ea503f36e6 Fixup windows test infrastructure
Cleaned up several bugs in the testing framework in the windows shim.
Rewrote the tests that exercise DXGI/D3DKMT functionality.
2022-03-24 19:00:28 -06:00
Mark Young
2d1860d238 Fix non-sorted surface indexing
The physical device terminator was missing the ICD index in the
non-sorted path.  This caused crashes in Angle before it was realized
that the sorting code was unintentionally disabled in that build
path.

Also, add tests to catch this case in the future in the WSI code, but
this required converting all the TEST_F tests to TEST since Gtest
didn't like mixing the 2 on my system.

Finally, fix a few WSI error messages in the loader which were
missing spaces.

Fixes #863 for non-sorting paths
2022-03-24 15:22:04 -06:00
Peng Huang
0d76dd23b7 Update BUILD.gn
Add  LOADER_ENABLE_LINUX_SORT to workaround ANGLE crashes on Linux
2022-03-24 10:13:04 -06:00
Mike Schuchardt
c03954e124 build: Update to header 1.3.209
- Update known-good
- Generate source
2022-03-23 11:28:44 -06:00
Charles Giessen
2f89241d4d Log when core GetToolingProperties is NULL.
The core entrypoint for vkGetPhysicalDeviceToolingProperties didn't log if the function in the
terminator was NULL. This makes it easier for implementations to know when they aren't
exporting the symbol.
2022-03-21 14:05:38 -06:00
Mark Young
d24fa72f14 More clean up to make sure we have enough space 2022-03-21 14:04:39 -06:00
Mark Young
010b23a1ae Modify logging text output
Modify text output for logs so that we only flag types of messages
we're interested in and also try to add spacing so items line up
cleaner.
2022-03-21 14:04:39 -06:00
Mark Young
d3ae7ffe1c Add device log info on vkCreateDevice
To make things clearer on output, log the device information for
the physical device being used on vkCreateDevice if either the
layer or the driver log bits are set.
2022-03-21 14:04:39 -06:00
Mike Schuchardt
ab207b0829 build: Update to header 1.3.208
- Update known-good
- Generate source
2022-03-15 12:06:40 -07:00
Charles Giessen
6b3cb3705f Tests close layer handles when necessary
The fs::FolderManager can't close objects that are in use, thus if the tests
keep open a binary then the destructor will fail to delete the file. This
commit manually cleans out the FrameworkEnvironment's loaded layers to prevent
this from happening.
2022-03-14 23:31:26 -06:00
Charles Giessen
38e9dc8faf Test framework now shims registry functions
Previously the way the test framework worked was to fake the registry using a
special windows API call. However this led to brittle tests and was incompatible
with googletest's death test capabilities.

These death tests highlighted that the current set of them didn't use the built in
matcher to verify a correct crash/abort. This commit also amends all uses of
ASSERT_DEATH to provide the relevant death message.

If a driver reports an interface version greater than 0 but doesn't export
vk_icdGetInstanceProcAddr, the loader will now skip the driver.
2022-03-14 23:31:26 -06:00