Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / vulkan / vulkan-loader
Commits: f4054d56 by Charles Giessen at 2021-06-22T12:03:05-06:00 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 - - - - - f16c6ab1 by Charles Giessen at 2021-06-22T12:03:05-06:00 ci: Enable regression tests on MacOS Change-Id: I85b08bfd2914e03840a027240470e2596415f4dc - - - - - 008212c3 by Charles Giessen at 2021-06-23T15:15:56-06:00 test: Add revamped allocation tests Creates a memory tracker class and rewrites the existing allocation tests. Change-Id: I09ca2dc5b4d83f775ae0e3fd362a3fa4f7255d27 - - - - - 6e352029 by Charles Giessen at 2021-06-23T15:15:56-06:00 test: Update googlestest to 1.10.0 - - - - - e3fd8bde by Charles Giessen at 2021-06-23T15:15:56-06:00 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. - - - - - 840f63c4 by xantares at 2021-06-24T10:36:34-06:00 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 - - - - - cb11f9b6 by Bob Ellison at 2021-06-29T17:27:16-06:00 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). - - - - - 873040b7 by Charles Giessen at 2021-06-29T18:36:52-06:00 docs: Add info on DXGI adapters in Windows ICD Discovery - - - - - b70cf11a by Mike Schuchardt at 2021-06-30T15:37:42-06:00 build: Update to header 1.2.183 - Update known-good - Generate source (no change) Change-Id: I059e6c2d8430228b4f20cadb83929b220efa5d0d - - - - - 0a1a346b by Charles Giessen at 2021-07-06T10:03:29-06:00 test: Remove Allocation tests from old test suite loader_alloc_callback_tests.cpp now contain all of the removed tests. Change-Id: Ia99df3a8f86d40f0d5e89a62b7b0a5f9bebafb7c - - - - - 5097a3d4 by Charles Giessen at 2021-07-06T10:03:29-06:00 test: Rename regressions test cases >From RegressionTests.CreateInstanceExampleTestCase To CreateInstance.ExampleTestCase Change-Id: Ibd74541f93edbcaccb3daa9016dcacf8ecccfa78 - - - - - 8074954f by Charles Giessen at 2021-07-06T10:03:29-06:00 test: Remove some redundant tests in old test suite Change-Id: Icc84b25bb092e15e054433651112e86b30726e52 - - - - - 436222fd by Charles Giessen at 2021-07-06T10:03:29-06:00 test: Drop fp_ from function pointer names Change-Id: Ibd047e99f442d4a9755ac186e16b3620d3544e37 - - - - - 77f74505 by Charles Giessen at 2021-07-06T10:03:29-06:00 test: Use a new `string_eq` function instead of raw strcmp Change-Id: I703763133c42eb78ae3c6e194450411e3f784e35 - - - - - 0a8af1ba by Charles Giessen at 2021-07-06T10:03:29-06:00 test: Update Framework Readme.md Change-Id: Iaf3740b046b3f6457c337988c573a73f068ff1a3 - - - - - ba70a411 by Charles Giessen at 2021-07-06T10:03:29-06:00 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 - - - - - 9cd092f7 by Charles Giessen at 2021-07-06T10:03:29-06:00 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 - - - - - 3adb0474 by Charles Giessen at 2021-07-06T10:03:29-06:00 test: Add Enumeration Function stubs to TestLayer Change-Id: I68b3597877fed803f4284e7e67f19ce4e3e2fe53 - - - - - 17bc7b4c by Charles Giessen at 2021-07-06T10:03:29-06:00 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. - - - - - 7ae227e8 by Mike Schuchardt at 2021-07-06T14:00:46-06:00 build: Update to header 1.2.184 - Update known-good - Generate source Change-Id: Ib2cfed88095541a127c23cf7418e9a66d81bd35e - - - - - 8daad818 by Mark Young at 2021-07-08T08:48:19-06:00 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. - - - - - 550b23a5 by Charles Giessen at 2021-07-12T16:23:15-06:00 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 - - - - - 8c45e953 by Mark Young at 2021-07-13T08:12:54-06:00 Update contact information - - - - - 7033871e by Charles Giessen at 2021-07-13T10:36:25-06:00 ci: Re-add code and commit formatting verification Change-Id: I240f912daa03d001f2dbd2527d8374bbf394ac4a - - - - - 15e1bbe9 by Bob Ellison at 2021-07-13T16:31:46-06:00 windows: update the loader copyright date The date, specified in loader/loader.rc, was incorrectly set to 2020. - - - - - 99c0b143 by Charles Giessen at 2021-07-14T12:55:05-06:00 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. - - - - - 9d05cd96 by Jamie Madill at 2021-07-20T11:42:47-06:00 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 - - - - - a0c69f0d by Mike Schuchardt at 2021-07-20T15:29:56-06:00 build: Update to header 1.2.185 - Update known-good - Re-enable code generation for VK_HUAWEI_subpass_shading - Generate source Change-Id: I6607e1de097d1b8a2f631cd1f11b088204b8bb3a - - - - - 99a74402 by Mike Schuchardt at 2021-07-27T13:27:49-07:00 build: Update to header 1.2.186 - Update known-good - Generate source (no change) Change-Id: I7c0699f8613ecbfefe79981f34faa5e276703324 - - - - - 3aeed853 by Charles Giessen at 2021-07-30T10:33:15-06:00 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. - - - - - e07667a9 by Mark Young at 2021-08-02T16:19:55-06:00 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. - - - - - fa67fe73 by Mike Schuchardt at 2021-08-03T15:16:04-07:00 build: Update to header 1.2.187 - Update known-good - Generate source (no change) - - - - - 56722cb3 by Charles Giessen at 2021-08-04T09:57:16-06:00 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 - - - - - 1550eeb1 by Charles Giessen at 2021-08-04T09:57:16-06:00 test: add CreateInstance.LayerNotPresent test Remove the corresponding test in loader_validation_tests.cpp - - - - - 9d4e0bdc by Charles Giessen at 2021-08-04T09:57:16-06:00 test: Add noexcept in test_environment - - - - - 63a9f8dc by Charles Giessen at 2021-08-04T09:57:16-06:00 test: Update framework_config to include paths to layer binaries - - - - - 3d635ace by Charles Giessen at 2021-08-04T09:57:16-06:00 test: Add CreateInstance.LayerPresent test - - - - - ab977626 by Charles Giessen at 2021-08-04T09:57:16-06:00 test: Make all tests call vkDestroyInstance This caused spurious failures in other tests due to the dynamic library not being closed. - - - - - 78c3e744 by Charles Giessen at 2021-08-04T09:57:16-06:00 test: Update tests/README.md Include note to always destroy the instance at the end of a test. - - - - - f7aab801 by Charles Giessen at 2021-08-04T09:57:16-06:00 test: Clear TestICDs before each test Calling `dlclose` doesn't necessarily mean that the static variables will be reset nor the libraries destructor gets called. This caused cascading errors in tests on linux with GCC. By always manually resetting the ICD or Layer before each test, we prevent any funny business from occuring. - - - - - 4c901a73 by Samiullah Khawaja at 2021-08-04T14:09:17-06:00 Deallocate the extension lists when deleting an item from layer list Vulkan Loader loads the meta layer list and filters the ones that are not valid. During filter it deallocates the attributes of the loaded meta layer but does not deallocate the associated extension list. - - - - - 6259c575 by Charles Giessen at 2021-08-06T16:00:06-06:00 test: Add simple invalid-meta layer test Creates a meta layer whose component layers do not exist - - - - - 363f736a by Charles Giessen at 2021-08-06T16:00:06-06:00 test: Make invalid meta layer test more comprehensive This required fixing a few bugsin the Manifest file printing logic - - - - - 1f522f55 by Charles Giessen at 2021-08-06T16:00:06-06:00 test: Make MetaLayer test add extensions Needed to fixup more of the manifest writer in the process - - - - - a2edd936 by Charles Giessen at 2021-08-06T16:00:06-06:00 test: Prevent macro collision - - - - - 9e438397 by Mark Young at 2021-08-10T12:10:47-06:00 Fix loader_log messages to use LOADER_ log levels The loader_log messages were using the DEBUG_REPORT log levels which just happened to coincide with the existing LOADER_ log levels. Going forward, to add layer logging in its own level, this would not have worked. - - - - - 1941128d by Mark Young at 2021-08-10T12:10:47-06:00 Add layer and implementation-specific logging Add logging that will allow end-users to specifically just look at messages for layers and implementations/ICDs. Setting VK_LOADER_DEBUG to include one of the following: - layer : enables layer-specific logging - implem : enables implementation/ICD-specific logging - - - - - b0841ad1 by Mark Young at 2021-08-10T12:10:47-06:00 Allow "icd" as well as "implem" for VK_LOADER_DEBUG - - - - - 1d30345f by Mike Schuchardt at 2021-08-10T12:40:45-07:00 scripts: Use altlen instead of parsing latexmath KhronosGroup/Vulkan-ValidationLayers switched to this method a while ago and this syncs the KhronosGroup/Vulkan-Loader version of helper_file_generator.py to match. - - - - - fbb56aac by Mike Schuchardt at 2021-08-10T12:40:45-07:00 build: Update to header 1.2.188 - Update known-good - Generate source (no change) - - - - - baf0ffd7 by Mark Young at 2021-08-11T10:20:01-06:00 Fix environment test failure. It was looking for a specific output for the manifest file search string. Re-add that string for now. - - - - - 773f1d20 by Charles Giessen at 2021-08-11T15:16:33-06:00 test: Revamp which linux paths are redirected Adds FALLBACK_DATA_DIRS, FALLBACK_CONFIG_DIRS, SYSCONFDIR, and EXTRASYSCONFDIR to the list of redirected paths. They were previously 'covered' by manual entries. This commit makes them responsive to changes in the build system. This commit also makes sure that the path used for redirection is one searched by the loader by using the SYSCONFIG variable. Previously it would use /usr/local/etc/ which was only correct on systems where CMAKE_INSTALL_PREFIX was set to /usr/local. - - - - - 52859e76 by Charles Giessen at 2021-08-11T15:16:56-06:00 loader: Reformated loader source code Previously, clang-format was required for all new commits but the codebase itself wasn't conformant. This commit formats the source files in the loader folder. - - - - - de99f8f6 by Charles Giessen at 2021-08-11T15:17:20-06:00 loader: Make use of a generated header version This changes the loader to always set the version to the one which was used when generating the source files that are checked into the repo, instead of using the version gotten from the Vulkan-Headers find cmake file. Change-Id: Id0955ddfd10e35e0f358f5a77799d8baa4992b04 - - - - - 85765687 by Charles Giessen at 2021-08-16T11:38:17-06:00 test: Add ELF test binaries for 32 and 64 bit These binaries are necessary for testing whether the loader correctly ignores binaries of the wrong architecture. Since they are data files more than executables, they are being checked in. Currently only Unix binaries are added but in the future windows along with any other platform binaries will be added. - - - - - 64665f7d by Charles Giessen at 2021-08-16T11:38:17-06:00 test: Add linux x64 and x86 for wrong binaries Test only looks for ICD binaries. - - - - - f06143bf by Charles Giessen at 2021-08-16T11:38:17-06:00 test: Add windows 32/64 bit binary tests Added both layer and ICD tests. Included lengthy description of why the test successfully creates an instance even though it really shouldn't. - - - - - f1accaba by Charles Giessen at 2021-08-16T11:38:17-06:00 test: Simplify wrong arch tests by adding a macro Added the `CURRENT_PLATFORM_DUMMY_BINARY` macro which thanks to platform defines contains the path of the binary which is 'wrong' for the current architecture. EX: compiling with Win64, it points to the Win32 binary, and vice versa when compiling for Win32. Same logic applies for linux 64/32 bit. - - - - - 024535bd by WenqingLiAMD at 2021-08-16T11:42:09-06:00 Fix Vulkan CTS testcase bug: "create_instance_device_intentional_alloc_fail" In function loader_scanned_icd_add, if open_library fails, VK_SUCCESS is still returned, which would cause the bad number of good ICDs. - - - - - de37ef3a by Charles Giessen at 2021-08-16T13:40:34-06:00 loader: Fix accidental error propagation When a dll/so of the wrong architecture is found, the loader would return ERROR_INCOMPATIBLE_DRIVER from `loader_scanned_icd_add`. Previously it would return VK_SUCCESS, but that caused the logic to not skip over the ICD. This commit fixes the issue where the error code would be propagated out of the function, which shouldn't happen since there may be other drivers which do successfully load. - - - - - 55e60732 by Charles Giessen at 2021-08-16T15:18:43-06:00 test: Add test for PR #639 This test tries to recreate an out of memory condition which causes a binary of the wrong type to be confused with a valid binary, which causes VK_ERROR_INCOMPATIBLE_DRIVER to be returned instead of VK_SUCCESS (Or OOM if the case may be) - - - - - 413673b2 by Charles Giessen at 2021-08-16T15:18:43-06:00 test: Use proper allocation count in tests The test used to only keep track of the maximum number of allocations and fail if it was exceeded, as calling free would decrease this number. Now tests use the total number of times allocate was called, and realloc was added to this metric. This should offer better OOM coverage due to failing at each and every possible OOM place. The code does make sure not to increase the count if realloc was called to 'downsize' the allocation, which shouldn't cause OOM to occur ever. - - - - - b926e416 by Charles Giessen at 2021-08-16T18:06:03-06:00 test: Update Device Layers Match test Move the old EnumerateDeviceLayers.LayersMatch to the new framework, implementing the necessary components in the TestLayer code path. - - - - - 8a3a1676 by Charles Giessen at 2021-08-16T18:06:03-06:00 test: Set VK_LAYER_PATH properly - - - - - 90fd66f6 by Mike Schuchardt at 2021-08-17T12:55:15-07:00 build: Update to header 1.2.189 - Update known-good - Generate source - - - - - 56612520 by Charles Giessen at 2021-08-26T10:51:15-06:00 loader: Downgrade wrong arch errors on windows On linux, when the loader fails to load a .so if it was due to being on the wrong architecture, the loader downgraded the error to INFO level. This commit does the same thing for windows. Error code 193 is winapi's way to signify that the dll failed to load cause of the architecture. - - - - - 669c41d6 by Charles Giessen at 2021-08-26T10:51:15-06:00 test: Add DebugUtilsWrapper This wrapper allows easy reading of the log output through the debug utils messenger infrastructure. Since getting the stdout/stderr is not well supported by googletest, this allows tests to be written which check for specific log messages to be emitted, allowing another way to verify the loader is behaving as expected. - - - - - d7c8139c by Charles Giessen at 2021-08-26T10:51:15-06:00 test: Update 32/64 tests to check the log Use the DebugUtilsLogger to verify that the loader is downgrading the error level of dll/so's from ERROR to INFO - - - - - 39dd126e by Charles Giessen at 2021-08-26T11:38:55-06:00 build: Silence MSVC warning of replacing /GR - - - - - 30 changed files: - .gitattributes - .github/workflows/build.yml - BUILD.gn - BUILD.md - CMakeLists.txt - GOVERNANCE.md - README.md - loader/CMakeLists.txt - loader/LoaderAndLayerInterface.md - loader/adapters.h - loader/asm_offset.c - loader/cJSON.c - loader/cJSON.h - loader/debug_utils.c - loader/extension_manual.c - loader/extension_manual.h - + loader/generated/loader_generated_header_version.cmake - loader/generated/vk_dispatch_table_helper.h - loader/generated/vk_layer_dispatch_table.h - loader/generated/vk_loader_extensions.c - loader/loader.c - loader/loader.h - loader/loader.rc - loader/murmurhash.c - loader/trampoline.c - loader/unknown_ext_chain.c - loader/unknown_ext_chain_masm.asm - loader/vk_loader_layer.h - loader/vk_loader_platform.h - loader/wsi.c The diff was not included because it is too large. View it on GitLab: https://salsa.debian.org/xorg-team/vulkan/vulkan-loader/-/compare/1896143df69d439b0933c1bb485f5a4587bdf2dc...39dd126e16c7a1c7135265aae9ac67ae9e110db0 -- View it on GitLab: https://salsa.debian.org/xorg-team/vulkan/vulkan-loader/-/compare/1896143df69d439b0933c1bb485f5a4587bdf2dc...39dd126e16c7a1c7135265aae9ac67ae9e110db0 You're receiving this email because of your account on salsa.debian.org.

