Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / vulkan / vulkan-loader
Commits: 4e55fdb4 by Mike Schuchardt at 2021-08-30T09:17:43-07:00 build: Update to header 1.2.190 - Update known-good - Generate source - - - - - d6a5a7ae by Charles Giessen at 2021-08-30T13:10:33-06:00 scripts: Remove loader_icd_init_entries duplicate Seems to be a copy-paste error that makes the function declaration appear twice. - - - - - b97855a8 by Charles Giessen at 2021-08-31T15:04:40-06:00 test: Add TestICD DeviceGroup support Add support for tests which use device groups by adding a new structure that holds pointes to PhysicalDevice structs and implementing the necessary vulkan API calls. This commit also: - Formats test_icd.cpp - Makes vk_icdGetPhysicalDeviceProcAddr return stuff by refactoring the instance procaddr functions - - - - - 9b66d3ef by Charles Giessen at 2021-08-31T15:04:40-06:00 test: Move DeviceGroup tests to regression suite - - - - - 140738f8 by Charles Giessen at 2021-08-31T15:04:40-06:00 test: Add handle_assert helper functions Added functions which check handle values using GTEST. Includes: checking for null, not null, equality of two handles, and variants that operate on vectors and arrays. - - - - - 4c8bf4cc by Mark Young at 2021-09-02T07:51:43-06:00 Update XDG paths Issue #245 was created because we were not properly using the XDG paths. This change updates the path search order to be more correct. While an argument could be made that the loader really should only be looking in the DATA folders, we already are looking in the CONFIG folders. Therefore, just correct the order and also make sure the proper _HOME variable for CONFIG and DATA is searched first (but only in non-superuser mode). - - - - - ee4d7bb1 by Mark Young at 2021-09-02T14:31:28-06:00 Fix loader not knowing about extensions enabled in layers This change allows the loader to know extensions enabled in the layers as well as extensions enabled but handled by layers. This should fix several issues where the enabled extensions is not known soon enough for layers to use. - - - - - 20cf221e by Charles Giessen at 2021-09-03T11:11:25-06:00 loader: Make all loader functions use snake_case Before it was a mix of camelCase, PascalCase, and snake_case. "Vulkan" functions, like terminator_GetPhysicalDeviceProperties, remain in camelCase. This way it looks visually similar with the actual vulkan functions they correspond to. - - - - - 37100015 by Charles Giessen at 2021-09-06T18:19:14-06:00 test: Improved Test Wrapper interface Made InstanceWrapper and DeviceWrapper simpler to use by moving them to test_environment then making the Create() member functions and doing the gtest assertions in the function itself. Additionally: Removed the `detail` namespace in the test_environment. Renamed get_new_test_icd/layer to just `reset_icd/layer`. This is clearer about what it is doing and makes the interface more expressive with code such as `env->reset_icd().SetMinInterfaceVersion(5);` - - - - - 7d7cdaa1 by Mike Schuchardt at 2021-09-08T15:22:33-07:00 build: Update to header 1.2.191 - Update known-good - Generate source - - - - - d81a521e by Charles Giessen at 2021-09-09T11:14:49-06:00 loader: Move layer cleanup to a single function Previously the logic to free all the components of loader_layer_properties was spread across a half dozen different places, resulting in leaks. This commit moves the logic into a single location, centralizing the process and making it easier to add new fields to the loader_layer_properties struct. - - - - - 9b11eca7 by Charles Giessen at 2021-09-09T11:14:49-06:00 test: Fix extra } in layer manifest printer - - - - - 3547086a by Charles Giessen at 2021-09-09T11:14:49-06:00 test: Add test for Override Meta Layer - - - - - f30584de by Charles Giessen at 2021-09-09T11:28:56-06:00 build: Alphabetize loader source file list - - - - - e4e0b936 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Update Copyright - - - - - 17624a2d by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Use #pragma once everywhere The #pragma once include guard is sufficiently widespread enough to allow usage of it everywhere. - - - - - 7d46bb6d by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Update Copyright for 2021 - - - - - f6760604 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Move loader struct defs into common file This commit separates the structure definitions from the function declarations. The reason to do this is to allow splitting of loader.h/.c functionality into individual headers, which may require access to these structs but don't need to know about the other functions. - - - - - 370b46d9 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Add gpa_helper.c Make gpa_helper.h not contain function definitions, moving them into the appropriate header file. - - - - - 359cd87f by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Dont use TLS in dirent_on_windows Loader will now pass in the instance handle directly rather than rely on TLS to pass it. This makes the loader code simpler to reason about and better since if a second instance is created on the same thread the TLS wont be overwritten. - - - - - 995e78dc by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: cJSON to use regular heap instead of TLS Refactored the cJSON library to take an loader_instance pointer everywhere it allocates memory. This way a TLS loader_instance pointer doesn't need to be set at initialization and then at vkCreateInstance. - - - - - 903a17df by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Remove TLS The only purpose TLS was serving was as a channel for allocation callbacks to be useable inside cJSON and dirent_on_windows. TLS didn't solve any specific threading problem. Instead it served as an information channel. On top of that, the only time when the TLS was used was inside vkCreateInstance as the pre-instance calls would have the TLS pointer to loader_instance be set to NULL. - - - - - 353e1394 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Move allocation functions to a header Functions pertainting to allocation (malloc, realloc, free) have been moved to their own translation unit for better organizational purposes. - - - - - 055d1dd4 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Dont include C++ libraries in C++ mode - - - - - 439b453d by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Shift around vk_loader_platform headers Moved the includes into their own block, instead of living in the block for each operating system. This way is easier to see what includes are in the file in its entirety. Also, _GNU_SOURCE was uncommented since it appears in each source file individually and is needed for alloca and secure_getenv - - - - - 6622bcda by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Remove unneeded parts of loader_common.h - - - - - 1b870bdc by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Make vk_loader_layer.h a proper header Makes it possible to include this file without worry of not having the required headers already included. - - - - - f07c3aee by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Remove duplicate macro defines - - - - - e13e2f51 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Move alloca into allocation.h - - - - - 0530f8cb by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Make _GNU_SOURCE a cmake definition Moves the many instances of #define _GNU_SOURCE into a single cmake call which sets the macro in all translation units for the vulkan library. This way it cannot be forgotten and makes behavior across the library consistent. - - - - - 8138a8d8 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Make logging and getenv their own headers This commit pulls the logging capabilities into a single log.h/.c file and does the same for the getenv functionality. - - - - - de30d282 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Remove headers from cmake source list Headers do not do any functional thing here. Better to remove them so they dont clutter up or make people thing they need to be there. - - - - - 4799c294 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Header include cleanup Separated headers into common groups, with system headers being first, then Vulkan API headers, followed by loader headers. Then alphabetized headers in each group. Due to moving _GNU_SOURCE to being set by cmake, there isn't any implicit dependency between the include order used. Made sure headers should be able to be included independently, such as including the vulkan headers where appropriate. - - - - - 4da6200c by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Move init functions closer together - - - - - 8cb5f492 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Move struct declarations into header - - - - - 6bc20751 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Move Windows logic to dedicated file Relocated most windows specific functionality into loader_windows.h/.c This removes the need for loader.c to include windows specific header files. - - - - - 62957141 by Charles Giessen at 2021-09-09T11:28:56-06:00 gn: Fix gn build for refactor changes - - - - - 5cd8dae5 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Rename SetupLoaderTermPhysDevGroups Forgot this name when renaming all the functions. - - - - - 310ba146 by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Move simple terminators to terminator.c Keeps the complex terminators in loader.c for the time being. - - - - - 0f897d9f by Charles Giessen at 2021-09-09T11:28:56-06:00 loader: Make trampolineGetProcAddr snake_case - - - - - 782cbe6f by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Handle OOM in loader_phys_dev_ext_gpa Removing some dead code revealed a case where a potencial OOM situation was not being handled. Change-Id: Ibc5ad607f6adc0f590f663ab928c1abca6732d96 - - - - - 4ecb4210 by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Fix potential memory leak Also remove a redundant setting of an int to 0 Change-Id: Ia099ad75e9da14aacf9874d75267716c12794305 - - - - - ed07c59c by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Use abort to force a crash where needed Many places in the loader need to intentionally crash. This commit makes the loader use `abort();` in those places, including replacing numerous `assert(false)` statements. Using abort clearly signals intent instead of having it do a null pointer dereference to cause the crash. Change-Id: I6874eab5702c94af59b7984fab00f6eaf03f2f45 - - - - - 163ef9dc by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Format WSI error messages Change-Id: I3040be426a8e70ca41e7beede1fae6b52e1381af - - - - - bff4830f by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: assert if trying to malloc 0 bytes The behavior of malloc is undefined if size is 0. This commit checks for that and prevents a possible malloc of zero in device extension property enumeration by only malloc'ing if size is greater than 0. Change-Id: Id506ab93d404bd4895503c660ef74bcb9c4550a3 - - - - - 7cf713bd by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Remove redundant stores `layer_node = layer_node->next;` is redundant in error paths that goto out. Change-Id: I889b03c825f896f458a1ed3171b951d64d8827d7 - - - - - 692345c7 by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Get DeviceGroups early exits if 0 are found This commit prevents undefined behavior by exiting `setupLoaderTermPhysDevGroups` if total_count is 0. Change-Id: Ieef2747724f79ec26a08a74884904bc0e0485c17 - - - - - 9d080205 by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Prevent stack_alloc of 0 `loader_create_device_chain` would previously attempt to use stack allocations when `expanded_activated_layer_list.count` was zero, which is undefined behavior Change-Id: I56fab835a1728914191f1a7adc210dae58afa155 - - - - - 81537271 by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Remove dead store of total_count `loaderScanForLayers` total_count is not used after determining if it is not zero. Change-Id: I2ff3a1a5d7dde42ce5ad7d57aab63831ccf58156 - - - - - 1b5f8c0a by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Don't pass null pointer into strcmp strcmp wasn't correctly guarded against a null first parameter when doing the shallow search in loader_name_in_dev_ext_table and loader_name_in_phys_dev_ext_table. Change-Id: Ia751e9860334895930210defa2dcb2becbfd6daa - - - - - f5557ab7 by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Prevent use-after-free in error path. When `setup_loader_term_phys_devs` and `setup_loader_term_phys_dev_groups` hit an error, they attempt to delete all the alocated elements in `new_phys_devs`. However, the code first may copy elements from another array into it first before hitting the error. This causes the deletion code to free those 'good' elements which were copied, leading to use-after-free's. Additionally, an error message used total_gpu_count instead of total_icd_count, this is fixed with this commit. Change-Id: I8f714f699ff09cc99d094cf2ed8190cedcad684b - - - - - 841d3740 by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Remove deadstore when breaking from a loop Change-Id: Ic72cf396cad918ce255b331fa9a9c3a652b8764d - - - - - 07a8264a by Charles Giessen at 2021-09-09T12:15:49-06:00 loader: Fix freeing of uninitialized list The memset of icd_tramp_list in terminator_EnumerateInstanceExtensionPropeties was inside an else-branch. If an error occured in the preceding if branch, this would cause the cleanup code to run on a non-zerod out icd_tramp_list. Change-Id: I7af1da31580f01c54c4ffababbb9c7ecfa8966d8 - - - - - f9d94bff by Charles Giessen at 2021-09-09T12:15:49-06:00 test: Add test for memory leak in setup_tramp_phys_devs Tries to trick the loader by increasing the number of physical devices after the call to vkEnumeratePhysicalDevices to get the count. - - - - - 6b28636a by Charles Giessen at 2021-09-09T13:46:18-06:00 build: Use generated source everywhere The previous commit that added a generated header version didn't apply it to mac or linux specific versioning. This commit fixes that. - - - - - 4c723516 by Charles Giessen at 2021-09-09T13:53:46-06:00 loader: Move disable_environment into function body The function `loader_read_layer_json` does not modify the disable_environment parameter that is passed in. It can safely be made a variable local to the function. Change-Id: I25ef3f3e5f008082dc9514be8f607d2acbf212a1 - - - - - 5e77efae by Charles Giessen at 2021-09-09T14:31:22-06:00 loader: Reverst asserting on size 0 in malloc - - - - - f7c1fe1b by Mark Young at 2021-09-10T13:57:32-06:00 Update more logging info for the Loader Output more information to the "info" debug target when the loader loads so we can determine more info about: - Where loader was loaded from (Windows) - What Git Branch was used to build it - What Git tags were most recent when it was built. Also, add more detailed logging of implicit layers: - Log manifest file location - Layer library location - Type of layer (implicit/explicit) - Disable enum if layer is implicit - - - - - 087148ac by Charles Giessen at 2021-09-10T13:59:45-06:00 test: Add callback to layers create instance and device This allows some code to be written inside the test which then gets run during the call to vkCreateInstance and vkCreateDevice. - - - - - 813fc548 by Charles Giessen at 2021-09-10T13:59:45-06:00 test: Add ICD Interface V6 TestICD binary - - - - - 2ca9c3a9 by Charles Giessen at 2021-09-10T13:59:45-06:00 test: Add test which calls GetPDProps inside CreateInstance This test makes sure that any layer calling GetPDProps inside of CreateInstance succeeds and doesn't crash. - - - - - e1dc2228 by Charles Giessen at 2021-09-10T14:25:29-06:00 loader: Move struct decls to loader_common.h Not all structs declarations in loader.h were moved to loader_common.h. This caused compilation errors due to not having the struct declaration available in the headers it was needed. - - - - - 244d0300 by Charles Giessen at 2021-09-11T10:38:56-06:00 test: Fix 32 bit test suite build error - - - - - 4c84b822 by Jamie Madill at 2021-09-13T09:37:03-06:00 loader: Add loader.rc to Windows GN build This omission was causing the build dll to be missing version info. - - - - - 6e345ec1 by Mike Schuchardt at 2021-09-15T09:41:50-07:00 build: Update to header 1.2.192 - Update known-good - Generate source - - - - - 2d69d5c7 by Natalie Chouinard at 2021-09-16T15:06:49-06:00 loader: Add cJSON prefix to update function - - - - - a1256b51 by Mike Schuchardt at 2021-09-21T10:49:42-07:00 build: Update to header 1.2.193 - Update known-good - Generate source - - - - - 909ef587 by unknown at 2021-09-21T13:25:38-06:00 build: Fix using wrong Windows SDK for VS 2015 CMake 3.19 disallowed VS 2015 builds from selecting an SDK higher than 10.0.14393. Unfortunately, the loader requires SDK version 10.0.17763 or higher. This commit uses the 3.19 capability to disable that limit set in place by CMake so that we can use an SDK that suits our needs. - - - - - 75431e4b by Charles Giessen at 2021-09-22T16:26:19-06:00 test: Isolate Env-Vars from test framework Previously if any of the env-vars the loader looks for were set on the system, the loader would find and use them, leading to highly confusing logs. Removing them preemptively at tests start make this a non-issue. - - - - - 393e75eb by Nathaniel Cesario at 2021-09-23T13:19:14-06:00 build: Add UPDATE_DEPS cmake arg Add an UPDATE_DEPS cmake arg that can be used to automatically run update_deps.py as needed. - - - - - 3277ecde by Charles Giessen at 2021-09-24T11:47:30-06:00 build: Set DLL version automatically The loader.rc file was used to set the version used in the loader. However, this was always done manually (either by hand or a script to edit the file). This commit makes the version number needed generated automatically based on the current generated header version or uses a provided version, such as in the case of SDK builds with a 'build revision', eg "1.2.191.2". This commit also renames the atrosciously named loader_generated_header_version_generator to a nicer loader_versioning_generator. - - - - - 7ff42c87 by Charles Giessen at 2021-09-27T17:09:46-06:00 Use CMake to define SECURE_GETENV variables Use `target_compile_definitions` to provide the HAVE_SECURE_GETENV and HAVE___SECURE_GETENV macro defines. This removes the need to configure a file and makes the definition global to the loader, rather than just from whoever included the header file. - - - - - 1bf496e1 by Charles Giessen at 2021-09-27T17:44:01-06:00 build: Add RELEASE_BUILD option for Windows SDK builds This CMake option controls the information put in the loader.rc file, specifically the "Dev Build" string in the version info. - - - - - 11b37c16 by Mike Schuchardt at 2021-09-28T11:44:36-06:00 build: Update to header 1.2.194 - Update known-good - Generate source - - - - - 5f67bbd6 by Charles Giessen at 2021-09-28T12:54:43-06:00 build: Update update_deps.py to match VVL Was out of date with the feature set VVL contained. Fixed an issue where backslashes were used on windows, which caused issues when cmake decided to escape a string one more time than necessary. "C:\\Users\\..." -> "C:\Users" which has a `\U` escape symbol mucking things up. - - - - - 69fc7ecb by Charles Giessen at 2021-09-28T12:54:43-06:00 build: Move test dependencies to known_good.json This makes the requisite changes to make the dependencies needed for testing automatically downloaded by cmake when the UPDATE_DEPS option is given. - - - - - bcd56925 by Charles Giessen at 2021-09-29T13:19:25-06:00 loader: Only include loader_windows.h on windows This header should only be included on windows platforms, since non-windows platforms may not know that the header should be present (which is the case for GN builds). - - - - - 0313a16d by Ralf Habacker at 2021-09-29T14:59:11-06:00 loader: Fix setting `libdir` in generated vulkan.pc on Windows Fixes #668 - - - - - edccdb34 by Charles Giessen at 2021-09-30T15:07:32-06:00 build: Revert generated loader.rc Revert the commit that uses the vulkan-headers version and instead uses the 1.0.1111.2222 version number while still allowing for the CMake build arg BUILD_DLL_VERSIONINFO to dictate the actual version. - - - - - 83e58774 by Charles Giessen at 2021-09-30T22:39:41-06:00 test: Fixup XDG path handling, add XDG tests - - - - - d2bad77b by Charles Giessen at 2021-09-30T22:39:41-06:00 test: Add XDG & VK_LAYER_PATH tests Tests check to see if the paths are searched by looking at the log. Makde FrameworkEnvironment contain a debug_log, this is to prevent any lifetime issues. This prevents the possibility of creating a DebugUtilsLogger after the InstWrapper. Had to redo the test framework a bit to make them work. - - - - - 0cc98ec7 by Charles Giessen at 2021-09-30T22:39:41-06:00 loader: Remove old debug path printing This commit only prints paths using the new, more structured, output. It wasn't removed until now due to the paths being used in tests which have since been modernized, thus no longer needing to keep the old output style. - - - - - d47266c7 by Charles Giessen at 2021-10-04T12:02:49-06:00 ci: Enable tests on MacOS GithubActions Tests only get built if you enable them now, instead of when googletest is in the external folder. - - - - - 9bcea4ab by Charles Giessen at 2021-10-05T12:09:50-06:00 test: Move more old tests to new framework More tests can now be written with the new framework. Several of the shell scripts used tests in vk_loader_validation_tests which were phased out so no longer necessary. - - - - - a15e471c by Charles Giessen at 2021-10-05T12:09:50-06:00 test: Update ExtraLoaderTests Updated the enable/disable env-var tests to use the test framework. Removed the run_extra_loader_tests.sh. - - - - - 64527ac2 by Charles Giessen at 2021-10-05T12:09:50-06:00 test: Use correct path in json files Previously a Windows path in a json file did not include the correct backslahses. This commit rectifies that. - - - - - b7a494bf by Charles Giessen at 2021-10-05T12:09:50-06:00 test: Use correct name in def files - - - - - 9189b9cb by Charles Giessen at 2021-10-05T12:09:50-06:00 test: remove stub functions Test code should not use stub functions because its undefined behavior. This resulted in SEH exceptions on Win32. - - - - - 4d52412b by Mike Schuchardt at 2021-10-05T11:20:01-07:00 build: Update to header 1.2.195 - Update known-good - Generate source - - - - - 8c0ee92e by Graeme Leese at 2021-10-06T10:06:20-06:00 Only parse git information if .git/HEAD exists If the source comes from somewhere else (eg. the release tarballs) then .git/HEAD does not exist, so the cmake step was failing. Only try to colelct the git information if the file exists. Fixes #714. - - - - - 77162477 by Charles Giessen at 2021-10-07T10:00:08-06:00 Zero-init values passed into EnumPhysDevs - - - - - acfcfd89 by Charles Giessen at 2021-10-07T10:00:08-06:00 test: Update WrapObjects test to new framework Moved over the WrapObjects test logic into the new framework, removing all the old tests infrastructure that is no longer needed. - - - - - aeffbbd6 by Charles Giessen at 2021-10-07T13:50:17-06:00 Update README.md to remove mention of Vk-Headers - - - - - 6d9e5b07 by Mike Schuchardt at 2021-10-14T10:12:55-07:00 build: Update to header 1.2.196 - Update known-good - Generate source - - - - - b9d0a4ff by Charles Giessen at 2021-10-15T12:34:50-06:00 Only return pre-instance functions when instance is NULL vkGetInstanceProcAddr should only return the pre-instance, aka global functions, when the VkInstance handle is NULL. This brings the desktop vulkan loader into alignment on the spec and with the android loader. https://github.com/KhronosGroup/Vulkan-Docs/issues/1605 The repo previously did follow this rule, but was changes in the 1.0.42 header version timeframe for unknown reasons. - - - - - 61688e09 by Mark Young at 2021-10-15T13:42:00-06:00 Re-arrange/update loader docs Update the loader documentation in the following ways: 1. Move documentation to new "docs" folder" 2. Split LoaderAndLayerInterface.md into multiple docs to focus on target audience: - Top-Level LoaderInterfaceArchitecture.md - Applications LoaderApplicationInterface.md - Layers LoaderLayerInterface.md - ICDs LoaderImplementationInterface.md 3. Upload newer images and their corresponding original Inkscape files. 4. Cleanup and update sections on Linux directory search 5. Add new sections to detail items missing - VkConfig - Handling undef Fuchsia 6. Language cleanup Thanks to @charles-lunarg and @smcv for feedback and various section language corrections. - - - - - f5243495 by Charles Giessen at 2021-10-18T15:14:20-06:00 test: Don't add null paths for redirection - - - - - b3552792 by Eleni Maria Stea at 2021-10-20T10:29:26-06:00 loader: include FreeBSD in supported platforms Added FreeBSD in supported platforms in vk_loader_platform.h, and tests, defined BSD_VISIBLE and included some necessary header files for Vulkan-Loader to compile on FreeBSD. v2: did the same in loader/loader.c (Charles Giessen) v3: did the same in the tests (Charles Giessen) v4: applied this downstream patch from Jan Beich because there's no /proc on FreeBSD: https://github.com/freebsd/freebsd-ports/blob/7caf52e37ba2174dc50a7440d63eec70d7d58ebc/graphics/vulkan-loader/files/patch-loader_vk__loader__platform.h (Jan Beich) v4: rebased to master and modified tests/loader_regression_tests.cpp, tests/loader_testing_main.cpp v5: moved the definition of __BSD_VISIBLE 1 (required for alloca to work) in CMakeLists.txt from header files (Charles Giessen) v6: replaced ${CMAKE_SYSTEM_NAME} with CMAKE_SYSTEM_NAME in loader/CMakeLists.txt to match the style of previous checks (Jan Beich) v7: replaced add_compile_definitions with target_compile_definitions to prevent the macro from being applied unnecessarily (Charles Giessen) - - - - - 0162d164 by Mark Young at 2021-10-20T16:27:28-06:00 Change Implementation->Drivers Feedback from Khronos was that "Implementation" was for the entire set of Vulkan components underlying the application (including the loader, layers, and drivers). Instead, what I had been calling implementation should be called "Driver" including software implementations of Vulkan at that level. Also update the LOADER_DEBUG option "implem" to take "driver" as well. All images also updated. - - - - - a9bc611d by Mark Young at 2021-10-21T15:33:01-06:00 Fix broken doc links in new docs - - - - - 5a4c6917 by Charles Giessen at 2021-10-22T16:39:01-06:00 Fix vkGetInstanceProcAddr not handling null instance The issue was that trying to get a non-pre-instance function with a NULL instance handle would cause a crash. This change also adds a test that would of caught the oversight. - - - - - fab0feba by Mark Young at 2021-10-27T07:31:43-06:00 Modify loader warning about physical device count Modify the loader warning about one or more layers modifying the physical device count. Originally, it was as a general warning, but modified it to also output during layer debug. - - - - - 830a0724 by Mark Young at 2021-10-27T14:00:40-06:00 Added layer debug section and pre-instance info Add a section in the application documentation on how to debug possible layer issues. Also add a small note on why a layer may need to intercept pre-instance functions. - - - - - ad393f9b by Tomek Bury at 2021-11-02T15:57:35-06:00 Fix terminator for GetPhysicalDeviceToolPropertiesEXT Set the pToolCount as this function returns VK_SUCCESS. - - - - - 7e3866fa by Mike Schuchardt at 2021-11-03T09:21:38-07:00 build: Update to header 1.2.197 - Update known-good - Generate source - - - - - bf74db88 by Mark Young at 2021-11-04T09:39:34-06:00 Add bundling section and rename "desktop loader" Add a section warning about possible issues with bundling the Khronos loader with an application/engine. Also, rename "desktop loader" to "Khronos loader" since it is now used for more than the original desktop targets. - - - - - 77f3ea47 by Eleni Maria Stea at 2021-11-04T09:47:34-06:00 loader, asm_offset: define BSD_VISIBLE and fix ifdef bug In vk_loader_platform.h there was a leftover #if defined (__FreeBSD__) ... elif #defined(__FreeBSD__) that needed fixing. After that it was necessary to define BSD_VISIBLE before including <sys/types.h> required by <sys/sysctl.h> required by asm_offset and loader CMakeLists.txt had to be modified accordingly. - - - - - 3fd34fe1 by vladislemon at 2021-11-04T09:53:47-06:00 Fix architecture detection on recent versions of GCC - - - - - 059f7c1a by Mark Young at 2021-11-04T09:56:58-06:00 Add missing review comment fields on bundling changes. Somehow this got dropped. - - - - - 47b8d7c0 by Charles Giessen at 2021-11-04T12:19:14-06:00 test: Fix compiler warnings in MSVC Warnings/fixes include: * strcpy/strncpy/wstrcpy * Dropping static on inline functions * Use localtime_s * Name shadowing * Use wcstombs_s * 32<->64 bit int conversion * Silence spurious C4996 generated in vs2015 - - - - - 73fa8a57 by Charles Giessen at 2021-11-04T14:53:29-06:00 Refactor shim function definitions to its own file The code was written with an assumption that the functions needed to be inlined so they would appear in the correct places (both the test binaries and shim library). This can be achieved using static libraries, which is what this commit does. - - - - - d5bb7a92 by Mark Young at 2021-11-04T15:01:10-06:00 Fix GCC 11.2 build Gcc 11.2 build was failing to build with the GoogleTest version that was being built. So bump to next version of GoogleTest with fixes (GoogleTest release-1.11.0), but that also required changing the build directory to build GoogleTest in so update our Makefiles to build in the new folder as well. - - - - - 5e849b89 by Charles Giessen at 2021-11-08T15:15:31-07:00 Add test for unknown physical device functions Requires adding support in the ICD for unknown instance and physical device functions separately. - - - - - 0d34e696 by Mike Schuchardt at 2021-11-09T11:40:47-08:00 build: Update to header 1.2.198 - Update known-good - Generate source (version bump only) - - - - - 86407894 by Charles Giessen at 2021-11-09T16:20:03-07:00 Make GetPhysDevToolProps call into drivers Originally, terminator_GetPhysicalDeviceToolPropertiesEXT simply returned up the call chain, skipping the driver entirely. Now, it will call into the driver if the tooling extension is supported. To do that requires querying the list of extensions the driver supports, because there isn't a list of extensions each physical device supports stored anywhere. - - - - - bed7a5c6 by Charles Giessen at 2021-11-09T16:20:03-07:00 Add test for vkGetPhysicalDeviceToolProperties Basic tests which just makes sure the trampoline + terminator pass the data through correctly. Data only originates from TestICD, TestLayer has no support for the extension. - - - - - 538b2676 by Rémi Bernon at 2021-11-11T14:15:53-07:00 Link loader-unknown-chain with Vulkan::Headers - - - - - 9e6011fd by Eric Sullivan at 2021-11-12T11:01:34-07:00 loader: Update assembly file names to specify their target architecture - - - - - 4f78f14c by Eric Sullivan at 2021-11-12T11:01:34-07:00 loader: Add aarch64 unknown ext chain implementation - - - - - fe8479aa by Charles Giessen at 2021-11-17T15:28:51-07:00 Dont call ToolProps on drivers without support The loader recently added support for calling into drivers in vkGetPhysicalDeviceToolPropertieesEXT. However, it only used the value of the function pointer to determine if it was safe. It was found that Mesa drivers will return a non-null function pointer, even though they do not support the extension, and so the loader called this function pointer which would then segfault. The loader prevents this by first checking if the extension is supported by the physical device. This necessitates calling vkEnumerateDeviceExtensionProperties and allocating some memory on each call but since the number of times this function is called should be low, it is not an undue performance burden. In the future, the loader should cache the list of extensions when calling vkEnumeratePhysicalDevices so that checking if a extension function is supported is fast and easy. - - - - - 0ca96994 by Charles Giessen at 2021-12-03T13:16:53-07:00 Revert to old behavior in GIPA for old apps Vulkan header updated 1.2.193 changed the behavior of vkGetInstanceProcAddr for global entrypoints. They used to always be returned regardless of the value of the instance paramtere. The spec was amended in this version to only allow querying global level entrypoints with a NULL instance. However, as to not break old applications, the new behavior is only applied if the instance passed in is both valid and minor version is greater than 1.2, which was when this change in behavior occurred. Only instances with a newer version will get the new behavior. - - - - - 8 changed files: - .github/workflows/build.yml - BUILD.gn - BUILD.md - CMakeLists.txt - README.md - + docs/LoaderApplicationInterface.md - + docs/LoaderDriverInterface.md - + docs/LoaderInterfaceArchitecture.md The diff was not included because it is too large. View it on GitLab: https://salsa.debian.org/xorg-team/vulkan/vulkan-loader/-/compare/39dd126e16c7a1c7135265aae9ac67ae9e110db0...0ca96994f92b6f21b37badd6c99b22f61bfec932 -- View it on GitLab: https://salsa.debian.org/xorg-team/vulkan/vulkan-loader/-/compare/39dd126e16c7a1c7135265aae9ac67ae9e110db0...0ca96994f92b6f21b37badd6c99b22f61bfec932 You're receiving this email because of your account on salsa.debian.org.

