1. 02 Jun, 2019 1 commit
    • Niklas Haas's avatar
      config: replace PL_FIX_VER/PL_VERSION by runtime functions · 22a99191
      Niklas Haas authored
      Since the fix version is not part of the ABI, we can't use a header
      define for it. (And indeed, users can't use this information as part of
      any preprocessor check - nor should they need to)
      I won't bother bumping the API version for this change because it's
      unlikely to result in any breakage.
  2. 31 May, 2019 1 commit
    • Philip Langdale's avatar
      vulkan: Suppress validation errors when binding imported image memory · dc1059b2
      Philip Langdale authored
      Importing image memory is a funny thing; there's no core mechanism
      to communicate the layout of the image. Depending on how exactly
      the memory was imported, and where it was imported from, it might
      be possible to manage without explicit knowledge of layout, or
      out-of-band mechanisms might exist to communicate it.
      Today, we specifically can handle importing of memory via dma_buf
      fds. While there is a Vulakn extension defined that could help
      to communicate layout (VK_EXT_image_drm_format_modifier), this
      extension isn't actually implemented in any driver and it doesn't
      look like it will happen any time soon.
      Without it, we have to hope that imported memory has the same layout
      that Vulkan expects, based on the declared image format. In
      practice, this has proven to be true for the real world scenario
      we care about - which is importing decoded video from VAAPI - there
      are only a couple of relevant formats, and the drivers for both
      Vulkan and VAAPI are written by the same sets of people following
      the same hardware driven recommendations for layout.
      However, just because layouts match in practice, doesn't mean that
      they pass validation. What we see is that, for some formats,
      validation will fail when binding memory, saying that the memory
      segment is smaller than the vulkan-calcuated memory size. I assume
      this happens due to a difference in memory alignment (pretty much
      any other cause would lead to visible errors).
      As we would like to be able to use VAAPI imported surfaces without
      sacrificing validation, we need a way to filter out these expected
      errors, and let validation proceed as normal elsewhere.
      The mechanism we've decided on is to provide a way to ignore
      errors on a specified vulkan object (in our specific case, the
      VkImage). We store the object ID before the bind call, and clear
      it afterwards. While it is set, errors on that object will be
      It's a simple mechanism that isn't thread safe, but could be made
      so if/when the need arises.
  3. 26 May, 2019 1 commit
    • Niklas Haas's avatar
      vulkan: change infinite loop polls to block indefinitely · 644f9d57
      Niklas Haas authored
      I forgot what the original justification was for using short timeouts
      here (perhaps some driver bug?) but in any case, it doesn't seem to make
      any sense anymore.
      This reduces CPU usage drastically on some drivers. I kept one loop at
      10 ms since it shouldn't be hit anyways, and this way we know it's stuck
      in that loop for absurd amounts of time.
  4. 24 May, 2019 3 commits
  5. 15 May, 2019 1 commit
  6. 25 Apr, 2019 1 commit
  7. 15 Apr, 2019 1 commit
    • Philip Langdale's avatar
      xtalloc: Re-prefix all ta_* symbols to xta_* · 12aab84a
      Philip Langdale authored
      xtalloc was copied from mpv, which means that we see symbol
      collisions if libplacebo is statically linked into mpv. So
      use an `xta_` prefix for all the functions. In practice, this
      has almost no effect on the consuming code because everything
      is accessed via macros.
  8. 14 Apr, 2019 1 commit
    • Philip Langdale's avatar
      spirv: Prefix spirv compiler function struct names · 4912e344
      Philip Langdale authored
      These structs are included via extern declarations, so they can
      silently conflict with equivalently named declarations in an
      application if libplacebo is included statically.
      And this happens with mpv, which also declares a `spirv_shaderc`
      So, prefix the struct names with `pl_` to avoid this.
  9. 01 Apr, 2019 2 commits
  10. 18 Mar, 2019 1 commit
    • Niklas Haas's avatar
      vulkan: fix overzealous misalignment check on texture transfers · e16dd395
      Niklas Haas authored
      These made it so that the async transfer queue was never actually used.
      This is obviously a massive performance regression on all drivers
      supporting asynchronous transfer (e.g. AMDVLK).
      The spec explicitly allows the case where the transfer spans the entire
      image, i.e. offset+extent = size.
  11. 07 Mar, 2019 1 commit
    • Niklas Haas's avatar
      shaders/av1: release under MIT · 2ee4b041
      Niklas Haas authored
      dav1d people want this to be permissive so they can adapt it for
      documentation purposes. I have no problems releasing this specific file
      under a permissive license.
      Note that since both the header and source code heavily depend on the
      LGPLv2.1+ parts of libplacebo, this licensing change isn't terribly
      useful unless you're just interested in copying fragments of the glsl
      code or some of the C helper functions.
  12. 24 Feb, 2019 6 commits
    • Niklas Haas's avatar
      vulkan: fix external memory vs external semaphore type confusion · cd7d4be8
      Niklas Haas authored
      These are different enums, with different legal members. Not only does
      this avoid a warning, it also avoids future disaster by conflating the
    • Niklas Haas's avatar
      shaders: compat for GLSL < 130 · bd502804
      Niklas Haas authored
      We need to use the explicitly named functions like texture2D(),
      texture3D() etc. for low GLSL versions. Add a bunch of shitty
      compatibility code to template out the function name.
      The specific way I solved it also opens us up to allowing e.g. rectangle
      textures in the future.
    • Niklas Haas's avatar
      shaders: cosmetic (code moving) · 02a2f7bd
      Niklas Haas authored
      Make this a function instead of a static inline, since it's complicated
    • Niklas Haas's avatar
      shaders: allow overriding shader GLSL version explicitly · 27835a8b
      Niklas Haas authored
      This can be useful for API users that don't want to go through the
      bother of setting up a dummy `pl_gpu` just to create some shaders.
    • Niklas Haas's avatar
      shaders: refactor shader creation API · 729e4aee
      Niklas Haas authored
      - I wanted to add new parameters, and rather than having the function
        signature grow out of control, I decided to switch to the same
        `params`-style as the rest of libplacebo, for future forwards
      - We need to expose the identifier, because users of raw shaders might
        want to combine multiple shaders into the same GLSL program.
      This kills off the hacky `_ex` functions and uses a params struct. Also
      organizes some fields around, for reasons.
    • Niklas Haas's avatar
      shaders: change implicit GLSL version assumptions · 44b4f779
      Niklas Haas authored
      Instead of assuming the lowest possible, assume GLSL 130 as the
      baseline. This requires bumping the API version because it is a breaking
      change to some use cases.
      Also a missing GLSL version compat check to the dither code.
  13. 14 Feb, 2019 2 commits
    • Niklas Haas's avatar
      README: reformat and reorganize · 717e49c5
      Niklas Haas authored
      - change HTML syntax to markdown syntax
      - move the (now rather lengthy) authors section below the (more
        important) API overview section
      - merge (and reword) the contributors and authors sections, which were a
        bit redundant
      - also remove the (now redundant) support section
    • Jess's avatar
      README: add backers and sponsors · cee477fb
      Jess authored
  14. 06 Feb, 2019 3 commits
  15. 03 Feb, 2019 1 commit
  16. 31 Jan, 2019 1 commit
  17. 29 Jan, 2019 2 commits
    • Niklas Haas's avatar
      demos/sdl2: add new swapchain API usage example · 2c348dbb
      Niklas Haas authored
      Technically needed for wayland. Not that SDL2 supports it anyway.
    • Niklas Haas's avatar
      swapchain: add resizing API · ad242535
      Niklas Haas authored
      This is used both for updating the size and querying the size. I don't
      want to make these separate functions because it should be painfully
      obvious that the size you get may not be the size you request.
      This allows libplacebo to work on wayland, which mediates the concept of
      swapchain resizing to protocols like xdg_shell that mesa/vulkan can't
      know anything about (by design).
  18. 28 Jan, 2019 1 commit
  19. 11 Jan, 2019 9 commits
  20. 05 Jan, 2019 1 commit