git: 1b2196e50148 - main - graphics/vulkan-loader: update to 1.2.211

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 06 Apr 2022 20:49:00 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1b2196e50148c4825627b32903f7ced5014ebcd3

commit 1b2196e50148c4825627b32903f7ced5014ebcd3
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-04-05 17:27:27 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-04-06 20:48:47 +0000

    graphics/vulkan-loader: update to 1.2.211
    
    Changes:        https://github.com/KhronosGroup/Vulkan-Loader/compare/v1.3.210...v1.3.211
    Reported by:    Repology, portscout
---
 graphics/vulkan-loader/Makefile         |  3 +--
 graphics/vulkan-loader/distinfo         |  6 ++---
 graphics/vulkan-loader/files/patch-i386 | 40 +++++++++++++++++++++++++++++++++
 graphics/vulkan-loader/pkg-plist        |  2 +-
 4 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/graphics/vulkan-loader/Makefile b/graphics/vulkan-loader/Makefile
index 0799900554be..b36e6feb4240 100644
--- a/graphics/vulkan-loader/Makefile
+++ b/graphics/vulkan-loader/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	vulkan-loader
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.3.210
-PORTREVISION=	1
+DISTVERSION=	1.3.211
 CATEGORIES=	graphics devel
 
 MAINTAINER=	jbeich@FreeBSD.org
diff --git a/graphics/vulkan-loader/distinfo b/graphics/vulkan-loader/distinfo
index cf57acfa14e4..3843d659bc0e 100644
--- a/graphics/vulkan-loader/distinfo
+++ b/graphics/vulkan-loader/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1648835708
-SHA256 (KhronosGroup-Vulkan-Loader-v1.3.210_GH0.tar.gz) = 85b441cb985acd4dfa55f7b7d8b4b6a758060edeb92cf72ffb3869807d097b67
-SIZE (KhronosGroup-Vulkan-Loader-v1.3.210_GH0.tar.gz) = 1579013
+TIMESTAMP = 1649179647
+SHA256 (KhronosGroup-Vulkan-Loader-v1.3.211_GH0.tar.gz) = 1d889f093a85700f38be5d0047694c4d8c59f99e277fbe2dc781969c8f9537be
+SIZE (KhronosGroup-Vulkan-Loader-v1.3.211_GH0.tar.gz) = 1582562
diff --git a/graphics/vulkan-loader/files/patch-i386 b/graphics/vulkan-loader/files/patch-i386
new file mode 100644
index 000000000000..2b0b64e759ff
--- /dev/null
+++ b/graphics/vulkan-loader/files/patch-i386
@@ -0,0 +1,40 @@
+Partially revert https://github.com/KhronosGroup/Vulkan-Loader/commit/aeec557162da
+to fix https://github.com/KhronosGroup/Vulkan-Loader/issues/909
+
+--- loader/unknown_ext_chain_gas_x86.S.orig	2022-04-05 17:27:27 UTC
++++ loader/unknown_ext_chain_gas_x86.S
+@@ -99,14 +99,14 @@ terminError\num:
+     mov     [esp + 4], ecx                                                      # Copy the unwrapped VkPhysicalDevice into the first arg
+     jmp     [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))]              # Jump to the next function in the chain
+ terminError\num:
+-    mov     eax, dword ptr [eax + INSTANCE_OFFSET_ICD_TERM]                       # Load the loader_instance into eax
+-    push    dword ptr [eax + (FUNCTION_OFFSET_INSTANCE + (CHAR_PTR_SIZE * \num))] # Push the func name (fifth arg)
+-    push    offset termin_error_string                                            # Push the error string (fourth arg)
+-    push    0                                                                     # Push zero (third arg)
+-    push    VULKAN_LOADER_ERROR_BIT                                               # Push the error logging bit (second arg)
+-    push    eax                                                                   # Push the loader_instance (first arg)
+-    call    loader_log                                                            # Log the error message before we crash
+-    add     esp, 20                                                               # Clean up the args
++    mov     eax, [eax + INSTANCE_OFFSET_ICD_TERM]                       # Load the loader_instance into eax
++    push    [eax + (FUNCTION_OFFSET_INSTANCE + (CHAR_PTR_SIZE * \num))] # Push the func name (fifth arg)
++    push    offset termin_error_string@GOT                              # Push the error string (fourth arg)
++    push    0                                                           # Push zero (third arg)
++    push    VULKAN_LOADER_ERROR_BIT                                     # Push the error logging bit (second arg)
++    push    eax                                                         # Push the loader_instance (first arg)
++    call    loader_log                                                  # Log the error message before we crash
++    add     esp, 20                                                     # Clean up the args
+     mov     eax, 0
+     jmp     eax                                                         # Crash intentionally by jumping to address zero
+ .endm
+@@ -115,9 +115,8 @@ vkdev_ext\num:
+ .global vkdev_ext\num
+ vkdev_ext\num:
+     _CET_ENDBR
+-    mov     eax, dword ptr [esp + 4]                                            # Dereference the handle to get the dispatch table
+-    mov     eax, dword ptr [eax]                                                # Dereference the chain_device to get the loader_dispatch
+-    jmp     dword ptr [eax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * \num))]  # Jump to the appropriate call chain
++    mov     eax, [esp + 4]                                                      # Dereference the handle to get the dispatch table
++    jmp     [eax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * \num))]            # Jump to the appropriate call chain
+ .endm
+ 
+ .endif
diff --git a/graphics/vulkan-loader/pkg-plist b/graphics/vulkan-loader/pkg-plist
index d27c3c1daf09..80344eb5be21 100644
--- a/graphics/vulkan-loader/pkg-plist
+++ b/graphics/vulkan-loader/pkg-plist
@@ -1,4 +1,4 @@
 lib/libvulkan.so
 lib/libvulkan.so.1
-lib/libvulkan.so.1.3.210
+lib/libvulkan.so.1.3.211
 libdata/pkgconfig/vulkan.pc