git: 12e8dd9d6973 - main - graphics/vulkan-validation-layers: unbreak runtime after a9528c27d99c

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Thu, 12 Jan 2023 16:22:43 UTC
The branch main has been updated by jbeich:

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

commit 12e8dd9d6973f485d1b1ff913e0eab6e676620d2
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-01-12 16:17:33 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-01-12 16:21:31 +0000

    graphics/vulkan-validation-layers: unbreak runtime after a9528c27d99c
    
    $ vkcube-xcb --validate
    WARNING : VALIDATION - Message Id Number: 2044605652 | Message Id Name: VUID_Undefined
            Validation Warning: [ VUID_Undefined ] Object 0: handle = 0x8285d0000, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x79de34d4 | Instance Extension VK_KHR_xcb_surface is not supported by this layer.  Using this extension may adversely affect validation results and/or produce undefined behavior.
    
            Objects - 1
                    Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 0x8285d0000
    
    Selected GPU 0: Intel(R) HD Graphics 530 (SKL GT2), type: IntegratedGpu
    ERROR : VALIDATION - Message Id Number: -2145442690 | Message Id Name: VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter
            Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter ] Object 0: handle = 0x8285d0000, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x801f247e | Invalid VkSurfaceKHR Object 0x8285c8870. The Vulkan spec states: surface must be a valid VkSurfaceKHR handle (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter)
    
            Objects - 1
                    Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 0x8285d0000
    
    ERROR : VALIDATION - Message Id Number: 1567320034 | Message Id Name: UNASSIGNED-Threading-Info
            Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0x8285c8870, type = VK_OBJECT_TYPE_SURFACE_KHR; | MessageID = 0x5d6b67e2 | Couldn't find VkSurfaceKHR Object 0x8285c8870. This should not happen and may indicate a bug in the application.
    
            Objects - 1
                    Object[0] - VK_OBJECT_TYPE_SURFACE_KHR, Handle 0x8285c8870
    
    Segmentation fault
---
 graphics/vulkan-validation-layers/Makefile | 4 ++++
 graphics/vulkan-validation-layers/distinfo | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/graphics/vulkan-validation-layers/Makefile b/graphics/vulkan-validation-layers/Makefile
index 4f2216ebe11d..fd5a8308a3ee 100644
--- a/graphics/vulkan-validation-layers/Makefile
+++ b/graphics/vulkan-validation-layers/Makefile
@@ -1,8 +1,12 @@
 PORTNAME=	vulkan-validation-layers
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.3.238
+PORTREVISION=	1
 CATEGORIES=	graphics
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+=	f4d438f73a52.patch:-p1 # https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/5098
+
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	Validation layers for the Vulkan graphics API
 WWW=		https://github.com/KhronosGroup/Vulkan-ValidationLayers
diff --git a/graphics/vulkan-validation-layers/distinfo b/graphics/vulkan-validation-layers/distinfo
index 99b01b764c31..3f471eed016f 100644
--- a/graphics/vulkan-validation-layers/distinfo
+++ b/graphics/vulkan-validation-layers/distinfo
@@ -3,3 +3,5 @@ SHA256 (KhronosGroup-Vulkan-ValidationLayers-v1.3.238_GH0.tar.gz) = 03bc5843ef96
 SIZE (KhronosGroup-Vulkan-ValidationLayers-v1.3.238_GH0.tar.gz) = 4523932
 SHA256 (KhronosGroup-SPIRV-Headers-1.5.4.raytracing.fixed-207-g1d31a10_GH0.tar.gz) = 696f3dddde6d732155140131eceba2b290e0e7a7eea18c39bc687a08fce733f1
 SIZE (KhronosGroup-SPIRV-Headers-1.5.4.raytracing.fixed-207-g1d31a10_GH0.tar.gz) = 445575
+SHA256 (f4d438f73a52.patch) = ad27fdfc602e59a1ae300d2a49da0c2736cd4e142ebd93a7786a3f75fd1569d3
+SIZE (f4d438f73a52.patch) = 861