Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libplacebo for openSUSE:Factory checked in at 2021-05-10 15:36:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libplacebo (Old) and /work/SRC/openSUSE:Factory/.libplacebo.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libplacebo" Mon May 10 15:36:38 2021 rev:16 rq:891306 version:3.120.3 Changes: -------- --- /work/SRC/openSUSE:Factory/libplacebo/libplacebo.changes 2021-04-22 18:04:01.610512369 +0200 +++ /work/SRC/openSUSE:Factory/.libplacebo.new.2988/libplacebo.changes 2021-05-10 15:39:01.993649403 +0200 @@ -1,0 +2,23 @@ +Fri May 7 09:51:50 UTC 2021 - Niklas Haas <o...@haasn.xyz> + +- Update libplacebo to version 3.120.3: + +This minor release fixes a number of regressions surrounding memory +imports and DRM modifiers, specifically aimed at issues that arose with +mpv's --hwdec=vaapi. + +Changes: +- `pl_fmt.modifiers` now always includes DRM_FORMAT_MOD_INVALID on + OpenGL, which instructs the implementation to not specify modifiers +- passing a DRM modifier not in the list of supported modifiers is now + considered a hard error, to rule out non-working hwaccel formats + +Fixes: +- fix a crash when using sampling shaders on textures with unknown formats +- fix improperly specified SDL header imports in the demos +- fix an issue where the vulkan texture handle capabilities were testing + for presence of the wrong extension +- fix an issue where non-enabled DRM modifier structs were accidentally + linked into the pNext chain, causing issues with some drivers + +------------------------------------------------------------------- Old: ---- libplacebo-v3.120.2.tar.bz2 New: ---- libplacebo-v3.120.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libplacebo.spec ++++++ --- /var/tmp/diff_new_pack.V40Xmb/_old 2021-05-10 15:39:02.513647274 +0200 +++ /var/tmp/diff_new_pack.V40Xmb/_new 2021-05-10 15:39:02.517647258 +0200 @@ -18,7 +18,7 @@ %define sover 120 Name: libplacebo -Version: 3.120.2 +Version: 3.120.3 Release: 0 Summary: Library for GPU-accelerated video/image rendering primitives License: LGPL-2.1-or-later ++++++ libplacebo-v3.120.2.tar.bz2 -> libplacebo-v3.120.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v3.120.2/demos/sdlimage.c new/libplacebo-v3.120.3/demos/sdlimage.c --- old/libplacebo-v3.120.2/demos/sdlimage.c 2021-04-19 10:14:26.000000000 +0200 +++ new/libplacebo-v3.120.3/demos/sdlimage.c 2021-05-07 11:44:16.000000000 +0200 @@ -4,7 +4,7 @@ * License: CC0 / Public Domain */ -#include <SDL2/SDL_image.h> +#include <SDL_image.h> #include "common.h" #include "window.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v3.120.2/demos/window_sdl.c new/libplacebo-v3.120.3/demos/window_sdl.c --- old/libplacebo-v3.120.2/demos/window_sdl.c 2021-04-19 10:14:26.000000000 +0200 +++ new/libplacebo-v3.120.3/demos/window_sdl.c 2021-05-07 11:44:16.000000000 +0200 @@ -7,11 +7,11 @@ #include "common.h" #include "window.h" -#include <SDL2/SDL.h> +#include <SDL.h> #ifdef USE_VK #include <libplacebo/vulkan.h> -#include <SDL2/SDL_vulkan.h> +#include <SDL_vulkan.h> #define WINFLAG_API SDL_WINDOW_VULKAN #define IMPL win_impl_sdl_vk #define IMPL_NAME "SDL2 (vulkan)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v3.120.2/meson.build new/libplacebo-v3.120.3/meson.build --- old/libplacebo-v3.120.2/meson.build 2021-04-19 10:14:26.000000000 +0200 +++ new/libplacebo-v3.120.3/meson.build 2021-05-07 11:44:16.000000000 +0200 @@ -2,7 +2,7 @@ license: 'LGPL2.1+', default_options: ['c_std=c99', 'cpp_std=c++11', 'warning_level=2'], meson_version: '>=0.51', - version: '3.120.2', + version: '3.120.3', ) # Version number diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v3.120.2/src/gpu.c new/libplacebo-v3.120.3/src/gpu.c --- old/libplacebo-v3.120.2/src/gpu.c 2021-04-19 10:14:26.000000000 +0200 +++ new/libplacebo-v3.120.3/src/gpu.c 2021-05-07 11:44:16.000000000 +0200 @@ -507,30 +507,21 @@ return NULL; } -static bool warned_mods = false; - -static inline void check_mod(const struct pl_gpu *gpu, const struct pl_fmt *fmt, +static inline bool check_mod(const struct pl_gpu *gpu, const struct pl_fmt *fmt, uint64_t mod) { - if (warned_mods) - return; - for (int i = 0; i < fmt->num_modifiers; i++) { if (fmt->modifiers[i] == mod) - return; + return true; } - // This is not a hard error because modifier support is fickle at best, - // in both libplacebo and other APIs. So just be somewhat annoying in this - // case. - PL_WARN(gpu, "DRM modifier %s not available for format %s. Ignoring, " - "but expect possible corruption. Available modifiers:", - PRINT_DRM_MOD(mod), fmt->name); + PL_ERR(gpu, "DRM modifier %s not available for format %s. Available modifiers:", + PRINT_DRM_MOD(mod), fmt->name); for (int i = 0; i < fmt->num_modifiers; i++) - PL_WARN(gpu, " %s", PRINT_DRM_MOD(fmt->modifiers[i])); + PL_ERR(gpu, " %s", PRINT_DRM_MOD(fmt->modifiers[i])); - warned_mods = true; + return false; } const struct pl_tex *pl_tex_create(const struct pl_gpu *gpu, @@ -547,7 +538,8 @@ require(PL_ISPOT(params->import_handle)); require(params->shared_mem.size > 0); if (params->import_handle == PL_HANDLE_DMA_BUF) { - check_mod(gpu, params->format, params->shared_mem.drm_format_mod); + if (!check_mod(gpu, params->format, params->shared_mem.drm_format_mod)) + goto error; if (params->shared_mem.stride_w) require(params->w && params->shared_mem.stride_w >= params->w); if (params->shared_mem.stride_h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v3.120.2/src/opengl/gpu.c new/libplacebo-v3.120.3/src/opengl/gpu.c --- old/libplacebo-v3.120.2/src/opengl/gpu.c 2021-04-19 10:14:26.000000000 +0200 +++ new/libplacebo-v3.120.3/src/opengl/gpu.c 2021-05-07 11:44:16.000000000 +0200 @@ -159,12 +159,20 @@ bool ok = eglQueryDmaBufModifiersEXT(p->egl_dpy, fmt->fourcc, 0, NULL, NULL, &num_mods); if (ok && num_mods) { - uint64_t *mods = pl_calloc(fmt, num_mods, sizeof(uint64_t)); - ok = eglQueryDmaBufModifiersEXT(p->egl_dpy, fmt->fourcc, - num_mods, mods, NULL, &num_mods); + // On my system eglQueryDmaBufModifiersEXT seems to never return + // MOD_INVALID even though eglExportDMABUFImageQueryMESA happily + // returns such modifiers. Since we handle INVALID by not + // requiring modifiers at all, always add this value to the + // list of supported modifiers. May result in duplicates, but + // whatever. + uint64_t *mods = pl_calloc(fmt, num_mods + 1, sizeof(uint64_t)); + mods[0] = DRM_FORMAT_MOD_INVALID; + ok = eglQueryDmaBufModifiersEXT(p->egl_dpy, fmt->fourcc, num_mods, + &mods[1], NULL, &num_mods); + if (ok) { fmt->modifiers = mods; - fmt->num_modifiers = num_mods; + fmt->num_modifiers = num_mods + 1; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v3.120.2/src/shaders/sampling.c new/libplacebo-v3.120.3/src/shaders/sampling.c --- old/libplacebo-v3.120.2/src/shaders/sampling.c 2021-04-19 10:14:26.000000000 +0200 +++ new/libplacebo-v3.120.3/src/shaders/sampling.c 2021-05-07 11:44:16.000000000 +0200 @@ -170,6 +170,7 @@ pl_assert(src->format); switch (src->format) { + case PL_FMT_UNKNOWN: case PL_FMT_FLOAT: case PL_FMT_UNORM: case PL_FMT_SNORM: sh->sampler_prefix = ' '; break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v3.120.2/src/vulkan/gpu.c new/libplacebo-v3.120.3/src/vulkan/gpu.c --- old/libplacebo-v3.120.2/src/vulkan/gpu.c 2021-04-19 10:14:26.000000000 +0200 +++ new/libplacebo-v3.120.3/src/vulkan/gpu.c 2021-05-07 11:44:16.000000000 +0200 @@ -393,7 +393,8 @@ { pl_handle_caps caps = 0; - if (!vk->GetPhysicalDeviceImageFormatProperties2KHR) + // This function checks for VK_KHR_external_memory_capabilities + if (!vk->GetPhysicalDeviceExternalBufferPropertiesKHR) return caps; bool has_drm_mods = vk->GetImageDrmFormatModifierPropertiesEXT; @@ -1126,10 +1127,12 @@ VkPhysicalDeviceExternalImageFormatInfoKHR ext_pinfo = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR, - .pNext = handle_type == PL_HANDLE_DMA_BUF ? &drm_pinfo : NULL, .handleType = ext_info.handleTypes, }; + if (handle_type == PL_HANDLE_DMA_BUF && has_drm_mods) + vk_link_struct(&ext_pinfo, &drm_pinfo); + VkPhysicalDeviceImageFormatInfo2KHR pinfo = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR, .pNext = handle_type ? &ext_pinfo : NULL, @@ -1196,7 +1199,7 @@ VkMemoryRequirements2KHR reqs2 = { .sType = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR, - .pNext = &ded_reqs, + .pNext = (vk->api_ver >= VK_API_VERSION_1_1) ? &ded_reqs : NULL, }; VkImageMemoryRequirementsInfo2KHR req_info2 = {