diff --git a/graphics/vulkan-tools/Makefile b/graphics/vulkan-tools/Makefile index a0471ab0b99d..c21d9369339d 100644 --- a/graphics/vulkan-tools/Makefile +++ b/graphics/vulkan-tools/Makefile @@ -1,61 +1,64 @@ PORTNAME= vulkan-tools DISTVERSIONPREFIX= v DISTVERSION= 1.2.181 CATEGORIES= graphics +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES+= 02897e9cb615.patch:-p1 # https://github.com/KhronosGroup/Vulkan-Tools/pull/536 + MAINTAINER= jbeich@FreeBSD.org COMMENT= Tools and demos for the Vulkan graphics API LICENSE= APACHE20 BUILD_DEPENDS= glslangValidator:graphics/glslang \ vulkan-headers>0:graphics/vulkan-headers LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader USES= cmake compiler:c++11-lib pkgconfig python:3.4+,build USE_GITHUB= yes GH_ACCOUNT= KhronosGroup GH_PROJECT= Vulkan-Tools CMAKE_OFF= BUILD_CUBE BUILD_ICD CMAKE_ARGS= -DGLSLANG_INSTALL_DIR:PATH="${LOCALBASE}" OPTIONS_DEFINE= WAYLAND XCB XLIB OPTIONS_DEFAULT= WAYLAND XCB XLIB OPTIONS_SLAVE= DISPLAY OPTIONS_SUB= yes WAYLAND_BUILD_DEPENDS= evdev-proto>0:devel/evdev-proto \ wayland-protocols>0:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland WAYLAND_CMAKE_BOOL= BUILD_WSI_WAYLAND_SUPPORT XCB_DESC= ${X11_DESC} via libxcb XCB_USES= xorg XCB_USE= XORG=xcb XCB_CMAKE_BOOL= BUILD_WSI_XCB_SUPPORT XLIB_DESC= ${X11_DESC} via libX11 XLIB_USES= xorg XLIB_USE= XORG=x11,xext,ice,sm XLIB_CMAKE_BOOL= BUILD_WSI_XLIB_SUPPORT # https://github.com/KhronosGroup/Vulkan-Tools/issues/307 .for _wsi in display wayland xcb xlib do-configure-${_wsi:tu}-on: ${_wsi}-configure ${_wsi}-configure: @${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} \ -DBUILD_CUBE:BOOL=ON -DBUILD_VULKANINFO:BOOL=OFF \ -DCUBE_WSI_SELECTION:STRING=${_wsi:tu} \ -B${CONFIGURE_WRKSRC}-${_wsi} do-build-${_wsi:tu}-on: ${_wsi}-build ${_wsi}-build: @${SETENV} ${MAKE_ENV} ${CMAKE_BIN} --build ${BUILD_WRKSRC}-${_wsi} do-install-${_wsi:tu}-on: ${_wsi}-install ${_wsi}-install: . for _file in vkcube vkcubepp ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}-${_wsi}/cube/${_file} \ ${STAGEDIR}${PREFIX}/bin/${_file}-${_wsi} . endfor .endfor .include diff --git a/graphics/vulkan-tools/distinfo b/graphics/vulkan-tools/distinfo index 48e6a5b4c9d6..0ea6f770aaec 100644 --- a/graphics/vulkan-tools/distinfo +++ b/graphics/vulkan-tools/distinfo @@ -1,3 +1,5 @@ TIMESTAMP = 1623697343 SHA256 (KhronosGroup-Vulkan-Tools-v1.2.181_GH0.tar.gz) = 903e03264d6dedc8c9d73d5044f0886e60de79b6849a062c3bd9a69a7667d069 SIZE (KhronosGroup-Vulkan-Tools-v1.2.181_GH0.tar.gz) = 846689 +SHA256 (02897e9cb615.patch) = 040384f564b8d174a17a9236bdfd80deac8ec848c37cea9049cbeb2f25574215 +SIZE (02897e9cb615.patch) = 1120 diff --git a/graphics/vulkan-tools/files/patch-werror b/graphics/vulkan-tools/files/patch-werror index 129e4f155f35..4ec9e9c6c9ca 100644 --- a/graphics/vulkan-tools/files/patch-werror +++ b/graphics/vulkan-tools/files/patch-werror @@ -1,52 +1,22 @@ Silence Clang warnings that GCC ignores -https://github.com/KhronosGroup/Vulkan-Tools/issues/531 https://github.com/KhronosGroup/Vulkan-Tools/issues/532 ---- cube/cube.c.orig 2021-06-14 19:02:23 UTC -+++ cube/cube.c -@@ -3027,12 +3027,12 @@ static VkResult demo_create_display_surface(struct dem - VkDisplayPlaneCapabilitiesKHR planeCaps; - vkGetDisplayPlaneCapabilitiesKHR(demo->gpu, mode_props.displayMode, plane_index, &planeCaps); - // Find a supported alpha mode -- VkCompositeAlphaFlagBitsKHR alphaMode = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR; -+ VkCompositeAlphaFlagBitsKHR alphaMode = (VkCompositeAlphaFlagBitsKHR)VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR; - VkCompositeAlphaFlagBitsKHR alphaModes[4] = { -- VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR, -- VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR, -- VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR, -- VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR, -+ (VkCompositeAlphaFlagBitsKHR)VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR, -+ (VkCompositeAlphaFlagBitsKHR)VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR, -+ (VkCompositeAlphaFlagBitsKHR)VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR, -+ (VkCompositeAlphaFlagBitsKHR)VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR, - }; - for (uint32_t i = 0; i < sizeof(alphaModes); i++) { - if (planeCaps.supportedAlpha & alphaModes[i]) { -@@ -3050,7 +3050,7 @@ static VkResult demo_create_display_surface(struct dem - create_info.planeIndex = plane_index; - create_info.planeStackIndex = plane_props[plane_index].currentStackIndex; - create_info.transform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; -- create_info.alphaMode = alphaMode; -+ create_info.alphaMode = (VkDisplayPlaneAlphaFlagBitsKHR)alphaMode; - create_info.globalAlpha = 1.0f; - create_info.imageExtent = image_extent; - --- cube/cube.cpp.orig 2021-06-14 19:02:23 UTC +++ cube/cube.cpp @@ -405,16 +405,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM #endif #if defined(VK_USE_PLATFORM_WAYLAND_KHR) -static void handle_ping(void *data, wl_shell_surface *shell_surface, uint32_t serial) { - wl_shell_surface_pong(shell_surface, serial); -} - -static void handle_configure(void *data, wl_shell_surface *shell_surface, uint32_t edges, int32_t width, int32_t height) {} - -static void handle_popup_done(void *data, wl_shell_surface *shell_surface) {} - -static const wl_shell_surface_listener shell_surface_listener = {handle_ping, handle_configure, handle_popup_done}; - static void pointer_handle_enter(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t sx, wl_fixed_t sy) {}