Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libplacebo for openSUSE:Factory checked in at 2022-02-03 23:16:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libplacebo (Old) and /work/SRC/openSUSE:Factory/.libplacebo.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libplacebo" Thu Feb 3 23:16:33 2022 rev:19 rq:951344 version:4.192.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libplacebo/libplacebo.changes 2022-01-21 01:25:27.418572052 +0100 +++ /work/SRC/openSUSE:Factory/.libplacebo.new.1898/libplacebo.changes 2022-02-03 23:17:27.460215008 +0100 @@ -1,0 +2,12 @@ +Thu Feb 3 15:59:08 UTC 2022 - Niklas Haas <[email protected]> + +- Update libplacebo to version 4.192.1. See details in: + https://code.videolan.org/videolan/libplacebo/-/tags/v4.192.1 + +------------------------------------------------------------------- +Sun Jan 30 17:08:01 UTC 2022 - Enrico Belleri <[email protected]> + +- Update nuklear.h to 4.9.5 +- Add dav1d dependency + +------------------------------------------------------------------- Old: ---- libplacebo-v4.192.0.tar.bz2 New: ---- libplacebo-v4.192.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libplacebo.spec ++++++ --- /var/tmp/diff_new_pack.XYYpSc/_old 2022-02-03 23:17:28.024211158 +0100 +++ /var/tmp/diff_new_pack.XYYpSc/_new 2022-02-03 23:17:28.024211158 +0100 @@ -18,20 +18,20 @@ %define sover 192 Name: libplacebo -Version: 4.192.0 +Version: 4.192.1 Release: 0 Summary: Library for GPU-accelerated video/image rendering primitives License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ URL: https://code.videolan.org/videolan/libplacebo Source0: https://code.videolan.org/videolan/libplacebo/-/archive/v%{version}/libplacebo-v%{version}.tar.bz2 -Source1: https://github.com/Immediate-Mode-UI/Nuklear/raw/6e80e2a646f35be4afc157a932f2936392ec8f74/nuklear.h +Source1: https://github.com/Immediate-Mode-UI/Nuklear/raw/3e91905e82c3cad01435d4a8a660a30e7f73c94a/nuklear.h BuildRequires: c++_compiler BuildRequires: c_compiler BuildRequires: meson >= 0.54.0 BuildRequires: pkgconfig BuildRequires: python3-mako -BuildRequires: shaderc-devel +BuildRequires: pkgconfig(dav1d) BuildRequires: pkgconfig(epoxy) BuildRequires: pkgconfig(glfw3) BuildRequires: pkgconfig(lcms2) @@ -40,6 +40,7 @@ BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libunwind) BuildRequires: pkgconfig(sdl2) +BuildRequires: pkgconfig(shaderc) BuildRequires: pkgconfig(vulkan) %description @@ -67,6 +68,7 @@ renderer. It is based on the core rendering algorithms and ideas of mpv. +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} > 150400 %package -n plplay Summary: Example video player based on %{name} Group: Productivity/Multimedia/Video/Players @@ -75,13 +77,20 @@ A small example video player based on %{name} and FFmpeg. This provides little more than the ability to display video files, and rather serves as a tool to help understand and demonstrate the various options provided by %{name}. +%endif %prep %setup -q -n %{name}-v%{version} cp %{SOURCE1} ./demos/3rdparty/nuklear/ %build -%meson -Dglslang=disabled -Dd3d11=disabled -Dtests=true -Ddemos=true +%meson -Dglslang=disabled -Dd3d11=disabled -Dtests=true \ +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} > 150400 + -Ddemos=true \ +%else + -Ddemos=false \ +%endif + %meson_build %install @@ -105,7 +114,9 @@ %{_libdir}/%{name}.so %{_libdir}/pkgconfig/%{name}.pc +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} > 150400 %files -n plplay %{_bindir}/plplay +%endif %changelog ++++++ libplacebo-v4.192.0.tar.bz2 -> libplacebo-v4.192.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/meson.build new/libplacebo-v4.192.1/meson.build --- old/libplacebo-v4.192.0/meson.build 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/meson.build 2022-02-03 16:30:55.000000000 +0100 @@ -50,7 +50,7 @@ '192': 'add pl_map_avframe_ex', }.keys().length(), # Fix version - 0) + 1) ) # Version number diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/colorspace.c new/libplacebo-v4.192.1/src/colorspace.c --- old/libplacebo-v4.192.0/src/colorspace.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/colorspace.c 2022-02-03 16:30:55.000000000 +0100 @@ -178,7 +178,7 @@ scale *= ((1LL << tex_bits) - 1.) / ((1LL << col_bits) - 1.); } - bits->sample_depth = bits->color_depth; + bits->color_depth = bits->sample_depth; return scale; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/common.h new/libplacebo-v4.192.1/src/common.h --- old/libplacebo-v4.192.0/src/common.h 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/common.h 2022-02-03 16:30:55.000000000 +0100 @@ -182,7 +182,7 @@ } while (0) // Refcounting helpers -typedef _Atomic uint64_t pl_rc_t; +typedef _Atomic uint32_t pl_rc_t; #define pl_rc_init(rc) atomic_init(rc, 1) #define pl_rc_ref(rc) ((void) atomic_fetch_add_explicit(rc, 1, memory_order_acquire)) #define pl_rc_deref(rc) (atomic_fetch_sub_explicit(rc, 1, memory_order_release) == 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/d3d11/context.c new/libplacebo-v4.192.1/src/d3d11/context.c --- old/libplacebo-v4.192.0/src/d3d11/context.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/d3d11/context.c 2022-02-03 16:30:55.000000000 +0100 @@ -132,6 +132,14 @@ return adapter; } +static bool has_sdk_layers(void) +{ + // This will fail if the SDK layers aren't installed + return SUCCEEDED(pD3D11CreateDevice(NULL, D3D_DRIVER_TYPE_NULL, NULL, + D3D11_CREATE_DEVICE_DEBUG, NULL, 0, D3D11_SDK_VERSION, NULL, NULL, + NULL)); +} + static ID3D11Device *create_device(struct pl_d3d11 *d3d11, const struct pl_d3d11_params *params) { @@ -160,6 +168,11 @@ release_adapter = true; } + if (debug && !has_sdk_layers()) { + PL_INFO(ctx, "Debug layer not available, removing debug flag"); + debug = false; + } + // Return here to retry creating the device do { // Use these default feature levels if they are not set @@ -192,17 +205,10 @@ if (SUCCEEDED(hr)) break; - if (hr == DXGI_ERROR_SDK_COMPONENT_MISSING && debug) { - PL_DEBUG(ctx, "Debug layer not available, removing debug flag"); - debug = false; - continue; - } - // Trying to create a D3D_FEATURE_LEVEL_12_0 device on Windows 8.1 or // below will not succeed. Try an 11_1 device. - if (max_fl >= D3D_FEATURE_LEVEL_12_0 && - min_fl <= D3D_FEATURE_LEVEL_11_1) - { + if (hr == E_INVALIDARG && max_fl >= D3D_FEATURE_LEVEL_12_0 && + min_fl <= D3D_FEATURE_LEVEL_11_1) { PL_DEBUG(ctx, "Failed to create 12_0+ device, trying 11_1"); max_fl = D3D_FEATURE_LEVEL_11_1; continue; @@ -210,9 +216,8 @@ // Trying to create a D3D_FEATURE_LEVEL_11_1 device on Windows 7 // without the platform update will not succeed. Try an 11_0 device. - if (max_fl >= D3D_FEATURE_LEVEL_11_1 && - min_fl <= D3D_FEATURE_LEVEL_11_0) - { + if (hr == E_INVALIDARG && max_fl >= D3D_FEATURE_LEVEL_11_1 && + min_fl <= D3D_FEATURE_LEVEL_11_0) { PL_DEBUG(ctx, "Failed to create 11_1+ device, trying 11_0"); max_fl = D3D_FEATURE_LEVEL_11_0; continue; @@ -220,7 +225,8 @@ // Retry with WARP if allowed if (!adapter && !warp && params->allow_software) { - PL_DEBUG(ctx, "Failed to create hardware device, trying WARP"); + PL_DEBUG(ctx, "Failed to create hardware device, trying WARP: %s", + pl_hresult_to_str(hr)); warp = true; max_fl = params->max_feature_level; min_fl = params->min_feature_level; @@ -262,14 +268,6 @@ // linearly sampled from, we shouldn't ever bind a non-point sampler to // a format that doesn't support it. D3D11_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED, - - // These warnings can happen when a pl_timer is used too often before a - // blocking pl_swapchain_swap_buffers() or pl_gpu_finish(), overflowing - // its internal ring buffer and causing older query objects to be reused - // before their results are read. This is expected behavior, so ignore - // these warnings to prevent log spam. - D3D11_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS, - D3D11_MESSAGE_ID_QUERY_END_ABANDONING_PREVIOUS_RESULTS, }; D3D11_INFO_QUEUE_FILTER filter = { .DenyList = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/d3d11/formats.c new/libplacebo-v4.192.1/src/d3d11/formats.c --- old/libplacebo-v4.192.0/src/d3d11/formats.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/d3d11/formats.c 2022-02-03 16:30:55.000000000 +0100 @@ -18,28 +18,29 @@ #include "formats.h" #include "gpu.h" -#define FMT(_name, _dxfmt, _type, num, size, bits, order) \ - (struct d3d_format) { \ - .dxfmt = DXGI_FORMAT_##_dxfmt##_##_type, \ - .fmt = { \ - .name = _name, \ - .type = PL_FMT_##_type, \ - .num_components = num, \ - .component_depth = bits, \ - .texel_size = size, \ - .texel_align = 1, \ - .internal_size = size, \ - .host_bits = bits, \ - .sample_order = order, \ - }, \ +#define FMT(_minor, _name, _dxfmt, _type, num, size, bits, order) \ + (struct d3d_format) { \ + .dxfmt = DXGI_FORMAT_##_dxfmt##_##_type, \ + .minor = _minor, \ + .fmt = { \ + .name = _name, \ + .type = PL_FMT_##_type, \ + .num_components = num, \ + .component_depth = bits, \ + .texel_size = size, \ + .texel_align = 1, \ + .internal_size = size, \ + .host_bits = bits, \ + .sample_order = order, \ + }, \ } #define IDX(...) {__VA_ARGS__} #define BITS(...) {__VA_ARGS__} -#define REGFMT(name, dxfmt, type, num, bits) \ - FMT(name, dxfmt, type, num, (num) * (bits) / 8, \ - BITS(bits, bits, bits, bits), \ +#define REGFMT(name, dxfmt, type, num, bits) \ + FMT(0, name, dxfmt, type, num, (num) * (bits) / 8, \ + BITS(bits, bits, bits, bits), \ IDX(0, 1, 2, 3)) const struct d3d_format pl_d3d11_formats[] = { @@ -87,17 +88,17 @@ REGFMT("rgb32i", R32G32B32, SINT, 3, 32), REGFMT("rgba32i", R32G32B32A32, SINT, 4, 32), - FMT("rgb10a2", R10G10B10A2, UNORM, 4, 4, BITS(10, 10, 10, 2), IDX(0, 1, 2, 3)), - FMT("rgb10a2u", R10G10B10A2, UINT, 4, 4, BITS(10, 10, 10, 2), IDX(0, 1, 2, 3)), + FMT(0, "rgb10a2", R10G10B10A2, UNORM, 4, 4, BITS(10, 10, 10, 2), IDX(0, 1, 2, 3)), + FMT(0, "rgb10a2u", R10G10B10A2, UINT, 4, 4, BITS(10, 10, 10, 2), IDX(0, 1, 2, 3)), - FMT("bgra8", B8G8R8A8, UNORM, 4, 4, BITS( 8, 8, 8, 8), IDX(2, 1, 0, 3)), - FMT("bgrx8", B8G8R8X8, UNORM, 3, 4, BITS( 8, 8, 8), IDX(2, 1, 0)), - FMT("rg11b10f", R11G11B10, FLOAT, 3, 4, BITS(11, 11, 10), IDX(0, 1, 2)), + FMT(0, "bgra8", B8G8R8A8, UNORM, 4, 4, BITS( 8, 8, 8, 8), IDX(2, 1, 0, 3)), + FMT(0, "bgrx8", B8G8R8X8, UNORM, 3, 4, BITS( 8, 8, 8), IDX(2, 1, 0)), + FMT(0, "rg11b10f", R11G11B10, FLOAT, 3, 4, BITS(11, 11, 10), IDX(0, 1, 2)), // D3D11.1 16-bit formats (resurrected D3D9 formats) - FMT("bgr565", B5G6R5, UNORM, 3, 2, BITS( 5, 6, 5), IDX(2, 1, 0)), - FMT("bgr5a1", B5G5R5A1, UNORM, 4, 2, BITS( 5, 5, 5, 1), IDX(2, 1, 0, 3)), - FMT("bgra4", B4G4R4A4, UNORM, 4, 2, BITS( 4, 4, 4, 4), IDX(2, 1, 0, 3)), + FMT(1, "bgr565", B5G6R5, UNORM, 3, 2, BITS( 5, 6, 5), IDX(2, 1, 0)), + FMT(1, "bgr5a1", B5G5R5A1, UNORM, 4, 2, BITS( 5, 5, 5, 1), IDX(2, 1, 0, 3)), + FMT(1, "bgra4", B4G4R4A4, UNORM, 4, 2, BITS( 4, 4, 4, 4), IDX(2, 1, 0, 3)), {0} }; @@ -115,6 +116,11 @@ for (int i = 0; pl_d3d11_formats[i].dxfmt; i++) { const struct d3d_format *d3d_fmt = &pl_d3d11_formats[i]; + // The Direct3D 11.0 debug layer will segfault if CheckFormatSupport is + // called on a format it doesn't know about + if (pl_d3d11_formats[i].minor > p->minor) + continue; + UINT sup = 0; hr = ID3D11Device_CheckFormatSupport(p->dev, d3d_fmt->dxfmt, &sup); if (FAILED(hr)) @@ -204,9 +210,6 @@ } } - if (sup & D3D11_FORMAT_SUPPORT_SHADER_GATHER) - fmt->gatherable = true; - // PL_FMT_CAP_STORABLE implies compute shaders, so don't set it if we // don't have them if (!gpu->glsl.compute) @@ -220,6 +223,13 @@ if (fmt->type == PL_FMT_UINT || fmt->type == PL_FMT_SINT) fmt->caps &= ~(PL_FMT_CAP_SAMPLEABLE | PL_FMT_CAP_LINEAR); + // `fmt->gatherable` must have PL_FMT_CAP_SAMPLEABLE + if ((fmt->caps & PL_FMT_CAP_SAMPLEABLE) && + (sup & D3D11_FORMAT_SUPPORT_SHADER_GATHER)) + { + fmt->gatherable = true; + } + // PL_FMT_CAP_BLITTABLE implies support for stretching, flipping and // loose format conversion, which require a shader pass in D3D11 if (p->fl >= D3D_FEATURE_LEVEL_11_0) { @@ -230,7 +240,7 @@ } else { // On <FL11_0 we use a raster pass static const enum pl_fmt_caps req = PL_FMT_CAP_RENDERABLE | - PL_FMT_CAP_STORABLE; + PL_FMT_CAP_SAMPLEABLE; if ((fmt->caps & req) == req) fmt->caps |= PL_FMT_CAP_BLITTABLE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/d3d11/formats.h new/libplacebo-v4.192.1/src/d3d11/formats.h --- old/libplacebo-v4.192.0/src/d3d11/formats.h 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/d3d11/formats.h 2022-02-03 16:30:55.000000000 +0100 @@ -21,6 +21,7 @@ struct d3d_format { DXGI_FORMAT dxfmt; + int minor; // The D3D11 minor version number which supports this format struct pl_fmt fmt; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/d3d11/gpu.c new/libplacebo-v4.192.1/src/d3d11/gpu.c --- old/libplacebo-v4.192.0/src/d3d11/gpu.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/d3d11/gpu.c 2022-02-03 16:30:55.000000000 +0100 @@ -412,13 +412,11 @@ ID3D11Device_AddRef(p->dev); ID3D11Device_GetImmediateContext(p->dev, &p->imm); - int minor = 0; // The Direct3D 11 minor version number - // Check D3D11.1 interfaces hr = ID3D11Device_QueryInterface(p->dev, &IID_ID3D11Device1, (void **) &p->dev1); if (SUCCEEDED(hr)) { - minor = 1; + p->minor = 1; ID3D11Device1_GetImmediateContext1(p->dev1, &p->imm1); } @@ -430,10 +428,10 @@ hr = ID3D11DeviceContext_QueryInterface(p->imm, &IID_ID3D11DeviceContext4, (void **) &p->imm4); if (SUCCEEDED(hr)) - minor = 4; + p->minor = 4; } - PL_INFO(gpu, "Using Direct3D 11.%d runtime", minor); + PL_INFO(gpu, "Using Direct3D 11.%d runtime", p->minor); D3D(ID3D11Device_QueryInterface(p->dev, &IID_IDXGIDevice1, (void **) &dxgi_dev)); D3D(IDXGIDevice1_GetParent(dxgi_dev, &IID_IDXGIAdapter1, (void **) &adapter)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/d3d11/gpu.h new/libplacebo-v4.192.1/src/d3d11/gpu.h --- old/libplacebo-v4.192.0/src/d3d11/gpu.h 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/d3d11/gpu.h 2022-02-03 16:30:55.000000000 +0100 @@ -53,6 +53,9 @@ ID3D11DeviceContext1 *imm1; ID3D11DeviceContext4 *imm4; + // The Direct3D 11 minor version number + int minor; + struct spirv_compiler *spirv; pD3DCompile D3DCompile; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/d3d11/gpu_tex.c new/libplacebo-v4.192.1/src/d3d11/gpu_tex.c --- old/libplacebo-v4.192.0/src/d3d11/gpu_tex.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/d3d11/gpu_tex.c 2022-02-03 16:30:55.000000000 +0100 @@ -522,7 +522,7 @@ } else if (tex->params.format->type == PL_FMT_SINT) { if (tex_p->uav) { ID3D11DeviceContext_ClearUnorderedAccessViewUint(p->imm, tex_p->uav, - color.i); + (const uint32_t *)color.i); } else { float c[4] = { color.i[0], color.i[1], color.i[2], color.i[3] }; ID3D11DeviceContext_ClearRenderTargetView(p->imm, tex_p->rtv, c); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/d3d11/utils.c new/libplacebo-v4.192.1/src/d3d11/utils.c --- old/libplacebo-v4.192.0/src/d3d11/utils.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/d3d11/utils.c 2022-02-03 16:30:55.000000000 +0100 @@ -19,6 +19,73 @@ #include "utils.h" +// D3D11.3 message IDs, not present in mingw-w64 v9 +#define D3D11_MESSAGE_ID_CREATE_FENCE (0x300209) +#define D3D11_MESSAGE_ID_DESTROY_FENCE (0x30020b) + +static enum pl_log_level log_level_override(unsigned int id) +{ + switch (id) { + // These warnings can happen when a pl_timer is used too often before a + // blocking pl_swapchain_swap_buffers() or pl_gpu_finish(), overflowing + // its internal ring buffer and causing older query objects to be reused + // before their results are read. This is expected behavior, so reduce + // the log level to PL_LOG_TRACE to prevent log spam. + case D3D11_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS: + case D3D11_MESSAGE_ID_QUERY_END_ABANDONING_PREVIOUS_RESULTS: + return PL_LOG_TRACE; + + // D3D11 writes log messages every time an object is created or + // destroyed. That results in a lot of log spam, so force PL_LOG_TRACE. +#define OBJ_LIFETIME_MESSAGES(obj) \ + case D3D11_MESSAGE_ID_CREATE_ ## obj: \ + case D3D11_MESSAGE_ID_DESTROY_ ## obj + + OBJ_LIFETIME_MESSAGES(CONTEXT): + OBJ_LIFETIME_MESSAGES(BUFFER): + OBJ_LIFETIME_MESSAGES(TEXTURE1D): + OBJ_LIFETIME_MESSAGES(TEXTURE2D): + OBJ_LIFETIME_MESSAGES(TEXTURE3D): + OBJ_LIFETIME_MESSAGES(SHADERRESOURCEVIEW): + OBJ_LIFETIME_MESSAGES(RENDERTARGETVIEW): + OBJ_LIFETIME_MESSAGES(DEPTHSTENCILVIEW): + OBJ_LIFETIME_MESSAGES(VERTEXSHADER): + OBJ_LIFETIME_MESSAGES(HULLSHADER): + OBJ_LIFETIME_MESSAGES(DOMAINSHADER): + OBJ_LIFETIME_MESSAGES(GEOMETRYSHADER): + OBJ_LIFETIME_MESSAGES(PIXELSHADER): + OBJ_LIFETIME_MESSAGES(INPUTLAYOUT): + OBJ_LIFETIME_MESSAGES(SAMPLER): + OBJ_LIFETIME_MESSAGES(BLENDSTATE): + OBJ_LIFETIME_MESSAGES(DEPTHSTENCILSTATE): + OBJ_LIFETIME_MESSAGES(RASTERIZERSTATE): + OBJ_LIFETIME_MESSAGES(QUERY): + OBJ_LIFETIME_MESSAGES(PREDICATE): + OBJ_LIFETIME_MESSAGES(COUNTER): + OBJ_LIFETIME_MESSAGES(COMMANDLIST): + OBJ_LIFETIME_MESSAGES(CLASSINSTANCE): + OBJ_LIFETIME_MESSAGES(CLASSLINKAGE): + OBJ_LIFETIME_MESSAGES(COMPUTESHADER): + OBJ_LIFETIME_MESSAGES(UNORDEREDACCESSVIEW): + OBJ_LIFETIME_MESSAGES(VIDEODECODER): + OBJ_LIFETIME_MESSAGES(VIDEOPROCESSORENUM): + OBJ_LIFETIME_MESSAGES(VIDEOPROCESSOR): + OBJ_LIFETIME_MESSAGES(DECODEROUTPUTVIEW): + OBJ_LIFETIME_MESSAGES(PROCESSORINPUTVIEW): + OBJ_LIFETIME_MESSAGES(PROCESSOROUTPUTVIEW): + OBJ_LIFETIME_MESSAGES(DEVICECONTEXTSTATE): + OBJ_LIFETIME_MESSAGES(FENCE): + return PL_LOG_TRACE; + +#undef OBJ_LIFETIME_MESSAGES + + // Don't force the log level of any other messages. It will be mapped + // from the D3D severity code instead. + default: + return PL_LOG_NONE; + } +} + void pl_d3d11_flush_message_queue(struct d3d11_ctx *ctx, const char *header) { if (!ctx->iqueue) @@ -58,7 +125,10 @@ d3dmsg = pl_zalloc(NULL, len); D3D(ID3D11InfoQueue_GetMessage(ctx->iqueue, i, d3dmsg, &len)); - enum pl_log_level level = severity_map[d3dmsg->Severity]; + enum pl_log_level level = log_level_override(d3dmsg->ID); + if (level == PL_LOG_NONE) + level = severity_map[d3dmsg->Severity]; + if (pl_msg_test(ctx->log, level)) { // If the header hasn't been printed, or it was printed for a lower // log level than the current message, print it (again) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/meson.build new/libplacebo-v4.192.1/src/meson.build --- old/libplacebo-v4.192.0/src/meson.build 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/meson.build 2022-02-03 16:30:55.000000000 +0100 @@ -69,10 +69,13 @@ endif unwind = dependency('libunwind', required: get_option('unwind')) +has_execinfo = cc.has_header('execinfo.h') conf_internal.set('PL_HAVE_UNWIND', unwind.found()) -conf_internal.set('PL_HAVE_EXECINFO', cc.has_header('execinfo.h')) +conf_internal.set('PL_HAVE_EXECINFO', has_execinfo) if unwind.found() build_deps += [unwind, cc.find_library('dl', required : false)] +elif has_execinfo + build_deps += cc.find_library('execinfo', required: false) endif # work-arounds for glslang braindeath @@ -169,6 +172,18 @@ endif endif +# Work around missing atomics on some (obscure) platforms +atomic_test = ''' +#include <stdatomic.h> +#include <stdint.h> +int main(void) { + _Atomic uint32_t x32; + atomic_init(&x32, 0); +}''' + +if not cc.links(atomic_test) + build_deps += cc.find_library('atomic') +endif # Source files headers = [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/opengl/gpu.c new/libplacebo-v4.192.1/src/opengl/gpu.c --- old/libplacebo-v4.192.0/src/opengl/gpu.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/opengl/gpu.c 2022-02-03 16:30:55.000000000 +0100 @@ -256,8 +256,11 @@ if (gl_test_ext(gpu, "GL_EXT_unpack_subimage", 11, 30)) limits->align_tex_xfer_pitch = 4; - if (!gl_check_err(gpu, "pl_gpu_create_gl")) - goto error; + if (!gl_check_err(gpu, "pl_gpu_create_gl")) { + PL_WARN(gpu, "Encountered errors while detecting GPU capabilities... " + "ignoring, but expect limitations/issues"); + p->failed = false; + } // Filter out error messages during format probing pl_log_level_cap(gpu->log, PL_LOG_INFO); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/renderer.c new/libplacebo-v4.192.1/src/renderer.c --- old/libplacebo-v4.192.0/src/renderer.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/renderer.c 2022-02-03 16:30:55.000000000 +0100 @@ -118,10 +118,8 @@ pl_fmt fmt = NULL; for (int i = 0; i < PL_ARRAY_SIZE(configs); i++) { - const enum pl_fmt_caps min_caps = PL_FMT_CAP_RENDERABLE | - PL_FMT_CAP_BLITTABLE; fmt = pl_find_fmt(rr->gpu, configs[i].type, 4, configs[i].depth, 0, - min_caps | configs[i].caps); + PL_FMT_CAP_RENDERABLE | configs[i].caps); if (fmt) { rr->fbofmt[4] = fmt; @@ -400,7 +398,7 @@ .format = fmt, .sampleable = true, .renderable = true, - .blit_src = true, + .blit_src = fmt->caps & PL_FMT_CAP_BLITTABLE, .storable = fmt->caps & PL_FMT_CAP_STORABLE, .debug_tag = debug_tag, }; @@ -2831,7 +2829,7 @@ .format = rr->fbofmt[4], .sampleable = true, .renderable = true, - .blit_dst = true, + .blit_dst = rr->fbofmt[4]->caps & PL_FMT_CAP_BLITTABLE, .storable = rr->fbofmt[4]->caps & PL_FMT_CAP_STORABLE, )); @@ -2872,10 +2870,16 @@ inter_pass.img.h == out_h); if (inter_pass.img.tex) { - pl_tex_blit(rr->gpu, pl_tex_blit_params( + struct pl_tex_blit_params blit = { .src = inter_pass.img.tex, .dst = f->tex, - )); + }; + + if (blit.src->params.blit_src && blit.dst->params.blit_dst) { + pl_tex_blit(rr->gpu, &blit); + } else { + pl_tex_blit_raster(rr->gpu, rr->dp, &blit); + } } else { ok = pl_dispatch_finish(rr->dp, pl_dispatch_params( .shader = &inter_pass.img.sh, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/shaders/colorspace.c new/libplacebo-v4.192.1/src/shaders/colorspace.c --- old/libplacebo-v4.192.0/src/shaders/colorspace.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/shaders/colorspace.c 2022-02-03 16:30:55.000000000 +0100 @@ -1404,21 +1404,11 @@ } } - const float ct = params->tone_mapping_crosstalk; - const struct pl_matrix3x3 crosstalk = {{ - { 1 - 2*ct, ct, ct }, - { ct, 1 - 2*ct, ct }, - { ct, ct, 1 - 2*ct }, - }}; - - // PL_TONE_MAP_LUMA can do the crosstalk for free - bool needs_ct = ct && mode != PL_TONE_MAP_LUMA; - if (needs_ct) { - GLSL("color.rgb = %s * color.rgb; \n", sh_var(sh, (struct pl_shader_var) { - .var = pl_var_mat3("crosstalk"), - .data = crosstalk.m, // no need to transpose, matrix is symmetric - })); - } + ident_t ct = SH_FLOAT(params->tone_mapping_crosstalk); + GLSL("const float ct_scale = 1.0 - 3.0 * %s; \n" + "float ct = %s * (color.r + color.g + color.b); \n" + "color.rgb = ct_scale * color.rgb + vec3(ct); \n", + ct, ct); switch (mode) { case PL_TONE_MAP_RGB: @@ -1432,29 +1422,10 @@ SH_FLOAT(dst_min)); break; + case PL_TONE_MAP_LUMA: case PL_TONE_MAP_HYBRID: { - GLSL("float luma_orig = dot(%s, color.rgb); \n" - "float luma_new = tone_map(luma_orig); \n" - "vec3 color_lin = luma_new / luma_orig * color.rgb; \n", - sh_luma_coeffs(sh, pl_raw_primaries_get(src->primaries))); - for (int c = 0; c < 3; c++) - GLSL("color[%d] = tone_map(color[%d]); \n", c, c); - - const float y = 2.4f; - const float lb = powf(dst_min, y); - const float lw = powf(dst_max, y); - const float a = 1 / (lw - lb); - const float b = -lb * a; - GLSL("float coeff = %s * pow(luma_new, %f) + %s; \n" - "color.rgb = mix(color_lin, color.rgb, coeff); \n", - SH_FLOAT(a), y, SH_FLOAT(b)); - break; - } - - case PL_TONE_MAP_LUMA: { const struct pl_raw_primaries *prim = pl_raw_primaries_get(src->primaries); struct pl_matrix3x3 rgb2xyz = pl_get_rgb2xyz_matrix(prim); - pl_matrix3x3_mul(&rgb2xyz, &crosstalk); // Normalize X and Z by the white point for (int i = 0; i < 3; i++) { @@ -1482,10 +1453,27 @@ GLSL("xyz.y -= max(0.1 * xyz.x, 0.0); \n"); pl_matrix3x3_invert(&rgb2xyz); - GLSL("color.rgb = %s * xyz; \n", sh_var(sh, (struct pl_shader_var) { + GLSL("vec3 color_lin = %s * xyz; \n", sh_var(sh, (struct pl_shader_var) { .var = pl_var_mat3("xyz2rgb"), .data = PL_TRANSPOSE_3X3(rgb2xyz.m), })); + + if (mode == PL_TONE_MAP_HYBRID) { + for (int c = 0; c < 3; c++) + GLSL("color[%d] = tone_map(color[%d]); \n", c, c); + + // coeff(x) = max(a * x^-y, b * x^y) + // solve for coeff(dst_min) = 1, coeff(dst_max) = 1 + const float y = 2.4f; + const float a = powf(dst_min, y); + const float b = powf(dst_max, -y); + GLSL("float coeff = pow(xyz.y, %f); \n" + "coeff = max(%s / coeff, %s * coeff); \n" + "color.rgb = mix(color_lin, color.rgb, coeff); \n", + y, SH_FLOAT(a), SH_FLOAT(b)); + } else { + GLSL("color.rgb = color_lin; \n"); + } break; } @@ -1494,18 +1482,10 @@ pl_unreachable(); } - if (needs_ct) { - const float s = 1 / (1 - 3 * ct); - const struct pl_matrix3x3 crosstalk_inv = {{ - {-ct * s + s, -ct * s, -ct * s }, - {-ct * s, -ct * s + s, -ct * s }, - {-ct * s, -ct * s, -ct * s + s }, - }}; - GLSL("color.rgb = %s * color.rgb; \n", sh_var(sh, (struct pl_shader_var) { - .var = pl_var_mat3("crosstalk_inv"), - .data = crosstalk_inv.m, - })); - } + // Inverse crosstalk + GLSL("ct = %s * (color.r + color.g + color.b); \n" + "color.rgb = (color.rgb - vec3(ct)) / ct_scale; \n", + ct); GLSL("#undef tone_map \n"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libplacebo-v4.192.0/src/tests/colorspace.c new/libplacebo-v4.192.1/src/tests/colorspace.c --- old/libplacebo-v4.192.0/src/tests/colorspace.c 2022-01-19 13:01:24.000000000 +0100 +++ new/libplacebo-v4.192.1/src/tests/colorspace.c 2022-02-03 16:30:55.000000000 +0100 @@ -124,13 +124,21 @@ struct pl_color_repr repr = { .levels = PL_COLOR_LEVELS_LIMITED, .sys = sys, + .bits = { + // synthetic test + .color_depth = 8, + .sample_depth = 10, + }, }; + float scale = pl_color_repr_normalize(&repr); struct pl_transform3x3 yuv2rgb = pl_color_repr_decode(&repr, NULL); - static const float white_ycbcr[3] = { 235/255., 128/255., 128/255. }; - static const float black_ycbcr[3] = { 16/255., 128/255., 128/255. }; - static const float white_other[3] = { 235/255., 235/255., 235/255. }; - static const float black_other[3] = { 16/255., 16/255., 16/255. }; + pl_matrix3x3_scale(&yuv2rgb.mat, scale); + + static const float white_ycbcr[3] = { 235/1023., 128/1023., 128/1023. }; + static const float black_ycbcr[3] = { 16/1023., 128/1023., 128/1023. }; + static const float white_other[3] = { 235/1023., 235/1023., 235/1023. }; + static const float black_other[3] = { 16/1023., 16/1023., 16/1023. }; float white[3], black[3]; for (int i = 0; i < 3; i++) { ++++++ nuklear.h ++++++ ++++ 2466 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/libplacebo/nuklear.h ++++ and /work/SRC/openSUSE:Factory/.libplacebo.new.1898/nuklear.h
