From aa2ec03c4c8850cd564fbf108415bbb4bbee49d3 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Tue, 10 Mar 2026 19:52:27 -0400 Subject: [PATCH] media-libs/libplacebo: backport vulkan fix for nvidia-595.x This workaround was already needed on Windows, but seems whatever was causing this there was now added to the Linux drivers as well. Previous libplacebo was not affected given using deferred alloc is new to this version, so this just reverts to the previous state for NVIDIA users and lets it be used for other cards. I'd hope there will be a new release soon, but given this sometimes drag may as well backport right away. Signed-off-by: Ionen Wolkens --- .../libplacebo-7.360.0-nvidia595-vulkan.patch | 25 +++++++++++++++++++ ....0.ebuild => libplacebo-7.360.0-r1.ebuild} | 1 + 2 files changed, 26 insertions(+) create mode 100644 media-libs/libplacebo/files/libplacebo-7.360.0-nvidia595-vulkan.patch rename media-libs/libplacebo/{libplacebo-7.360.0.ebuild => libplacebo-7.360.0-r1.ebuild} (98%) diff --git a/media-libs/libplacebo/files/libplacebo-7.360.0-nvidia595-vulkan.patch b/media-libs/libplacebo/files/libplacebo-7.360.0-nvidia595-vulkan.patch new file mode 100644 index 0000000000000..3eebf5b2b2a66 --- /dev/null +++ b/media-libs/libplacebo/files/libplacebo-7.360.0-nvidia595-vulkan.patch @@ -0,0 +1,25 @@ +See comment below for explanation/links, this seemingly started being +an issue on Linux with nvidia-drivers-595.45.04 +--- a/src/vulkan/swapchain.c ++++ b/src/vulkan/swapchain.c +@@ -736,13 +736,13 @@ + + bool use_deferred_alloc = p->has_swapchain_maintenance1; +-#ifdef _WIN32 +- // NVIDIA's Windows drivers have a bug where using deferred memory allocation +- // causes crashes in the driver. It's unclear why exactly it happens, seems +- // to be driver internal thread, calling into d3d12core.dll. Might be some +- // overlay or who knows, disable it for now. +- // See for more info . ++ ++ // NVIDIA's drivers have a bug where using deferred memory allocation ++ // causes crashes in the driver. It's unclear why exactly it happens, but ++ // the issue is consistent across Windows and Linux drivers. ++ // See for more info , ++ // + if (vk->props.vendorID == VK_VENDOR_ID_NVIDIA) + use_deferred_alloc = false; +-#endif ++ + if (use_deferred_alloc) + sinfo.flags |= VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR; diff --git a/media-libs/libplacebo/libplacebo-7.360.0.ebuild b/media-libs/libplacebo/libplacebo-7.360.0-r1.ebuild similarity index 98% rename from media-libs/libplacebo/libplacebo-7.360.0.ebuild rename to media-libs/libplacebo/libplacebo-7.360.0-r1.ebuild index d80cf072182de..693ae37246cfb 100644 --- a/media-libs/libplacebo/libplacebo-7.360.0.ebuild +++ b/media-libs/libplacebo/libplacebo-7.360.0-r1.ebuild @@ -69,6 +69,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-5.229.1-llvm-libunwind.patch + "${FILESDIR}"/${P}-nvidia595-vulkan.patch ) python_check_deps() {