Hello community, here is the log from the commit of package vulkan-loader for openSUSE:Factory checked in at 2020-04-25 20:09:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vulkan-loader (Old) and /work/SRC/openSUSE:Factory/.vulkan-loader.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vulkan-loader" Sat Apr 25 20:09:57 2020 rev:21 rq:795754 version:1.2.137 Changes: -------- --- /work/SRC/openSUSE:Factory/vulkan-loader/vulkan-loader.changes 2020-04-13 12:51:35.740603935 +0200 +++ /work/SRC/openSUSE:Factory/.vulkan-loader.new.2738/vulkan-loader.changes 2020-04-25 20:10:02.183759541 +0200 @@ -1,0 +2,7 @@ +Mon Apr 13 09:57:00 UTC 2020 - Jan Engelhardt <[email protected]> + +- Update to release 1.2.137 + * Allow vkGetInstanceProcAddr to resolve itself with no instance. + * loader: Strip out empty search paths. + +------------------------------------------------------------------- Old: ---- v1.2.135.tar.gz New: ---- v1.2.137.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vulkan-loader.spec ++++++ --- /var/tmp/diff_new_pack.hPsyJk/_old 2020-04-25 20:10:03.175761587 +0200 +++ /var/tmp/diff_new_pack.hPsyJk/_new 2020-04-25 20:10:03.179761595 +0200 @@ -18,7 +18,7 @@ %define lname libvulkan1 Name: vulkan-loader -Version: 1.2.135 +Version: 1.2.137 Release: 0 Summary: Reference ICD loader for Vulkan License: Apache-2.0 ++++++ v1.2.135.tar.gz -> v1.2.137.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/.travis.yml new/Vulkan-Loader-1.2.137/.travis.yml --- old/Vulkan-Loader-1.2.135/.travis.yml 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/.travis.yml 2020-04-08 23:52:42.000000000 +0200 @@ -10,7 +10,6 @@ fast_finish: true allow_failures: - env: CHECK_COMMIT_FORMAT=ON - - env: VULKAN_BUILD_TARGET=GN include: # Linux GCC debug build. - os: linux diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/CMakeLists.txt new/Vulkan-Loader-1.2.137/CMakeLists.txt --- old/Vulkan-Loader-1.2.135/CMakeLists.txt 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/CMakeLists.txt 2020-04-08 23:52:42.000000000 +0200 @@ -38,6 +38,15 @@ option(BUILD_TESTS "Build Tests" OFF) endif() +if(APPLE) + option(BUILD_STATIC_LOADER "Build a loader that can be statically linked" OFF) +endif() + +if(BUILD_STATIC_LOADER) + message(WARNING "The ENABLE_STATIC_LOADER option has been set. Note that this will only work on MacOS and is not supported " + "or tested as part of the loader. Use it at your own risk.") +endif() + # Add the externals directory early so we pickup the headers if they're present add_subdirectory(external) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/cmake/FindVulkanHeaders.cmake new/Vulkan-Loader-1.2.137/cmake/FindVulkanHeaders.cmake --- old/Vulkan-Loader-1.2.135/cmake/FindVulkanHeaders.cmake 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/cmake/FindVulkanHeaders.cmake 2020-04-08 23:52:42.000000000 +0200 @@ -76,7 +76,8 @@ # do a normal search without hints. find_path(VulkanHeaders_INCLUDE_DIR NAMES vulkan/vulkan.h) get_filename_component(VULKAN_REGISTRY_PATH_HINT ${VulkanHeaders_INCLUDE_DIR} DIRECTORY) - find_path(VulkanRegistry_DIR NAMES vk.xml HINTS ${VULKAN_REGISTRY_PATH_HINT}/share/vulkan/registry) + find_path(VulkanRegistry_DIR NAMES vk.xml HINTS ${VULKAN_REGISTRY_PATH_HINT}/share/vulkan/registry + "${VULKAN_REGISTRY_PATH_HINT}/registry") endif() set(VulkanHeaders_INCLUDE_DIRS ${VulkanHeaders_INCLUDE_DIR}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/CMakeLists.txt new/Vulkan-Loader-1.2.137/loader/CMakeLists.txt --- old/Vulkan-Loader-1.2.135/loader/CMakeLists.txt 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/CMakeLists.txt 2020-04-08 23:52:42.000000000 +0200 @@ -222,7 +222,11 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-typedef-redefinition") endif() - add_library(vulkan SHARED ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS}) + if(APPLE AND BUILD_STATIC_LOADER) + add_library(vulkan STATIC ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS}) + else() + add_library(vulkan SHARED ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS}) + endif() add_dependencies(vulkan loader_asm_gen_files) set_target_properties(vulkan PROPERTIES SOVERSION @@ -254,7 +258,11 @@ ${VulkanHeaders_INCLUDE_DIRS}/vulkan/vulkan_xlib_xrandr.h ${VulkanHeaders_INCLUDE_DIRS}/vulkan/vulkan.h ${VulkanHeaders_INCLUDE_DIRS}/vulkan/vulkan.hpp) - add_library(vulkan-framework SHARED ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS} ${FRAMEWORK_HEADERS}) + if(BUILD_STATIC_LOADER) + add_library(vulkan-framework STATIC ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS} ${FRAMEWORK_HEADERS}) + else() + add_library(vulkan-framework SHARED ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS} ${FRAMEWORK_HEADERS}) + endif() add_dependencies(vulkan-framework loader_asm_gen_files) target_link_libraries(vulkan-framework -ldl -lpthread -lm "-framework CoreFoundation") target_link_libraries(vulkan-framework Vulkan::Headers) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/LoaderAndLayerInterface.md new/Vulkan-Loader-1.2.137/loader/LoaderAndLayerInterface.md --- old/Vulkan-Loader-1.2.135/loader/LoaderAndLayerInterface.md 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/LoaderAndLayerInterface.md 2020-04-08 23:52:42.000000000 +0200 @@ -521,8 +521,8 @@ ##### Implicit vs Explicit Layers Explicit layers are layers which are enabled by an application (e.g. with the -vkCreateInstance function), or by an environment variable (as mentioned -previously). +vkCreateInstance function as mentioned previously), or by an environment +variable. Implicit layers are those which are enabled by their existence. For example, certain application environments (e.g. Steam or an automotive infotainment @@ -1037,15 +1037,43 @@ The loader will then individually call each layer’s `vkNegotiateLoaderLayerInterfaceVersion` function with the filled out -“VkNegotiateLayerInterface”. The layer will either accept the loader's version -set in "loaderLayerInterfaceVersion", or modify it to the closest value version -of the interface that the layer can support. The value should not be higher -than the version requested by the loader. If the layer can't support at a -minimum the version requested, then the layer should return an error like -"VK_ERROR_INITIALIZATION_FAILED". If a layer can support some version, then -the layer should do the following: - 1. Adjust the version to the layer's desired version. - 2. The layer should fill in the function pointer values to its internal +“VkNegotiateLayerInterface”. + +This function allows the loader and layer to agree on an interface version to use. +The "loaderLayerInterfaceVersion" field is both an input and output parameter. +"loaderLayerInterfaceVersion" is filled in by the loader with the desired latest +interface version supported by the loader (typically the latest). The layer receives +this and returns back the version it desires in the same field. Because it is +setting up the interface version between the loader and layer, this should be +the first call made by a loader to the layer (even prior to any calls to +`vkGetInstanceProcAddr`). + +If the layer receiving the call no longer supports the interface version provided +by the loader (due to deprecation), then it should report a +VK_ERROR_INITIALIZATION_FAILED error. Otherwise it sets the value pointed by +"loaderLayerInterfaceVersion" to the latest interface version supported by both the +layer and the loader and returns VK_SUCCESS. + +The layer should report VK_SUCCESS in case the loader-provided interface version +is newer than that supported by the layer, as it's the loader's responsibility to +determine whether it can support the older interface version supported by the +layer. The layer should also report VK_SUCCESS in the case its interface version +is greater than the loader's, but return the loader's version. Thus, upon +return of VK_SUCCESS the "loaderLayerInterfaceVersion" will contain the desired +interface version to be used by the layer. + +If the loader receives a VK_ERROR_INITIALIZATION_FAILED error instead of +VK_SUCCESS, then the loader will treat the layer as unusable and will not load +it for use. In this case, the application will not see the layer during +enumeration. Note that the loader is currently backwards compatible with all +layer interface versions, so a layer should not be able to request a version +older than what the loader supports. + +This function **SHOULD NOT CALL DOWN** the layer chain to the next layer. +The loader will work with each layer individually. + +If the layer supports the new interface and reports version 2 or greater, then +The layer should fill in the function pointer values to its internal functions: - "pfnGetInstanceProcAddr" should be set to the layer’s internal `GetInstanceProcAddr` function. @@ -1056,12 +1084,6 @@ - If the layer supports no physical device extensions, it may set the value to NULL. - More on this function later - 3. The layer should return "VK_SUCCESS" - -This function **SHOULD NOT CALL DOWN** the layer chain to the next layer. -The loader will work with each layer individually. - -If the layer supports the new interface and reports version 2 or greater, then the loader will use the “fpGetInstanceProcAddr” and “fpGetDeviceProcAddr” functions from the “VkNegotiateLayerInterface” structure. Prior to these changes, the loader would query each of those functions using "GetProcAddress" @@ -1546,7 +1568,7 @@ For example, a function that wishes to intercept `vkEnumerateInstanceExtensionProperties` would have the prototype: ``` -VkResult InterceptFunctionName(const VkEnumerateInstanceExtensionProperties* pChain, +VkResult InterceptFunctionName(const VkEnumerateInstanceExtensionPropertiesChain* pChain, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); ``` @@ -1556,7 +1578,7 @@ For example, a simple implementation for `vkEnumerateInstanceExtensionProperties` that does nothing but call down the chain would look like: ``` -VkResult InterceptFunctionName(const VkEnumerateInstanceExtensionProperties* pChain, +VkResult InterceptFunctionName(const VkEnumerateInstanceExtensionPropertiesChain* pChain, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties) { return pChain->pfnNextLayer(pChain->pNextLink, pLayerName, pPropertyCount, pProperties); @@ -1567,7 +1589,7 @@ Implementing the above function using this method would look like: ``` -VkResult InterceptFunctionName(const VkEnumerateInstanceExtensionProperties* pChain, +VkResult InterceptFunctionName(const VkEnumerateInstanceExtensionPropertiesChain* pChain, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties) { return pChain->CallDown(pLayerName, pPropertyCount, pProperties); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/dxgi_loader.c new/Vulkan-Loader-1.2.137/loader/dxgi_loader.c --- old/Vulkan-Loader-1.2.135/loader/dxgi_loader.c 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/dxgi_loader.c 2020-04-08 23:52:42.000000000 +0200 @@ -20,4 +20,4 @@ return fpCreateDXGIFactory1(riid, ppFactory); return DXGI_ERROR_NOT_FOUND; -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/dxgi_loader.h new/Vulkan-Loader-1.2.137/loader/dxgi_loader.h --- old/Vulkan-Loader-1.2.135/loader/dxgi_loader.h 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/dxgi_loader.h 2020-04-08 23:52:42.000000000 +0200 @@ -5,4 +5,4 @@ HRESULT dyn_CreateDXGIFactory1(REFIID riid, void **ppFactory); -#endif \ No newline at end of file +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/generated/vk_dispatch_table_helper.h new/Vulkan-Loader-1.2.137/loader/generated/vk_dispatch_table_helper.h --- old/Vulkan-Loader-1.2.135/loader/generated/vk_dispatch_table_helper.h 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/generated/vk_dispatch_table_helper.h 2020-04-08 23:52:42.000000000 +0200 @@ -91,9 +91,9 @@ static VKAPI_ATTR VkResult VKAPI_CALL StubGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { return VK_SUCCESS; }; static VKAPI_ATTR VkResult VKAPI_CALL StubWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { return VK_SUCCESS; }; static VKAPI_ATTR VkResult VKAPI_CALL StubSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { return VK_SUCCESS; }; -static VKAPI_ATTR void VKAPI_CALL StubGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { }; -static VKAPI_ATTR void VKAPI_CALL StubGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { }; -static VKAPI_ATTR void VKAPI_CALL StubGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { }; +static VKAPI_ATTR VkDeviceAddress VKAPI_CALL StubGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { return 0L; }; +static VKAPI_ATTR uint64_t VKAPI_CALL StubGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { return 0L; }; +static VKAPI_ATTR uint64_t VKAPI_CALL StubGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { return 0L; }; #ifdef VK_ENABLE_BETA_EXTENSIONS static VKAPI_ATTR VkResult VKAPI_CALL StubCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation) { return VK_SUCCESS; }; #endif // VK_ENABLE_BETA_EXTENSIONS @@ -101,7 +101,7 @@ static VKAPI_ATTR void VKAPI_CALL StubDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator) { }; #endif // VK_ENABLE_BETA_EXTENSIONS #ifdef VK_ENABLE_BETA_EXTENSIONS -static VKAPI_ATTR void VKAPI_CALL StubGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation) { }; +static VKAPI_ATTR uint32_t VKAPI_CALL StubGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation) { return 0; }; #endif // VK_ENABLE_BETA_EXTENSIONS #ifdef VK_ENABLE_BETA_EXTENSIONS static VKAPI_ATTR VkResult VKAPI_CALL StubGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation) { return VK_SUCCESS; }; @@ -123,7 +123,8 @@ static VKAPI_ATTR void VKAPI_CALL StubCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index) { }; static VKAPI_ATTR void VKAPI_CALL StubCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) { }; static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride) { }; -static VKAPI_ATTR void VKAPI_CALL StubGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { }; +static VKAPI_ATTR uint32_t VKAPI_CALL StubGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { return 0; }; +static VKAPI_ATTR VkResult VKAPI_CALL StubGetImageViewAddressNVX(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties) { return VK_SUCCESS; }; static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { }; static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { }; static VKAPI_ATTR VkResult VKAPI_CALL StubGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo) { return VK_SUCCESS; }; @@ -191,7 +192,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL StubQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration) { return VK_SUCCESS; }; static VKAPI_ATTR VkResult VKAPI_CALL StubGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue) { return VK_SUCCESS; }; static VKAPI_ATTR void VKAPI_CALL StubSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) { }; -static VKAPI_ATTR void VKAPI_CALL StubGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { }; +static VKAPI_ATTR VkDeviceAddress VKAPI_CALL StubGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { return 0L; }; #ifdef VK_USE_PLATFORM_WIN32_KHR static VKAPI_ATTR VkResult VKAPI_CALL StubAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { return VK_SUCCESS; }; #endif // VK_USE_PLATFORM_WIN32_KHR @@ -252,7 +253,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL StubCreateRayTracingPipelinesKHR(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { return VK_SUCCESS; }; #endif // VK_ENABLE_BETA_EXTENSIONS #ifdef VK_ENABLE_BETA_EXTENSIONS -static VKAPI_ATTR void VKAPI_CALL StubGetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { }; +static VKAPI_ATTR VkDeviceAddress VKAPI_CALL StubGetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { return 0L; }; #endif // VK_ENABLE_BETA_EXTENSIONS #ifdef VK_ENABLE_BETA_EXTENSIONS static VKAPI_ATTR VkResult VKAPI_CALL StubGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData) { return VK_SUCCESS; }; @@ -587,6 +588,8 @@ if (table->CmdDrawIndirectByteCountEXT == nullptr) { table->CmdDrawIndirectByteCountEXT = (PFN_vkCmdDrawIndirectByteCountEXT)StubCmdDrawIndirectByteCountEXT; } table->GetImageViewHandleNVX = (PFN_vkGetImageViewHandleNVX) gpa(device, "vkGetImageViewHandleNVX"); if (table->GetImageViewHandleNVX == nullptr) { table->GetImageViewHandleNVX = (PFN_vkGetImageViewHandleNVX)StubGetImageViewHandleNVX; } + table->GetImageViewAddressNVX = (PFN_vkGetImageViewAddressNVX) gpa(device, "vkGetImageViewAddressNVX"); + if (table->GetImageViewAddressNVX == nullptr) { table->GetImageViewAddressNVX = (PFN_vkGetImageViewAddressNVX)StubGetImageViewAddressNVX; } table->CmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD) gpa(device, "vkCmdDrawIndirectCountAMD"); if (table->CmdDrawIndirectCountAMD == nullptr) { table->CmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD)StubCmdDrawIndirectCountAMD; } table->CmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD) gpa(device, "vkCmdDrawIndexedIndirectCountAMD"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/generated/vk_layer_dispatch_table.h new/Vulkan-Loader-1.2.137/loader/generated/vk_layer_dispatch_table.h --- old/Vulkan-Loader-1.2.135/loader/generated/vk_layer_dispatch_table.h 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/generated/vk_layer_dispatch_table.h 2020-04-08 23:52:42.000000000 +0200 @@ -542,6 +542,7 @@ // ---- VK_NVX_image_view_handle extension commands PFN_vkGetImageViewHandleNVX GetImageViewHandleNVX; + PFN_vkGetImageViewAddressNVX GetImageViewAddressNVX; // ---- VK_AMD_draw_indirect_count extension commands PFN_vkCmdDrawIndirectCountAMD CmdDrawIndirectCountAMD; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/generated/vk_loader_extensions.c new/Vulkan-Loader-1.2.137/loader/generated/vk_loader_extensions.c --- old/Vulkan-Loader-1.2.135/loader/generated/vk_loader_extensions.c 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/generated/vk_loader_extensions.c 2020-04-08 23:52:42.000000000 +0200 @@ -605,6 +605,7 @@ // ---- VK_NVX_image_view_handle extension commands table->GetImageViewHandleNVX = (PFN_vkGetImageViewHandleNVX)gdpa(dev, "vkGetImageViewHandleNVX"); + table->GetImageViewAddressNVX = (PFN_vkGetImageViewAddressNVX)gdpa(dev, "vkGetImageViewAddressNVX"); // ---- VK_AMD_draw_indirect_count extension commands table->CmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD)gdpa(dev, "vkCmdDrawIndirectCountAMD"); @@ -1332,6 +1333,7 @@ // ---- VK_NVX_image_view_handle extension commands if (!strcmp(name, "GetImageViewHandleNVX")) return (void *)table->GetImageViewHandleNVX; + if (!strcmp(name, "GetImageViewAddressNVX")) return (void *)table->GetImageViewAddressNVX; // ---- VK_AMD_draw_indirect_count extension commands if (!strcmp(name, "CmdDrawIndirectCountAMD")) return (void *)table->CmdDrawIndirectCountAMD; @@ -2504,6 +2506,14 @@ return disp->GetImageViewHandleNVX(device, pInfo); } +VKAPI_ATTR VkResult VKAPI_CALL GetImageViewAddressNVX( + VkDevice device, + VkImageView imageView, + VkImageViewAddressPropertiesNVX* pProperties) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + return disp->GetImageViewAddressNVX(device, imageView, pProperties); +} + // ---- VK_AMD_draw_indirect_count extension trampoline/terminators @@ -4223,6 +4233,10 @@ *addr = (void *)GetImageViewHandleNVX; return true; } + if (!strcmp("vkGetImageViewAddressNVX", name)) { + *addr = (void *)GetImageViewAddressNVX; + return true; + } // ---- VK_AMD_draw_indirect_count extension commands if (!strcmp("vkCmdDrawIndirectCountAMD", name)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/gpa_helper.h new/Vulkan-Loader-1.2.137/loader/gpa_helper.h --- old/Vulkan-Loader-1.2.135/loader/gpa_helper.h 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/gpa_helper.h 2020-04-08 23:52:42.000000000 +0200 @@ -229,6 +229,7 @@ if (!strcmp(name, "EnumerateInstanceExtensionProperties")) return vkEnumerateInstanceExtensionProperties; if (!strcmp(name, "EnumerateInstanceLayerProperties")) return vkEnumerateInstanceLayerProperties; if (!strcmp(name, "EnumerateInstanceVersion")) return vkEnumerateInstanceVersion; + if (!strcmp(name, "GetInstanceProcAddr")) return vkGetInstanceProcAddr; return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/loader.c new/Vulkan-Loader-1.2.137/loader/loader.c --- old/Vulkan-Loader-1.2.135/loader/loader.c 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/loader.c 2020-04-08 23:52:42.000000000 +0200 @@ -124,10 +124,6 @@ LOADER_PLATFORM_THREAD_ONCE_DECLARATION(once_init); -// This loader supports Vulkan API version 1.1 -uint32_t loader_major_version = 1; -uint32_t loader_minor_version = 2; - void *loader_instance_heap_alloc(const struct loader_instance *instance, size_t size, VkSystemAllocationScope alloc_scope) { void *pMemory = NULL; #if (DEBUG_DISABLE_APP_ALLOCATORS == 1) @@ -1078,11 +1074,11 @@ // Given string of three part form "maj.min.pat" convert to a vulkan version number. static uint32_t loader_make_version(char *vers_str) { - uint32_t vers = 0, major = 0, minor = 0, patch = 0; + uint32_t major = 0, minor = 0, patch = 0; char *vers_tok; if (!vers_str) { - return vers; + return 0; } vers_tok = strtok(vers_str, ".\"\n\r"); @@ -3862,6 +3858,39 @@ #endif } + // Remove duplicate paths, or it would result in duplicate extensions, duplicate devices, etc. + // This uses minimal memory, but is O(N^2) on the number of paths. Expect only a few paths. + char path_sep_str[2] = {PATH_SEPARATOR, '\0'}; + size_t search_path_updated_size = strlen(search_path); + for (size_t first = 0; first < search_path_updated_size;) { + // If this is an empty path, erase it + if (search_path[first] == PATH_SEPARATOR) { + memmove(&search_path[first], &search_path[first + 1], search_path_updated_size - first + 1); + search_path_updated_size -= 1; + continue; + } + + size_t first_end = first + 1; + first_end += strcspn(&search_path[first_end], path_sep_str); + for (size_t second = first_end + 1; second < search_path_updated_size;) { + size_t second_end = second + 1; + second_end += strcspn(&search_path[second_end], path_sep_str); + if (first_end - first == second_end - second && + !strncmp(&search_path[first], &search_path[second], second_end - second)) { + // Found duplicate. Include PATH_SEPARATOR in second_end, then erase it from search_path. + if (search_path[second_end] == PATH_SEPARATOR) { + second_end++; + } + memmove(&search_path[second], &search_path[second_end], search_path_updated_size - second_end + 1); + search_path_updated_size -= second_end - second; + } else { + second = second_end + 1; + } + } + first = first_end + 1; + } + search_path_size = search_path_updated_size; + // Print out the paths being searched if debugging is enabled if (search_path_size > 0) { loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, @@ -6589,7 +6618,7 @@ if (!dev->extensions.khr_device_group_enabled) { VkPhysicalDeviceProperties properties; icd_term->dispatch.GetPhysicalDeviceProperties(phys_dev_term->phys_dev, &properties); - if (properties.apiVersion >= VK_MAKE_VERSION(1, 1, 0)) { + if (properties.apiVersion >= VK_API_VERSION_1_1) { dev->extensions.khr_device_group_enabled = true; } } @@ -7130,13 +7159,46 @@ *pPropertyCount = all_exts.count; } } else { - // Just return the count; need to add in the count of implicit layer extensions - // don't worry about duplicates being added in the count - *pPropertyCount = icd_ext_count; + // Have to find the number of unique extensions, ie no duplicates, as the properties list returned contains no duplicates. + // Find the current number of extensions (with duplicates). This is the upper bound for the ext_name_list + uint32_t max_exts_num = icd_ext_count; for (uint32_t i = 0; i < implicit_layer_list.count; i++) { - *pPropertyCount += implicit_layer_list.list[i].device_extension_list.count; + max_exts_num += implicit_layer_list.list[i].device_extension_list.count; } + + const struct loader_instance *inst = icd_term->this_instance; + + uint32_t ext_name_count = 0; + char **ext_name_list = loader_instance_heap_alloc(inst, sizeof(char *) * max_exts_num, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); + if (ext_name_list == NULL) { + // Failed to allocate string list, bail + res = VK_ERROR_OUT_OF_HOST_MEMORY; + goto out; + } + + // Look through the implicit_layer_list of device extensions and determine if its not in the ext_name_list, add it if it + // isn't. If it is, ignore it, as it is a duplicate + for (uint32_t i = 0; i < implicit_layer_list.count; i++) { + for (uint32_t j = 0; j < implicit_layer_list.list[i].device_extension_list.count; j++) { + char *extension_name = implicit_layer_list.list[i].device_extension_list.list[j].props.extensionName; + bool in_list = false; + for (uint32_t k = 0; k < ext_name_count; k++) { + if (strncmp(extension_name, ext_name_list[k], 256) == 0) { + in_list = true; + break; + } + } + if (!in_list) { + ext_name_list[ext_name_count] = implicit_layer_list.list[i].device_extension_list.list[j].props.extensionName; + ext_name_count++; + } + } + } + loader_instance_heap_free(inst, ext_name_list); + // Add the device extensions already found. Can't check for duplicates from the devices because the names aren't available + *pPropertyCount = ext_name_count + icd_ext_count; + res = VK_SUCCESS; } @@ -7211,7 +7273,7 @@ terminator_EnumerateInstanceVersion(const VkEnumerateInstanceVersionChain *chain, uint32_t* pApiVersion) { // NOTE: The Vulkan WG doesn't want us checking pApiVersion for NULL, but instead // prefers us crashing. - *pApiVersion = VK_MAKE_VERSION(loader_major_version, loader_minor_version, VK_HEADER_VERSION); + *pApiVersion = VK_HEADER_VERSION_COMPLETE; return VK_SUCCESS; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/loader/trampoline.c new/Vulkan-Loader-1.2.137/loader/trampoline.c --- old/Vulkan-Loader-1.2.135/loader/trampoline.c 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/loader/trampoline.c 2020-04-08 23:52:42.000000000 +0200 @@ -127,7 +127,7 @@ } size_t lib_count = 0; - // Prepend layers onto the chain if they implment this entry point + // Prepend layers onto the chain if they implement this entry point for (uint32_t i = 0; i < layers.count; ++i) { if (!loaderImplicitLayerIsEnabled(NULL, layers.list + i) || layers.list[i].pre_instance_functions.enumerate_instance_extension_properties[0] == '\0') { @@ -221,7 +221,7 @@ } size_t lib_count = 0; - // Prepend layers onto the chain if they implment this entry point + // Prepend layers onto the chain if they implement this entry point for (uint32_t i = 0; i < layers.count; ++i) { if (!loaderImplicitLayerIsEnabled(NULL, layers.list + i) || layers.list[i].pre_instance_functions.enumerate_instance_layer_properties[0] == '\0') { @@ -315,7 +315,7 @@ } size_t lib_count = 0; - // Prepend layers onto the chain if they implment this entry point + // Prepend layers onto the chain if they implement this entry point for (uint32_t i = 0; i < layers.count; ++i) { if (!loaderImplicitLayerIsEnabled(NULL, layers.list + i) || layers.list[i].pre_instance_functions.enumerate_instance_version[0] == '\0') { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/scripts/dispatch_table_helper_generator.py new/Vulkan-Loader-1.2.137/scripts/dispatch_table_helper_generator.py --- old/Vulkan-Loader-1.2.135/scripts/dispatch_table_helper_generator.py 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/scripts/dispatch_table_helper_generator.py 2020-04-08 23:52:42.000000000 +0200 @@ -25,6 +25,11 @@ from collections import namedtuple from common_codegen import * +return_type_table = {"VkResult": "VK_SUCCESS", + "uint32_t": "0", + "uint64_t": "0L", + "VkDeviceAddress": "0L"} + # # DispatchTableHelperOutputGeneratorOptions - subclass of GeneratorOptions. class DispatchTableHelperOutputGeneratorOptions(GeneratorOptions): @@ -168,17 +173,18 @@ if "VK_VERSION" not in self.featureName and self.extension_type == 'device': self.device_extension_list.append(name) # Build up stub function - return_type = '' decl = self.makeCDecls(cmdinfo.elem)[1] - if 'typedef VkResult' in decl: - return_type = 'return VK_SUCCESS;' + return_type = cmdinfo.elem.find('proto/type').text + return_statement = "" # default type is void, so no return type + try: + return_statement = 'return ' + return_type_table[return_type] + ';' + except KeyError: + if return_type != "void": + raise AssertionError("return_type_table does not contain all possible types. Add an entry for `" + return_type + "`.") decl = decl.split('*PFN_vk')[1] decl = decl.replace(')(', '(') - if return_type == '': - decl = 'static VKAPI_ATTR void VKAPI_CALL Stub' + decl - else: - decl = 'static VKAPI_ATTR VkResult VKAPI_CALL Stub' + decl - func_body = ' { ' + return_type + ' };' + decl = 'static VKAPI_ATTR ' + return_type + ' VKAPI_CALL Stub' + decl + func_body = ' { ' + return_statement + ' };' decl = decl.replace (';', func_body) if self.featureExtraProtect is not None: self.dev_ext_stub_list.append('#ifdef %s' % self.featureExtraProtect) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/scripts/known_good.json new/Vulkan-Loader-1.2.137/scripts/known_good.json --- old/Vulkan-Loader-1.2.135/scripts/known_good.json 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/scripts/known_good.json 2020-04-08 23:52:42.000000000 +0200 @@ -6,7 +6,7 @@ "sub_dir" : "Vulkan-Headers", "build_dir" : "Vulkan-Headers/build", "install_dir" : "Vulkan-Headers/build/install", - "commit" : "v1.2.135" + "commit" : "v1.2.137" } ], "install_names" : { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/tests/layers/vk_layer_utils.h new/Vulkan-Loader-1.2.137/tests/layers/vk_layer_utils.h --- old/Vulkan-Loader-1.2.135/tests/layers/vk_layer_utils.h 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/tests/layers/vk_layer_utils.h 2020-04-08 23:52:42.000000000 +0200 @@ -88,8 +88,6 @@ extern "C" { #endif -#define VK_LAYER_API_VERSION VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION) - typedef enum VkStringErrorFlagBits { VK_STRING_ERROR_NONE = 0x00000000, VK_STRING_ERROR_LENGTH = 0x00000001, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/tests/layers/wrap_objects.cpp new/Vulkan-Loader-1.2.137/tests/layers/wrap_objects.cpp --- old/Vulkan-Loader-1.2.135/tests/layers/wrap_objects.cpp 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/tests/layers/wrap_objects.cpp 2020-04-08 23:52:42.000000000 +0200 @@ -31,7 +31,10 @@ namespace wrap_objects { static const VkLayerProperties global_layer = { - "VK_LAYER_LUNARG_wrap_objects", VK_LAYER_API_VERSION, 1, "LunarG Test Layer", + "VK_LAYER_LUNARG_wrap_objects", + VK_HEADER_VERSION_COMPLETE, + 1, + "LunarG Test Layer", }; static uint32_t loader_layer_if_version = CURRENT_LOADER_LAYER_INTERFACE_VERSION; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vulkan-Loader-1.2.135/tests/run_loader_tests.sh new/Vulkan-Loader-1.2.137/tests/run_loader_tests.sh --- old/Vulkan-Loader-1.2.135/tests/run_loader_tests.sh 2020-03-17 22:20:26.000000000 +0100 +++ new/Vulkan-Loader-1.2.137/tests/run_loader_tests.sh 2020-04-08 23:52:42.000000000 +0200 @@ -45,9 +45,9 @@ echo "Environment Variable Path test FAILED - Implicit layer path incorrect" >&2 exit 1 fi - # Sadly, the loader does not clean up this path and just stumbles through it. - # So just make sure it is the same. - right_path="${vk_layer_path}" + # The loader cleans up this path to remove the empty paths, so we need to clean up the right path, too + right_path="${vk_layer_path//:::::/:}" + right_path="${right_path//::::/:}" echo "$output" | grep -q "$right_path" ec=$? if [ $ec -eq 1 ]
