1. 10 Dec, 2018 1 commit
  2. 07 Dec, 2018 2 commits
  3. 04 Dec, 2018 1 commit
    • Niklas Haas's avatar
      3rdparty: use meson subprojects instead · 195f28ea
      Niklas Haas authored
      Major refactor of the source code structure. Now uses meson subprojects
      for "third party" dependencies (including bstr and talloc), and moves a
      lot of the meson boilerplate from src/meson.build to the top-level
      meson.build.
      
      We choose the name 'xtalloc' to make sure we don't collide with samba
      libtalloc, and to reflect the fact that our wrappers abort on OOM.
      195f28ea
  4. 28 Nov, 2018 2 commits
    • Niklas Haas's avatar
      shaderc: don't accept shaderc.a · fcab9199
      Niklas Haas authored
      Upstream has decided against renaming shaderc_shared.so to shaderc.so,
      so right now this only finds shaderc.a which is not supported. Might as
      well remove it.
      fcab9199
    • Niklas Haas's avatar
      meson: only search for glslang if shaderc unavailable · b9e4ffa2
      Niklas Haas authored
      This skips glslang by default if it's set to 'auto' when shaderc is also
      found. (However, we still explicitly search for it if glslang is set to
      "disabled", just to make the log clearer)
      b9e4ffa2
  5. 16 Nov, 2018 1 commit
    • Niklas Haas's avatar
      spirv: compat for older shaderc versions · a7674a99
      Niklas Haas authored
      Since there's no better way to check for the existence of this value
      other than by literally probing the header during the build step, we
      introduce a new "private" config.h for internal checks like this. (Which
      the user is unlikely to ever care about)
      a7674a99
  6. 10 Nov, 2018 1 commit
    • Niklas Haas's avatar
      meson: link glslang against pthread where needed · a7d2fc51
      Niklas Haas authored
      See the justification in the comments. Works around build issues on some
      platforms. Not the cleanest implementation, but then again, C linking is
      not the cleanest topic. (Actually not giving meson the blame here)
      a7d2fc51
  7. 07 Nov, 2018 1 commit
  8. 30 Oct, 2018 1 commit
    • Niklas Haas's avatar
      shaders: add AV1 film grain shader · 1d635def
      Niklas Haas authored
      This is can be used to apply AV1 film grain onto planes directly on the
      GPU. Eventually, the pl_renderer will be able to take this grain params
      struct and do it automatically - but for now, we need the basic shader
      implemntation first.
      
      We make some amount of effort to follow the AV1 spec exactly, even down
      to reproducing the (terrible) PRNG, awkward corner blending and rounding
      (where possible).
      
      Some things are not currently preserved: In particular, the blending of
      pixels is not correctly rounded. (We continue calculating on the
      un-rounded floating point values) In practice this does not produce any
      significant deviation (bounded by +/- 1) - especially if you don't round
      but instead continue calculating with floating point precision, in which
      case the true error is only the difference between the un-rounded value
      and its correctly rounded counterpart (bounded by +/- 0.5).
      
      The generated shader can be used as both a compute shader and a fragment
      shader, but a compute shader is preferred (slightly faster).
      
      We upload the weights and grain tables using an SSBO (which we need
      anyway to store the integer offset table). In theory we could try
      replacing these by LUTs, but the existing sh_lut mechanism does not lend
      itself well to frequent updates, and we will want to be updating this
      texture constantly (especially for parallel streaming).
      
      But more testing is warranted here. For now, this should be a working v1
      implementation.
      1d635def
  9. 26 Oct, 2018 2 commits
    • Niklas Haas's avatar
      meson: exclude external libs on supported platforms · c33afe78
      Niklas Haas authored
      This prevents e.g. leaking glslang symbols, which is the main reason we
      switched to the linker script in 6835ae5d. Since that caused other
      problems as well (notably failing on several platforms), and being just
      as annoying to work with, I decided to revert that series of commits and
      go back to the #pragma GCC approach - this at least works on all
      platforms without any harm done. (If the pragma doesn't exist, it will
      just get silently ignored)
      
      And to solve the original motivation, we use the hide external libs flag.
      c33afe78
    • Niklas Haas's avatar
      Revert "meson: use a linker script for symbol visibility" · 6e668b40
      Niklas Haas authored
      This reverts commit 6835ae5d.
      6e668b40
  10. 29 Sep, 2018 3 commits
  11. 27 Sep, 2018 1 commit
  12. 31 Aug, 2018 3 commits
  13. 29 Aug, 2018 3 commits
  14. 25 Aug, 2018 1 commit
  15. 03 Jul, 2018 1 commit
  16. 20 Jun, 2018 2 commits
  17. 09 Jun, 2018 1 commit
  18. 28 May, 2018 2 commits
  19. 25 Feb, 2018 2 commits
  20. 12 Feb, 2018 1 commit
  21. 02 Feb, 2018 1 commit
    • Niklas Haas's avatar
      ra: rename ra to pl_gpu, change ra_ to pl_ · 3e881060
      Niklas Haas authored
      This is a very major rewrite operation, but all of the actual logic is
      unaffected. The change is completely cosmetic.
      
      The idea behind this is to avoid clashing the mpv ra_ namespace when
      libplacebo eventually makes its way back into mpv, allowing it to
      coexist with vo_gpu peacefully (at least for the transition period).
      
      It's also sort of weirdly inconsistent with the rest of libplacebo
      anyway.
      3e881060
  22. 25 Jan, 2018 3 commits
    • Niklas Haas's avatar
      osdep: nuke printf.h · 403bd7a5
      Niklas Haas authored
      Instead of using shitty platform-specific hacks to get a
      locale-invariant printf, we can just use our own printf routines for the
      purposes of shader generation. This required making one slight
      adjustment to one of the shaders in order to avoid the (now unsupported)
      %%lu.
      
      We now use the regular platform-provided snprintf for log messages and
      other user-facing stuff, which should be fine. (We also technically use
      it in a couple of places for snprintf with %d, but that should hopefully
      not explode)
      403bd7a5
    • Niklas Haas's avatar
      bstr: add locale-invariant bstr_xappend_(v)asprintf · edef7b89
      Niklas Haas authored
      To keep things simple, these only support %d, %f and %s, with no length
      modifiers. %d is assumed to be limited to int32_t precision, which is
      sufficient for our needs.
      edef7b89
    • Niklas Haas's avatar
      456dbedb
  23. 22 Jan, 2018 1 commit
  24. 18 Jan, 2018 2 commits
  25. 16 Jan, 2018 1 commit
    • Niklas Haas's avatar
      vulkan: add swapchain implementation · 8e7f3950
      Niklas Haas authored
      Mostly ported from mpv, but some parts were slightly rewritten. Notably,
      the way window resizing is handled. Instead of having two different
      sources of window size information and having to argue about which one
      to take as authoritative, we only use the current extent as reported by
      the vulkan implementation.
      
      Apparently, not all platforms report valid values here - particularly,
      wayland apparently doesn't. If somebody has an idea for how to figure
      out the size of a wayland window, feel free to tell me; because the
      vulkan wayland extension doesn't seem to consider it being possible.
      8e7f3950