1. 24 Nov, 2018 1 commit
  2. 21 Nov, 2018 2 commits
    • Philip Langdale's avatar
      gpu: add pl_sync (a semaphore pair) · b0fddcc5
      Philip Langdale authored
      This change introduces the generic definition of an exported semaphore
      pair. Such a pair can be imported by an external API for signalling and
      waiting, and will be passable to _hold() and _release() methods once
      those get introduced.
      
      Semaphores for internal use should just be created directly.
      b0fddcc5
    • Philip Langdale's avatar
      gpu: refactor shared memory handle API · 5198e156
      Philip Langdale authored
      When we introduce exportable semaphores, we'll have handles which are
      not memory-backed. To avoid a sloppy API, let's explicitly separate the
      two ideas. This also presents an opportunity to pull the object offset
      within the memory into the mem_handle definition. We also refactor the
      way the handle caps are presented to the user, to allow distinguishing
      between caps for shared memory and those for semaphores.
      
      We also turn the struct pl_gpu_handle into a union, since in practice,
      it is not going to be useful to export a given resource as multiple
      types of external handle - it will just one or another type. (This is
      mostly a simple substitution, but we must also note that vk_slabs must
      also carry the handle type explicitly, as we can no longer look at which
      field(s) are set in a pl_gpu_handle.)
      
      This is obviously an API break for any external usage of buffers or
      textures.
      5198e156
  3. 17 Nov, 2018 1 commit
    • Niklas Haas's avatar
      gpu: move pl_buffer_var from gpu.h to shaders.h · 573cf43c
      Niklas Haas authored
      This makes no real sense in gpu.h, since the pl_gpu doesn't actually
      need this information in any way. It's only needed for the shader header
      generation inside dispatch.h, so having it in shaders.h is the right
      place.
      
      Makes some code arguably a bit uglier, but whatever.
      573cf43c
  4. 16 Nov, 2018 1 commit
    • Niklas Haas's avatar
      gpu: drop the dynamic ubo/ssbo/pushc layouts · 51379b3f
      Niklas Haas authored
      Ever since SPIRV-Cross has started emulating std140 layout when
      cross-compiling SPIR-V to D3D11, there's no more real justification for
      us to make this dependent on the backend type.
      
      In theory, metal could require something different here - but even then
      we should work around it in SPIRV-Cross rather than trying to make our
      code depend on it at runtime.
      51379b3f
  5. 04 Nov, 2018 2 commits
  6. 30 Oct, 2018 1 commit
  7. 26 Oct, 2018 2 commits
  8. 25 Oct, 2018 1 commit
    • Niklas Haas's avatar
      gpu: add pl_gpu_finish · 2e742f53
      Niklas Haas authored
      Much like glFinish, this can be useful when you want to force all GPU
      work to be completed (for any number of reasons, e.g. deinit logic or
      for benchmarking purposes).
      2e742f53
  9. 29 Sep, 2018 1 commit
    • Niklas Haas's avatar
      common: switch to explicit includes · b6104e12
      Niklas Haas authored
      Since we no longer need the GCC pragma for symbol visibility, there's
      also no more reason to have common.h import everything under the sun -
      so only have modules import what they actually use.
      
      This speeds up compilation a tiny bit.
      b6104e12
  10. 08 Feb, 2018 2 commits
    • Niklas Haas's avatar
      vulkan: implement texture format emulation · db75867d
      Niklas Haas authored
      This required some pretty complicated logic, but I tested it and it
      seems to be working. Basically, we can now just directly upload e.g.
      rgb8 by treating it as rgba8. This is a gigantic hack, but it's much
      faster than trying to CPU-convert it in cases where the data is already
      readily available in packed form, e.g. in a mapped buffer.
      
      Closes #9
      db75867d
    • Niklas Haas's avatar
      gpu: cap the size of a buffer pool · b8739354
      Niklas Haas authored
      If all 8 buffers are in use, just block for availability
      b8739354
  11. 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