Timo Aaltonen pushed to branch debian-unstable at X Strike Force / vulkan / vulkan-loader
Commits: 1bfe4ad2 by Mike Schuchardt at 2022-09-22T10:58:15-07:00 build: Update to header 1.3.229 - Update known-good - Generate source - - - - - f755a87b by Mike Schuchardt at 2022-09-22T10:58:15-07:00 ci: Do apt update before install to fix 404 errors - - - - - 9c40a28e by PaperChalice at 2022-09-26T11:56:43-06:00 loader: fix log message - - - - - c71f94d8 by Mike Schuchardt at 2022-09-29T11:29:08-07:00 build: Update to header 1.3.230 - Update known-good - Generate source - - - - - 925eb27e by Juan Ramos at 2022-10-03T17:30:15-06:00 build: Fix CMake warnings - CMAKE_GENERATOR_PLATFORM is only valid on Visual Studio generators - Remove FindWayland since it's no longer needed. See this discussion for details: https://github.com/KhronosGroup/Vulkan-Docs/pull/1905 - - - - - cd9b4afe by Charles Giessen at 2022-10-04T13:28:00-06:00 Don't load layer libraries in vkCreateDevice These libraries will always be loaded in vkCreateInstance, so we don't need to load them again in vkCreateDevice. This has the added benefit of not printing 'unloading library X' twice in the log. - - - - - 6c645371 by Charles Giessen at 2022-10-06T17:00:40-06:00 Enable cross compile test discovery gtest_discover_tests() doesn't work in cross compilation environments, so if that is happening fall back to gtest_add_tests(). - - - - - cb519989 by Charles Giessen at 2022-10-10T14:54:07-06:00 Don't abort when drivers don't support WSI calls Instance extensions are aggregated, therefore an application has no way of knowing whether an ICD supports a WSI function or not. This necessitates returning instead of aborting from WSI functions, as well as writing 0, NULL, or returning false as needed for each function. This also needs additional NULL checks before calling down into the driver. - - - - - ae08f711 by Charles Giessen at 2022-10-11T13:01:07-06:00 Fix issue with MSVC 15 failing to compile test code Was a basic case of googletest not allowing implicit conversion between types. - - - - - 23a050bc by Charles Giessen at 2022-10-12T10:48:16-06:00 Guard loader.instances access with mutex. While the adding and removing of data from this global linked list was guarded, GetInstanceProcAddr & GetDeviceProcAddr did not have such guards. This results in race conditions that were detected with thread sanitizer. This commit adds a mutex solely for the loader.instances global variable. - - - - - a5323244 by Charles Giessen at 2022-10-12T16:22:24-06:00 Revert "Don't load layer libraries in vkCreateDevice" This reverts commit cd9b4afed4e556ac88a75371eb7283fed94ca3c6. - - - - - a88144de by Charles Giessen at 2022-10-12T18:58:46-06:00 Correctly handle layers not being loaded in vkCreateDevice This reverts the previous commit which reverted bad behavior. - - - - - 61187c40 by Mike Schuchardt at 2022-10-13T08:30:39-07:00 build: Update to header 1.3.231 - Update known-good - Generate source - - - - - a5d92e38 by Juan Ramos at 2022-10-18T12:01:37-06:00 ci: Use MACOS_DEPLOYMENT_TARGET - This approach matches what our SDK release process expect - Since setting CMAKE_MACOS_DEPLOYMENT_TARGET ignores env variable which SDK release process uses, which could will cause issues in the future, if the version is changed - CMAKE_MACOS_DEPLOYMENT_TARGET doesn't propogate to dependencies via update_deps.py - - - - - d12ff7d4 by Charles Giessen at 2022-10-18T15:58:28-06:00 Write gen_defines.asm using a python script This allows cross compilation to enable unkonwn function handling as gen_defines.asm will be generated without needing to run code meant for the target platform. Previously, asm_offset.c wrote the gen_defines.asm file by being run. Now, compilers emit their intermediate assembly output that the parse_asm_values.py script knows how to find the relevant information from. Additionally set the test framework `framework_config` build option to always copy, instead of copy_if_different. This is needed since cmake wouldn't update this file when changing from/to debug & release mode. - - - - - ae54ca0d by Charles Giessen at 2022-10-18T17:23:54-06:00 Only deduplicate driver manifests Code which was originally meant to deduplicate drivers that moved from the old registry HKEY_LOCAL_MACHINE/SOFTWARE/Khronos/Vulkan/Drivers to PnP locations was incorrectly applied to layers as well. The issue is that multiple layers can share the same json file name but not actually contain the same manifest. Worse, the first layer found would be assumed to be correct, even the file had been deleted from the file system. - - - - - 9cd0dc8c by Charles Giessen at 2022-10-21T15:43:39-06:00 Use correct allocator in debug_utils.c loader_calloc_with_instance_fallback is used in places where a user can supply their own allocator, but should default to the allocator used with the instance otherwise. The issue was that loader_free was being used with objects created with the instance allocator, but loader_free only takes the user provided one, leading to leaks. - - - - - fad41b34 by Charles Giessen at 2022-10-25T07:43:07-06:00 Restore asm_offset printing code The cross compiling workaround for asm_offset requires python, but this meant that all builds required python. This commit re-adds the removed asm_offset logic and then only requires python during cross compilation. - - - - - 1aa18c70 by Charles Giessen at 2022-10-25T07:43:07-06:00 Update BUILD.md Remove references to VS 2015, as it is no longer supported. Update the build instructions to include UPDATE_DEPS more prominently. Move mentions of tests to the very end, and to use `ctest`. Mention Cross Compilation caveats. - - - - - af67fcce by Charles Giessen at 2022-10-25T08:08:04-06:00 Don't query vkCreateSwapchainKHR with GIPA Previously, the loader would initialize vkCreateSwapchainKHR and vkGetDeviceGroupSurfacePresentModeskHR with vkGetInstanceProcAddr, instead of what should have happened, which is to use vkGetDeviceProcAddr. - - - - - e5680db8 by Charles Giessen at 2022-10-25T08:08:04-06:00 Document vk_icdGetInstanceProcAddr querying device functions vk_icdGetInstanceProcAddr has similar semantics to vkGetInstanceProcAddr. It was created to prevent dynamic linker issues. It stated that it should support global & instance level function querying. But this differs from the Vulkan spec which states that vkGetInstanceProcAddr should be able to query all functions. This creates confusion about what takes precendence, the spec or the loader's docs. This commit makes it explicit that it should have the same semanics what the spec says. - - - - - 81d81366 by danny.zhu at 2022-10-25T09:08:22-06:00 fix: add dev pointer checking before using - - - - - 76265278 by Danny Zhu at 2022-10-25T09:08:22-06:00 fix: add dev pointer checking - - - - - c2d94e9c by Danny Zhu at 2022-10-25T09:08:22-06:00 fix: add null pointer checking - - - - - ceabdb1f by Danny Zhu at 2022-10-25T09:08:22-06:00 fix: format code - - - - - 5ee9cbbf by Charles Giessen at 2022-10-25T15:00:13-06:00 Revert "Document vk_icdGetInstanceProcAddr querying device functions" This reverts commit e5680db8ae5640dde10b58b8ab45e4a6201ae3e9. - - - - - 363bd514 by Charles Giessen at 2022-10-25T15:00:13-06:00 Revert "Don't query vkCreateSwapchainKHR with GIPA" This reverts commit af67fccebe59e8d8e30e8c02b7b0069ce4242fc4. - - - - - f57610da by Charles Giessen at 2022-10-25T17:42:18-06:00 Fix linux 32 bit unknown function error handling The issue was that passing a string to loader_log wouldn't work, likely due to relocation issues. Workaround is to create a bespoke function that contained the format string embedded in it. Additionally, CMAKE_SYSTEM_PROCESSOR is incorrect in the case of x86 builds on x64. Checking for sizeof(void*) == 8 allows distinguishing building for 32 bit and 64 bit, and so the correct gen_defines.asm is created while cross compiling. Also rename the error to note that its a function which isn't supported, not an extension. - - - - - 6a0367a9 by Charles Giessen at 2022-10-25T17:58:01-06:00 Add 32 bit github actions CI - - - - - d79e2731 by Charles Giessen at 2022-10-25T21:04:34-06:00 Remove vkCreateSwapchainKHR from ICD Dispatch table vkCreateSwapchainKHR and vkGetDeviceGroupSurfacePresentModesKHR were added to the icd dispatch table then loaded with GIPA. While this is possible, for best performance and consistency, the loader should use the device's dispatch table for these functions. This required changing the terminators for both functions so that they checked that the dev pointer isn't null and its dispatch entry for each function isn't null. Additionally, various debug marker/util functions checked if an ICD supported surfaces by checking the ICD's dispatch table for vkCreateSwapchainKHR. These have been updated to use the device's dispatch table instead. - - - - - 068e83f5 by Charles Giessen at 2022-10-25T21:04:34-06:00 Document vk_icdGetInstanceProcAddr querying device functions vk_icdGetInstanceProcAddr has similar semantics to vkGetInstanceProcAddr. It was created to prevent dynamic linker issues. It stated that it should support global & instance level function querying. But this differs from the Vulkan spec which states that vkGetInstanceProcAddr should be able to query all functions. This creates confusion about what takes precendence, the spec or the loader's docs. This commit makes it explicit that it should have the same semanics what the spec says. - - - - - 363c106d by Charles Giessen at 2022-10-26T10:29:53-06:00 Revert "Document vk_icdGetInstanceProcAddr querying device functions" This reverts commit 068e83f5f20e38c3ae1687e7f1aeb59bf6ce3e72. - - - - - 201c2d83 by Charles Giessen at 2022-10-26T10:29:53-06:00 Revert "Remove vkCreateSwapchainKHR from ICD Dispatch table" This reverts commit d79e2731d45bf4c81f650f27205e208a023269aa. - - - - - d4cb3b54 by Mike Schuchardt at 2022-10-27T10:55:30-06:00 build: Update to header 1.3.232 - Update known-good - Generate source - - - - - d1db6c5b by Charles Giessen at 2022-10-31T17:19:23-06:00 Remove Device functions from ICD Dispatch table There are numerous terminators to device level functions that the loader must insert in the call chain. However, the Device Dispatch Tables contain pointers to these terminators rather than the driver's function. This was worked around by storing the driver's functions in the ICD dispatch table and calling those. This leads to rather confusing code where the application is querying for the ICD dispatch table inside a device level function. The solution is to create a bespoke dispatch table for device level functions that require a terminator, and use that table when required. - - - - - b8b1f575 by Charles Giessen at 2022-10-31T17:19:23-06:00 Use macos-11 in github actions to work around bugs There seems to be an incompatible change in macos-12 which breaks the loader's test framework. While this is being resolved, move the github actions runners from the latest to only using 11. - - - - - d4fd5773 by Charles Giessen at 2022-10-31T17:19:23-06:00 Null check vk_icdGetPhysicalDeviceProcAddr Forgotten NULL check causes crashes if a driver forgets to export vk_icdGetPhysicalDeviceProcAddr but does report a 4 or higher ICD Interface Version. - - - - - a17d7fc7 by Charles Giessen at 2022-10-31T17:19:23-06:00 Test Wrap Layer didn't unwrap in vkGetInstanceProcAddr Wrapping layer should be unwrapping the instance handle inside of GetProcAddr functions. - - - - - 3f29209d by Charles Giessen at 2022-11-01T15:05:40-06:00 Remove implicit fallthroughs; Add warning Previously, cJSON used implicit fallthrough in a switch statement. Naked fallthroughs are a common bug source, and while this use case was well behaved, it did require disabling the compiler warnings for it. Thus, converting it to an explicit for loop prevents unnecessary compiler warning flags being disabled. - - - - - 4f4b32cf by Charles Giessen at 2022-11-02T13:59:43-06:00 Remove override layer expiration This was an undocumented feature of the override manifest layer. Since vkconfig is the primary user of the override layer, and vkconfig makes no effort to include expiration support, this feature is not being used. Thus, it is best to remove it entirely. - - - - - da810336 by Charles Giessen at 2022-11-02T17:45:52-06:00 Dont abort when driver doesn't support debug utils A recent change made it so that when either vkDebugMarkerSetObjectTagEXT, vkDebugMarkerSetObjectNameEXT, vkSetDebugUtilsObjectNameEXT, or vkSetDebugUtilsObjectTagEXT is called, if a driver doesn't support any of those functions the loader would abort. This is incorrect because drivers may not support the debug utils extension while the loader & layers might. Now the loader only aborts if the Device handle is invalid, and simply returns VK_SUCCESS if a driver doesn't support those functions. - - - - - 374dbe9d by Mike Schuchardt at 2022-11-03T10:37:04-07:00 build: Update to header 1.3.233 - Update known-good - Generate source - - - - - 1bc3a2fa by Jeremy Gebben at 2022-11-04T11:58:29-06:00 Do not include vk_sdk_platform.h Nothing in this file was being used. - - - - - 38ce56b2 by Mark Young at 2022-11-04T14:08:39-06:00 Add loader enable/disable env vars Add new environment variables that will allow the loader to filter layers and drivers in specific ways. This control should give developers ways to more quickly narrow down issues with a layer or driver. Also, it should give CI environments a mechanism to selectively enable only drivers and layers that are needed for testing. Add tests to support validating the new changes. Add documentation that describes the new changes and also create new loader debugging markdown document to help people debug issues with drivers or layers using the new filter enums. Rename the old get_environment.* source files to loader_environment.*. Then put all the environment variable helpers from loader.c into the new files. - - - - - b16ed71d by Mark Young at 2022-11-04T14:08:39-06:00 Update so filters apply results to vkEnumInstanceLayerProps Also remove duplication so that common code is used in several places. - - - - - ff280580 by Mark Young at 2022-11-04T14:08:39-06:00 Put placeholder for loader version TODO: Replace all 1.3.yyyy with appropriate header version after approval. - - - - - c7950c5b by Mark Young at 2022-11-04T14:08:39-06:00 Update and clarify filter documentation Based on review feedback from @hadess - - - - - 99af2c41 by Charles Giessen at 2022-11-04T14:08:39-06:00 Remove redundant layer searching in term_EnumDevExts When terminator_EnumerateDeviceExtensionProperties is called, the app now only checks that the type flag is implicit rather than building up a new list of implicit layers, as building a list could cause many suprious log messages and was unecessary. This commit also removes some redundant copies & for loops in the function. - - - - - 209455be by Charles Giessen at 2022-11-04T14:08:39-06:00 Add the 1.3.224 Header version to the Env-Var documentation This way users know exactly which version of the loader contains the new environment variables. - - - - - 78ffb447 by Charles Giessen at 2022-11-04T14:08:39-06:00 Fix env-var filtering in layer enumeration Disabled layers would appear in the output of EnumerateInstanceLayers, which was not intended. Move the removal of layers that are disabled by the env-var to after the explicit layers are found. - - - - - 256a5e3b by Charles Giessen at 2022-11-04T14:08:39-06:00 Fix tests for env-var filtering due to previous commit The previous commit altered vkCreateInstance erroring out if the application tries to enable an env-var disabled layer, so the tests need to be revised for it. This commit also makes lot of modifications to the tests in addition to that. Also adds tests for when the override layer is present and when implicit layer's enable-environment variables are present. - - - - - 8ff839bd by Charles Giessen at 2022-11-04T17:07:38-06:00 Fix vulkan.pc Libs.private for static builds The Libs.private field shouldn't be present for shared library builds, so now the field wont be present in that case. For static library builds it should be present, but the fields should be deduplicated as well. Additionally, this adds a github actions run for testing the static build of the loader on MacOS. This requires making the test framework capable of using a statically built loader, which mainly took making VulkanFunctions capable of assigning the statically defined functions instead of loading them with dlsym. The static build option required changes to the unix_shim.cpp to not cause infinite loops. - - - - - 6b055142 by Mark Mentovai at 2022-11-07T12:08:20-07:00 loader/cJSON: replace sprintf calls with snprintf This makes it possible to build Vulkan-Loader without warnings using the macOS 13 SDK. Calls to sprintf are replaced with snprintf, passing appropriate buffer sizes. It doesn’t appear that any of the changed uses of sprintf were actually unsafe, so no behavior change is expected aside from SDK compatibility. The macOS 13 SDK deprecates sprintf as it’s difficult to use safely. The deprecation warning message is visible when building C++, but it is not normally visible when building plain C code due to a quirk in how sprintf is declared in the SDK. However, the deprecation message is visible when building plain C under Address Sanitizer (-fsanitize=address). This discrepancy was discovered at https://crbug.com/1381706 and reported to Apple with a copy at https://openradar.appspot.com/FB11761475. The macOS 13 SDK is packaged in Xcode 14.1, released on 2022-11-01. This also affects the iOS 16 SDK and other 2022-era Apple OS SDKs packaged in Xcode 14.0, released on 2022-09-12. Vulkan-Loader is visible to the Chromium build via PDFium, and this change is needed to allow Chromium to move forward to the macOS 13 SDK. - - - - - 6442b72a by Charles Giessen at 2022-11-07T16:07:23-07:00 Remove USE_CCACHE build option The way to use ccache has changed since this documentation & build option were added. Update the docs with the new way to enable ccache and remove the build option. - - - - - 5b054b43 by Juan Ramos at 2022-11-08T14:57:21-07:00 cmake: Use new VulkanHeaders cmake support Removes need to have FindVulkanHeaders.cmake - - - - - 7e611103 by Charles Giessen at 2022-11-09T14:02:42-07:00 Dont abort when WSI functions are NULL. Commit d1db6c5bce9ed474ca124f0bffed9aa2468f3973 changed a few WSI functions to abort when the driver's function was NULL, which is a change of existing behavior. It should instead return VK_SUCCESS. At least now there is a warning message. This commit also adds tests for the above situation and for debug utils & debug marker functions to make sure the pre-existing behavior is maintained. This was tested by running the loader with a previous build through the new tests and verified that they both passed. The tests run the cases of whether the extensions were enabled, how the functions were queried (GIPA vs GDPA), and whether the hardware supports the extensions. - - - - - 897f82b7 by Charles Giessen at 2022-11-09T16:28:26-07:00 Remove log message of ICD extension lists - - - - - 1b40be29 by Charles Giessen at 2022-11-09T16:28:26-07:00 Call both EnumPhysDevs & EnumAdapterPhysDevs on drivers This change is necessary to allow drivers that have both real physical devices with a LUID and software based physical devices which lack a LUID.. It works by calling both vk_icdEnumerateAdapterPhysicalDevice and vkEnumeratePhysicalDevice then deduplicating the returned physical devices using the VkPhysicalDevice handles. This commit also fixes an issue where tests would erroneously add a layer to the driver registry. - - - - - 0df63661 by Mike Schuchardt at 2022-11-10T08:46:26-08:00 build: Update to header 1.3.234 - Update known-good - Generate source - - - - - ff7996f1 by Charles Giessen at 2022-11-10T14:21:45-07:00 Add macOS-latest CI action Re-enables using the macOS-latest github actions runner now that the loader has been fixed for newer macOS versions. - - - - - f18d3e3c by Juan Ramos at 2022-11-10T17:16:53-07:00 cmake: CMake cleanup - Use idiom for CMAKE_MODULE_PATH - find_package(PkgConfig) instead of include(FindPkgConfig) - Remove CMake 2.X code workaround - Use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR - CMakeParseArguments is now part of the language - - - - - 349d8516 by Waffl3x at 2022-11-11T10:37:56-07:00 Remove redundant code loader_make_version recently was changed to zero out the patch version, explicitly doing it is no longer necessary. - - - - - a2242f4a by Charles Giessen at 2022-11-11T15:20:51-07:00 Recheck API version in terminator_CreateInstance Layers are liable of changing the API version during the call down vkCreateInstance. Certain layers use the guarantees of 1.1 to allow using VK_KHR_get_physical_device_properties2 functionality. This commit checks and assignes a new API version if it was modified. Add tests for when the application forgets to enable 1.1 and when a layer enabled 1.1 on behalf of the application. - - - - - b7d671c2 by Charles Giessen at 2022-11-11T16:15:42-07:00 Handle invalid files & symlinks properly If loader_get_json fails due to the file missing or the file being a stale symlink, it returns VK_ERROR_INITIALIZATION_FAILED which loader_parse_icd_manifest passed upwards. Since the caller of loader_parse_icd_manifest wasn't expecting that error code, it didn't skip the ICD, causing an infinite recusion in EnumInstExtProps due to the call to dlsym("vkEnumerateInstanceExtensionProperties"); This also required changes to callers of loader_get_json which would propagate VK_ERROR_INITIALIZATION failed during layer searching to no longer cause vkCreateInstance to abort if any invalid files were found. Added tests for symlinks as the origin of this bug is due to 'stale' symlinks after driver installers - - - - - 27d86008 by Charles Giessen at 2022-11-16T09:48:11-07:00 Fix cases where OOM was handled wrong goto's were replaced by returns erroneously. This caused unfreed memory in certain OOM scenarios, caught by CTS. The reason the loader tests didn't catch this was because the fake drivers did not report any extensions, thus no memory was allocated (which would later be leaked). This commit addressess this deficiency in the tests as well, which included correctly incrementing the MemoryTracker's allocation count during realloc. - - - - - 84dacb5c by Charles Giessen at 2022-11-17T10:47:31-07:00 Propagate OOHM error from json parsing There was a few places where an out of memory error could be generated by parsing json but were not passed on upwards, causing CTS tests to fail.. - - - - - 2eb6cc62 by Charles Giessen at 2022-11-17T10:47:31-07:00 Add complex json file to allocation tests This helps exercise the cJSON OOM handling code. The json file is just a copy of the validation layer manifest file. - - - - - 6c7b2db4 by Mike Schuchardt at 2022-11-17T10:36:38-08:00 build: Update to header 1.3.235 - Update known-good - Generate source - - - - - 3a092fe8 by Charles Giessen at 2022-11-21T14:47:52-07:00 Add more OOM handling paths and refactor OOM tests There were more cases where OOM wasn't being propagated correctly, or even caught in the first place. This change makes all of those paths report OOM to the application as is expected. One case was due to linux sorting erroring out but then leaking memory, which wasn't caught because the tests didn't create devices that supported PhysDevProps2. Lastly, since the Allocation tests were taking much longer due to making many more allocations, the MemoryTracker was rewritten to use std::unordered_map to speed up insertion and lookup of allocations made. - - - - - 39a87c2f by Mike Schuchardt at 2022-12-01T14:34:39-06:00 build: Update to header 1.3.236 - Update known-good - Generate source - - - - - ba92c4cd by ziga-lunarg at 2022-12-02T11:13:25-07:00 loader: Fix parsing VK_INSTANCE_LAYERS - - - - - 1ee83a25 by Richard S. Wright Jr at 2022-12-12T14:48:22-05:00 Fix for Apple compiler bug - - - - - 75579a90 by Timo Aaltonen at 2023-01-09T11:00:58+02:00 Merge tag 'sdk-1.3.231.1' into d-u - - - - - 692ef579 by Timo Aaltonen at 2023-01-09T11:01:43+02:00 Merge branch 'debian-unstable' into d-u - - - - - 8c459b46 by Timo Aaltonen at 2023-01-09T11:03:42+02:00 version bump - - - - - 1463786f by Timo Aaltonen at 2023-01-09T11:03:57+02:00 Refresh vulkan-headers to 1.3.236.0 - - - - - 20 changed files: - .github/workflows/build.yml - BUILD.gn - BUILD.md - CMakeLists.txt - build-qnx/common.mk - − cmake/FindVulkanHeaders.cmake - − cmake/FindWayland.cmake - debian/changelog - docs/LoaderApplicationInterface.md - + docs/LoaderDebugging.md - docs/LoaderDriverInterface.md - docs/LoaderInterfaceArchitecture.md - docs/LoaderLayerInterface.md - loader/CMakeLists.txt - loader/asm_offset.c - loader/cJSON.c - loader/debug_utils.c - loader/extension_manual.c - loader/generated/loader_generated_header_version.cmake - − loader/get_environment.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/cec6ed71d0560d447b2a1e806e71e9b326ccb564...1463786f0932e1a8c61e41b931e37efda6a33727 -- View it on GitLab: https://salsa.debian.org/xorg-team/vulkan/vulkan-loader/-/compare/cec6ed71d0560d447b2a1e806e71e9b326ccb564...1463786f0932e1a8c61e41b931e37efda6a33727 You're receiving this email because of your account on salsa.debian.org.