3609 Commits

Author SHA1 Message Date
Charles Giessen
63a9f8dc4c test: Update framework_config to include paths to layer binaries 2021-08-04 09:57:16 -06:00
Charles Giessen
9d4e0bdc9a test: Add noexcept in test_environment 2021-08-04 09:57:16 -06:00
Charles Giessen
1550eeb10a test: add CreateInstance.LayerNotPresent test
Remove the corresponding test in loader_validation_tests.cpp
2021-08-04 09:57:16 -06:00
Charles Giessen
56722cb3d6 test: Implemente layer create instance/device
Added the necessary bits to make calling create instance and device function,
though it may not work in all circumstances
2021-08-04 09:57:16 -06:00
Mike Schuchardt
fa67fe730d build: Update to header 1.2.187
- Update known-good
- Generate source (no change)
2021-08-03 15:16:04 -07:00
Mark Young
e07667a99a Fix loader debug documentation
The loader debug environment variable (VK_LOADER_DEBUG) is not inclusive
of higher importance messages, it is exclusive to the types specifically
enabled.
2021-08-02 16:19:55 -06:00
Charles Giessen
3aeed853ab test: Add basic threading test
Requires adding ability for device to return functions with
vkGetDeviceProcAddr that aren't necessarily useable functions.

Also added checks to make sure that the handle passed in by the loader
to the TestICD is the 'right handle' where necessary, as some functions
do not need to know which device is being called on, just that it is correct.
2021-07-30 10:33:15 -06:00
Mike Schuchardt
99a7440204 build: Update to header 1.2.186
- Update known-good
- Generate source (no change)

Change-Id: I7c0699f8613ecbfefe79981f34faa5e276703324
2021-07-27 13:27:49 -07:00
Mike Schuchardt
a0c69f0d3a build: Update to header 1.2.185
- Update known-good
- Re-enable code generation for VK_HUAWEI_subpass_shading
- Generate source

Change-Id: I6607e1de097d1b8a2f631cd1f11b088204b8bb3a
2021-07-20 15:29:56 -06:00
Jamie Madill
9d05cd96cf build: Disable -Wimplicit-fallthrough in GN.
This flag was recently enabled by default in Chrome and ANGLE
and other projects inherit these build settings. Explicitly
dsiable this warning until it is enabled in the non-GN build.

Change-Id: I8f353f8abc3f7857481ff9cc774aff3618eaf35a
2021-07-20 11:42:47 -06:00
Charles Giessen
99c0b1433a loader: Dont return OOM on function load failure
Win7 does not support D3DKMTEnumAdapters2, as such when the loader goes to
query it, it gets NULL back. Except, instead of just erroring out, it would
return VK_ERROR_OUT_OF_HOST_MEMORY. Problem was that change
73296a04678a07fc4fb1eef50cf4fe2778f059f8
starts checking for OOM, and finding one when running in Win7. This change
alters that behavior so that it doesn't report an OOM when one hasn't occured.
2021-07-14 12:55:05 -06:00
Bob Ellison
15e1bbe99a windows: update the loader copyright date
The date, specified in loader/loader.rc, was incorrectly set to 2020.
2021-07-13 16:31:46 -06:00
Charles Giessen
7033871e47 ci: Re-add code and commit formatting verification
Change-Id: I240f912daa03d001f2dbd2527d8374bbf394ac4a
2021-07-13 10:36:25 -06:00
Mark Young
8c45e953d0 Update contact information 2021-07-13 08:12:54 -06:00
Charles Giessen
550b23a566 test: Move more old tests to new test framework
Remove them from the calling scripts where appropriate. Notably the 'get count
then run tests and pass in count' are now using the framework where that is
completely redundant.

Change-Id: I00d561a85047742a849df48818398b10c62d3b74
2021-07-12 16:23:15 -06:00
Mark Young
8daad81803 Report a warning if the number of GPUs doesn't match
We've encountered situations where a layer removes physical devices
from the list which can cause issues on some systems if it's done
incorrectly.  For now, simply throw a warning if the loader determines
that a layer has removed devices.

NOTE: In the long-run, I think we should define a policy which states
that layers can re-order devices, but not add or remove.  If a layer
wants to add, it should become an ICD.
2021-07-08 08:48:19 -06:00
Mike Schuchardt
7ae227e8a7 build: Update to header 1.2.184
- Update known-good
- Generate source

Change-Id: Ib2cfed88095541a127c23cf7418e9a66d81bd35e
2021-07-06 14:00:46 -06:00
Charles Giessen
17bc7b4c6d test: Fix TestLayer exports on windows
* `get_instance_func` needed to have __stdcall (VKAPI_ATTR) added
* Several .def files were incorrect
* vk_layer.h forward declares vkNegotiateLoaderLayerInterfaceVersion. This is
problomatic because it doesn't have __declspec(dllexport), a token added by
FRAMEWORK_EXPORT on windows. We have to special case the export macro here to
prevent that mismatched definition.
2021-07-06 10:03:29 -06:00
Charles Giessen
3adb0474e7 test: Add Enumeration Function stubs to TestLayer
Change-Id: I68b3597877fed803f4284e7e67f19ce4e3e2fe53
2021-07-06 10:03:29 -06:00
Charles Giessen
9cd092f705 test: Flesh out TestLayer to include relevant exports
Functions needed in the various layer interface versions are now
exported as well as guarded behind macros configurable from CMake.
The export_definitions folder was populated as well.

Change-Id: Iebfdd8ae02062eb81b8aa9f705885c9384c95be9
2021-07-06 10:03:29 -06:00
Charles Giessen
ba70a411f8 test: Use MACRO=1 in TestICD for definition style
This replaces instances of `#ifdef MACRO_NAME` with `#if MACRO_NAME` as now
MACRO_NAME will have a value of 0 or 1, instead of it being defined or not
defined.

Change-Id: I27a4330511a0f0d779f41851fe816fc79e868de2
2021-07-06 10:03:29 -06:00
Charles Giessen
0a8af1ba78 test: Update Framework Readme.md
Change-Id: Iaf3740b046b3f6457c337988c573a73f068ff1a3
2021-07-06 10:03:29 -06:00
Charles Giessen
77f74505d9 test: Use a new string_eq function instead of raw strcmp
Change-Id: I703763133c42eb78ae3c6e194450411e3f784e35
2021-07-06 10:03:29 -06:00
Charles Giessen
436222fdfc test: Drop fp_ from function pointer names
Change-Id: Ibd047e99f442d4a9755ac186e16b3620d3544e37
2021-07-06 10:03:29 -06:00
Charles Giessen
8074954f95 test: Remove some redundant tests in old test suite
Change-Id: Icc84b25bb092e15e054433651112e86b30726e52
2021-07-06 10:03:29 -06:00
Charles Giessen
5097a3d4e6 test: Rename regressions test cases
From RegressionTests.CreateInstanceExampleTestCase
To CreateInstance.ExampleTestCase

Change-Id: Ibd74541f93edbcaccb3daa9016dcacf8ecccfa78
2021-07-06 10:03:29 -06:00
Charles Giessen
0a1a346b0b test: Remove Allocation tests from old test suite
loader_alloc_callback_tests.cpp now contain all of the removed tests.

Change-Id: Ia99df3a8f86d40f0d5e89a62b7b0a5f9bebafb7c
2021-07-06 10:03:29 -06:00
Mike Schuchardt
b70cf11abb build: Update to header 1.2.183
- Update known-good
- Generate source (no change)

Change-Id: I059e6c2d8430228b4f20cadb83929b220efa5d0d
2021-06-30 15:37:42 -06:00
Charles Giessen
873040b7dc docs: Add info on DXGI adapters in Windows ICD Discovery 2021-06-29 18:36:52 -06:00
Bob Ellison
cb11f9b68d copyrights: updated copyrights on MIT files
During SDK testing we identified that the runtime copyrights
were out-of-date.  The loader runtime includes two separate
MIT copyrights, each attributed to a pair of source files,
one initiated by Dave Gamble and one by joseph werle.

I examined these files to discover that the last LunarG change to
three out of the four was actually in 2017, not 2016.  This
date should be attributed to Khronos, Valve, and LunarG.

By updating the copyright notice in these files, we ensure that
the license registry remains up-to-date.

Note that no real content changed (which is why the copyrights are not
being updated to 2021).
2021-06-29 17:27:16 -06:00
xantares
840f63c4f7 Loader shared lib: back to default cmake prefix
but it changed the import lib name (libvulkan.dll.a instead of libvulkan-1.dll.a) which in turns breaks cmake detection in FindVulkan
now we go back to using the default cmake prefix which is equivalent to what #595 wants, (prior to #523), but without the broken behavior

cc @Biswa96
2021-06-24 10:36:34 -06:00
Charles Giessen
e3fd8bdec3 test: Delete old temp folders when starting tests/framework/test_util
Make sure the work space is clean before starting a test, this is mainly for developer builds, as CI
runs will generally wipe the entire build tree instead.
2021-06-23 15:15:56 -06:00
Charles Giessen
6e35202976 test: Update googlestest to 1.10.0 2021-06-23 15:15:56 -06:00
Charles Giessen
008212c324 test: Add revamped allocation tests
Creates a memory tracker class and rewrites the existing allocation tests.

Change-Id: I09ca2dc5b4d83f775ae0e3fd362a3fa4f7255d27
2021-06-23 15:15:56 -06:00
Charles Giessen
f16c6ab15d ci: Enable regression tests on MacOS
Change-Id: I85b08bfd2914e03840a027240470e2596415f4dc
2021-06-22 12:03:05 -06:00
Charles Giessen
f4054d561b test: Fix framework to work on MacOS
Main issue was getting function redireciton to work, dyld-interposer accomplishes that.
It required making the shim-library a dylib, but otherwise only required minor changes.

Change-Id: I7b7e2c86cc0c0b082f58241a7e146b74af72e792
2021-06-22 12:03:05 -06:00
Mike Schuchardt
1896143df6 build: Update to header 1.2.182
- Update known-good
- Disable codegen for VK_HUAWEI_subpass_shading
  https://github.com/KhronosGroup/Vulkan-Docs/issues/1564
- Generate source

Change-Id: If59954254bdf433bd5171f2a63cad88e34069c89
2021-06-21 10:07:16 -07:00
Christophe
8a3a3cb703 Add layer manifest version 1.2.0 to history 2021-06-17 09:19:10 -06:00
Mike Schuchardt
57ba02b4e5 build: Update to header 1.2.181
- Update known-good
- Generate source (no change)

Change-Id: I7aed911c95d3faa89f7cd012ce56ccde00927943
2021-06-14 12:31:20 -06:00
Charles Giessen
73296a0467 loader: Change VkResult when no ICDs were found
ReadDataFilesInRegistry would return VK_ERROR_INITIALIZATION_FAILED in several cases
which could cause the loader to short cirtuit and return that value when no drivers were
found in the registry. This is inconsistent with the later check of the size of the list
of manifest, which if it is 0 returns VK_ERROR_INCOMPATABLE_DRIVER. This commit changes
the instances of INIT_FAILED into INCOMPATABLE_DRIVER where relevant.
2021-06-11 13:59:14 -07:00
Charles Giessen
19eec9a8f8 loader: Create AddManifestFile function 2021-06-11 13:59:14 -07:00
Charles Giessen
d409f0c7e0 loader: Replace consistency checks with asserts 2021-06-11 13:59:14 -07:00
Charles Giessen
7e2d7ba84f test: Refactor tests that use VK_ICD_FILENAMES
Change-Id: I34117fd500f7110669ae19d32ff1e1be920238a9
2021-06-07 14:07:38 -07:00
Charles Giessen
43c0621343 test: Control process elevation on Windows
Since the loader only uses environment variables if the process is
not running with elevated priviledges, the test harness needs to be
able to control that aspect to ensure consistency as CI systems may
run the tests in an 'elevated' context.

Change-Id: I8b15a1ecd4ab4960049ba198af8199943e872bba
2021-06-07 14:07:38 -07:00
Charles Giessen
61bfd930ee test: Delete files properly on windows
Move windows specific error reporting to test_util.h
This allows for its use anywhere its required.

Change-Id: I14a0da85dc0d3f4e651b99aa005469b47d98d940
2021-06-07 14:07:38 -07:00
Charles Giessen
01ddf904d5 ci: Enable building of tests 2021-06-07 14:07:38 -07:00
Charles Giessen
fcc549fcc1 test: Fix Windows x86 icd shim exports
_stdcall in Windows x86 builds would mangle names even with `export "C"`
By adding .def files, the correct name is used in the .dll and the loader will
correctly load it.

Additionally, ShimEnumAdapters2 needs _stdcall for 32 bit mode

Change-Id: Ia60a5e2a9e4378dc3e09864648e04852b10fe524
2021-06-07 14:07:38 -07:00
Charles Giessen
f7442f9679 ci: Enable regression tests in Windows CI
Change-Id: I5bb1d03f9c9a3be82f7ed0763a325996a5d8dae8
2021-06-07 14:07:38 -07:00
Mike Schuchardt
a9cac77188 build: Update to header 1.2.180
- Update known-good
- Generate source (no change)

Change-Id: I56d4483f777754c9e368ac9b0025d550070fdd83
2021-06-07 14:43:14 -06:00
Jamie Madill
9fb591feb7 GN: Support custom library name.
This allows for projects like ANGLE that build the loader to prevent
conflicts with the system.
2021-06-03 10:34:09 -06:00