git: c321f8141937 - main - graphics/vulkan-loader: switch to upstream i386 fix after 6f7ec57256db

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

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

commit c321f8141937a97b5b775694e9b5cd4bfc2f9b47
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-04-06 22:38:30 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-04-06 22:41:07 +0000

    graphics/vulkan-loader: switch to upstream i386 fix after 6f7ec57256db
---
 graphics/vulkan-loader/Makefile         |  3 +++
 graphics/vulkan-loader/distinfo         |  2 ++
 graphics/vulkan-loader/files/patch-i386 | 40 ---------------------------------
 3 files changed, 5 insertions(+), 40 deletions(-)

diff --git a/graphics/vulkan-loader/Makefile b/graphics/vulkan-loader/Makefile
index b36e6feb4240..921ab1305f8c 100644
--- a/graphics/vulkan-loader/Makefile
+++ b/graphics/vulkan-loader/Makefile
@@ -3,6 +3,9 @@ DISTVERSIONPREFIX=	v
 DISTVERSION=	1.3.211
 CATEGORIES=	graphics devel
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+=	e7f0c7535447.patch:-p1 # https://github.com/KhronosGroup/Vulkan-Loader/pull/910
+
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	Driver loader for the Vulkan graphics API
 
diff --git a/graphics/vulkan-loader/distinfo b/graphics/vulkan-loader/distinfo
index 3843d659bc0e..9071a6724af6 100644
--- a/graphics/vulkan-loader/distinfo
+++ b/graphics/vulkan-loader/distinfo
@@ -1,3 +1,5 @@
 TIMESTAMP = 1649179647
 SHA256 (KhronosGroup-Vulkan-Loader-v1.3.211_GH0.tar.gz) = 1d889f093a85700f38be5d0047694c4d8c59f99e277fbe2dc781969c8f9537be
 SIZE (KhronosGroup-Vulkan-Loader-v1.3.211_GH0.tar.gz) = 1582562
+SHA256 (e7f0c7535447.patch) = 73c00c6693023886c541b89d44ba028d9f32b9f9395737a2c94afaf58b0414e2
+SIZE (e7f0c7535447.patch) = 1467
diff --git a/graphics/vulkan-loader/files/patch-i386 b/graphics/vulkan-loader/files/patch-i386
deleted file mode 100644
index 2b0b64e759ff..000000000000
--- a/graphics/vulkan-loader/files/patch-i386
+++ /dev/null
@@ -1,40 +0,0 @@
-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