diff --git a/graphics/filament/Makefile b/graphics/filament/Makefile index c9e5453f2e31..e1a01d239a90 100644 --- a/graphics/filament/Makefile +++ b/graphics/filament/Makefile @@ -1,53 +1,53 @@ PORTNAME= filament DISTVERSIONPREFIX= v -DISTVERSION= 1.37.0 +DISTVERSION= 1.38.0 CATEGORIES= graphics MAINTAINER= yuri@FreeBSD.org COMMENT= Real-time physically based rendering engine WWW= https://google.github.io/filament/ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_armv7= compilation breaks: unexpected token in operand, see https://github.com/google/filament/issues/6131 BROKEN_i386= compilation breaks: register r11 is only available in 64-bit mode BUILD_DEPENDS= bash:shells/bash \ evdev-proto>0:devel/evdev-proto USES= cmake compiler:c++17-lang localbase:ldflags python:build sdl shebangfix xorg USE_SDL= sdl2 USE_XORG= x11 USE_GITHUB= yes GH_ACCOUNT= google SHEBANG_FILES= build/launch-c.in build/launch-cxx.in #CMAKE_ON= BUILD_SHARED_LIBS # not yet supported, see https://github.com/google/filament/issues/1075 CMAKE_OFF= USE_STATIC_LIBCXX FILAMENT_ENABLE_JAVA CMAKE_ARGS+= -DDIST_DIR="." # prevent subdirectory for libraries CMAKE_ARGS+= -DUSE_CCACHE:BOOL=${CCACHE_ENABLED:tu} CMAKE_ARGS+= -DPython3_EXECUTABLE=${PYTHON_CMD} LDFLAGS+= -lexecinfo -lSDL2 OPTIONS_DEFINE= SAMPLES OPTIONS_SUB= yes SAMPLES_DESC= Build samples SAMPLES_CMAKE_OFF= -DFILAMENT_SKIP_SAMPLES=ON # gltf_viewer is broken with the Vulkan backend, see https://github.com/google/filament/issues/6445 post-patch: @${REINPLACE_CMD} -e 's|"/proc/self/exe"|"/proc/curproc/file"|' ${WRKSRC}/libs/utils/src/linux/Path.cpp post-install: # remove unnecessary files @cd ${STAGEDIR}${PREFIX} && ${RM} -r README.md LICENSE docs # remove conflicting file, see https://github.com/google/filament/issues/5957 @${RM} ${STAGEDIR}${PREFIX}/lib/libzstd.a .include diff --git a/graphics/filament/distinfo b/graphics/filament/distinfo index fbdc1556c4bc..01761fcd06c6 100644 --- a/graphics/filament/distinfo +++ b/graphics/filament/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1685637225 -SHA256 (google-filament-v1.37.0_GH0.tar.gz) = 7d9504b19615975bf834c1e0225bc818145e16e0b59336938756f07d0906d8fb -SIZE (google-filament-v1.37.0_GH0.tar.gz) = 500505901 +TIMESTAMP = 1686269588 +SHA256 (google-filament-v1.38.0_GH0.tar.gz) = 905df6a0078be147fc78fce5b2d5ae9d0cf5a25e849c0e439fdf6f00c8464be4 +SIZE (google-filament-v1.38.0_GH0.tar.gz) = 500623474 diff --git a/graphics/filament/files/patch-filament_backend_src_vulkan_platform_PlatformVulkanAndroidLinuxWindows.cpp b/graphics/filament/files/patch-filament_backend_src_vulkan_platform_VulkanPlatformAndroidLinuxWindows.cpp similarity index 55% rename from graphics/filament/files/patch-filament_backend_src_vulkan_platform_PlatformVulkanAndroidLinuxWindows.cpp rename to graphics/filament/files/patch-filament_backend_src_vulkan_platform_VulkanPlatformAndroidLinuxWindows.cpp index 29208b26ecfd..74cdbf43622a 100644 --- a/graphics/filament/files/patch-filament_backend_src_vulkan_platform_PlatformVulkanAndroidLinuxWindows.cpp +++ b/graphics/filament/files/patch-filament_backend_src_vulkan_platform_VulkanPlatformAndroidLinuxWindows.cpp @@ -1,54 +1,65 @@ -- workaround for https://github.com/google/filament/issues/6861 - ---- filament/backend/src/vulkan/platform/PlatformVulkanAndroidLinuxWindows.cpp.orig 2023-06-01 16:53:44 UTC -+++ filament/backend/src/vulkan/platform/PlatformVulkanAndroidLinuxWindows.cpp +--- filament/backend/src/vulkan/platform/VulkanPlatformAndroidLinuxWindows.cpp.orig 2023-06-09 00:40:30 UTC ++++ filament/backend/src/vulkan/platform/VulkanPlatformAndroidLinuxWindows.cpp +@@ -26,9 +26,9 @@ + // Platform specific includes and defines + #if defined(__ANDROID__) + #include +-#elif defined(__linux__) && defined(FILAMENT_SUPPORTS_GGP) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(FILAMENT_SUPPORTS_GGP) + #include +-#elif defined(__linux__) && defined(FILAMENT_SUPPORTS_WAYLAND) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(FILAMENT_SUPPORTS_WAYLAND) + #include + namespace { + typedef struct _wl { @@ -38,7 +38,7 @@ uint32_t height; } wl; }// anonymous namespace -#elif defined(__linux__) && defined(FILAMENT_SUPPORTS_X11) +#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(FILAMENT_SUPPORTS_X11) + // TODO: we should allow for headless on Linux explicitly. Right now this is the headless path + // (with no FILAMENT_SUPPORTS_XCB or FILAMENT_SUPPORTS_XLIB). #include - #if defined(FILAMENT_SUPPORTS_XCB) - #include -@@ -83,11 +83,11 @@ Driver* PlatformVulkan::createDriver(void* const share - static const char* requiredInstanceExtensions[] = { +@@ -82,11 +82,11 @@ VulkanPlatform::ExtensionSet VulkanPlatform::getRequir + VulkanPlatform::ExtensionSet ret; #if defined(__ANDROID__) - "VK_KHR_android_surface", + ret.insert("VK_KHR_android_surface"); - #elif defined(__linux__) && defined(FILAMENT_SUPPORTS_GGP) + #elif (defined(__linux__) || defined(__FreeBSD__)) && defined(FILAMENT_SUPPORTS_GGP) - VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME, - #elif defined(__linux__) && defined(FILAMENT_SUPPORTS_WAYLAND) - "VK_KHR_wayland_surface", + ret.insert(VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME); +- #elif defined(__linux__) && defined(FILAMENT_SUPPORTS_WAYLAND) ++ #elif (defined(__linux__) || defined(__FreeBSD__)) && defined(FILAMENT_SUPPORTS_WAYLAND) + ret.insert("VK_KHR_wayland_surface"); - #elif defined(__linux__) && defined(FILAMENT_SUPPORTS_X11) + #elif (defined(__linux__) || defined(__FreeBSD__)) && defined(FILAMENT_SUPPORTS_X11) #if defined(FILAMENT_SUPPORTS_XCB) - "VK_KHR_xcb_surface", + ret.insert("VK_KHR_xcb_surface"); #endif -@@ -121,7 +121,7 @@ PlatformVulkan::SurfaceBundle PlatformVulkan::createVk +@@ -117,7 +117,7 @@ VulkanPlatform::SurfaceBundle VulkanPlatform::createVk VkResult const result = vkCreateAndroidSurfaceKHR(instance, &createInfo, VKALLOC, - (VkSurfaceKHR*) &bundle.surface); + (VkSurfaceKHR*) &surface); ASSERT_POSTCONDITION(result == VK_SUCCESS, "vkCreateAndroidSurfaceKHR error."); - #elif defined(__linux__) && defined(FILAMENT_SUPPORTS_GGP) + #elif (defined(__linux__) || defined(__FreeBSD__)) && defined(FILAMENT_SUPPORTS_GGP) VkStreamDescriptorSurfaceCreateInfoGGP const surface_create_info = { .sType = VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP, .streamDescriptor = kGgpPrimaryStreamDescriptor, -@@ -135,7 +135,7 @@ PlatformVulkan::SurfaceBundle PlatformVulkan::createVk +@@ -131,7 +131,7 @@ VulkanPlatform::SurfaceBundle VulkanPlatform::createVk VkResult const result = fpCreateStreamDescriptorSurfaceGGP(instance, &surface_create_info, - nullptr, (VkSurfaceKHR*) &bundle.surface); + nullptr, (VkSurfaceKHR*) &surface); ASSERT_POSTCONDITION(result == VK_SUCCESS, "vkCreateStreamDescriptorSurfaceGGP error."); - #elif defined(__linux__) && defined(FILAMENT_SUPPORTS_WAYLAND) + #elif (defined(__linux__) || defined(__FreeBSD__)) && defined(FILAMENT_SUPPORTS_WAYLAND) wl* ptrval = reinterpret_cast(nativeWindow); - bundle.width = ptrval->width; - bundle.height = ptrval->height; -@@ -150,7 +150,7 @@ PlatformVulkan::SurfaceBundle PlatformVulkan::createVk + extent.width = ptrval->width; + extent.height = ptrval->height; +@@ -146,7 +146,7 @@ VulkanPlatform::SurfaceBundle VulkanPlatform::createVk VkResult const result = vkCreateWaylandSurfaceKHR(instance, &createInfo, VKALLOC, - (VkSurfaceKHR*) &bundle.surface); + (VkSurfaceKHR*) &surface); ASSERT_POSTCONDITION(result == VK_SUCCESS, "vkCreateWaylandSurfaceKHR error."); - #elif defined(__linux__) && defined(FILAMENT_SUPPORTS_X11) + #elif (defined(__linux__) || defined(__FreeBSD__)) && defined(FILAMENT_SUPPORTS_X11) if (g_x11_vk.library == nullptr) { g_x11_vk.library = dlopen(LIBRARY_X11, RTLD_LOCAL | RTLD_NOW); ASSERT_PRECONDITION(g_x11_vk.library, "Unable to open X11 library.");