1. 19 Apr, 2021 4 commits
  2. 06 Apr, 2021 7 commits
    • Niklas Haas's avatar
      meson: bump fix version · ec69102e
      Niklas Haas authored
      So I can tag this commit for a point release.
      ec69102e
    • Niklas Haas's avatar
      demos: install `plplay` if demos are enabled · d0123440
      Niklas Haas authored
      This is a useful enough tool that I think installing it makes sense.
      (Unlike the other demos)
      
      People that don't want it can still disable the `demos` build option.
      d0123440
    • Niklas Haas's avatar
      demos: modularize windowing backend · 34decaab
      Niklas Haas authored
      Instead of compiling all variants of all demos, load the best backend at
      runtime. Also split off the nuklear implementation into a separate
      library to avoid excessively recompiling it, something that should have
      been done ages ago.
      
      This is technically a functionality downgrade, since it doesn't allow
      users to choose which backend to use (Vulkan or OpenGL), instead always
      picking the "best" backend. But that's mostly interesting for
      developers, not users, I think.
      
      I'll probably implement some mechanism for making that selection at
      runtime, when I actually need it.
      
      As an aside, I also renamed 'image' to 'sdlimage' since I think the name
      fits better - the only reason I didn't in the past was to avoid
      confusion with the suffix.
      34decaab
    • Niklas Haas's avatar
      demos/plplay: fix lifetime of AVFrame · 3ab959cd
      Niklas Haas authored
      This was accidentally freed too early, causing memory corruption when
      playing files with embedded ICC profiles.
      3ab959cd
    • Niklas Haas's avatar
      utils/libav: clarify lifetime of `pl_upload_avframe` · 77928eac
      Niklas Haas authored
      Turns out I actually made this very mistake. Oops.
      77928eac
    • Niklas Haas's avatar
      demos: reduce verbosity across the board · af12b592
      Niklas Haas authored
      No reason for this confusing `demo_context()` anyway, just pick a
      suitable verbosity level for each demo. In particular, `plplay` was way
      too spammy.
      af12b592
    • Niklas Haas's avatar
      tests/fuzz: add shaders fuzzer · 1f2f2b6d
      Niklas Haas authored
      Fuzz various patterns of creating and combining shaders, including
      subshaders and various types of attached resource.
      
      The API fuzzing is realized by iterating through a plaintext string
      describing the order of operations to perform, using a simple
      stack-based shader combinator language.
      1f2f2b6d
  3. 05 Apr, 2021 4 commits
  4. 04 Apr, 2021 6 commits
  5. 02 Apr, 2021 1 commit
    • Niklas Haas's avatar
      ci: delete unused cross files · 6881d3ab
      Niklas Haas authored
      These are pulled from the CI image anyway. Their presence in the repo
      itself makes no sense since all of the information inside it is
      environment-specific, meaning it only works on the developer's
      machine(tm).
      
      Unfortunately the reality of cross compiling in 2021 is that people will
      just have to do it themselves. Which is probably irrelevant anyway
      because who the fuck is manually cross-compiling stuff instead of
      relying on existing distro tools to do it for them?
      6881d3ab
  6. 01 Apr, 2021 4 commits
  7. 31 Mar, 2021 5 commits
    • Niklas Haas's avatar
      demos/plplay: add support for loading custom shaders · 0dc3d06d
      Niklas Haas authored
      Now I *finally* have a good test platform for this stuff, especially
      obscure interactions between shader order and such.
      0dc3d06d
    • Niklas Haas's avatar
      shaders/custom: fix COMPUTE parsing · 2c49cdc0
      Niklas Haas authored
      In the switch to `pl_str_parse_int`, we forgot to actually strip the
      line before and after parsing.
      
      Additionally, `out->is_compute` was accidentally never set to true.
      2c49cdc0
    • Niklas Haas's avatar
      renderer: fix segfault when using custom hooks · c290d27d
      Niklas Haas authored
      Oops. HASH_PTR overwrite this by NULL, which was not intended.
      c290d27d
    • Niklas Haas's avatar
      demos/plplay: add GUI for loading custom LUTs · 2449ba51
      Niklas Haas authored
      Implemented using drag&drop region because nuklear doesn't provide
      anything resembling a file picker dialog.
      
      This is only for `pl_render_params.lut`, not for image/target LUTs. This
      is obviously suboptimal, but I need a better place to override those.
      2449ba51
    • Niklas Haas's avatar
      demos: add support for file drag&drop · 287684ab
      Niklas Haas authored
      I've decided this is by far the easiest way to avoid having to implement
      a file picker dialog, which would be significantly harder.
      
      Ideally we should support loading new files in plplay itself this way,
      but I couldn't be bothered implementing this yet.
      287684ab
  8. 30 Mar, 2021 1 commit
    • Niklas Haas's avatar
      renderer: only force-enable 3DLUT for actual conversions · fcd80494
      Niklas Haas authored
      This logic is not perfect, but good enough for what's essentially a
      debug feature. This (conservatively) avoids forcing an ICC for what we
      essentially know is a no-op transformation.
      
      Importantly, this somewhat relaxed check is never a false negative.
      Also rewrite the logic a bit to reduce symbol clutter.
      
      Fixes #134
      fcd80494
  9. 29 Mar, 2021 5 commits
    • Niklas Haas's avatar
      filters: refactor and expand filter presets · 80ab65fd
      Niklas Haas authored
      Rename this to pl_filter_preset to make the intent clearer, and add an
      extra field `description` to provide a friendlier name.
      
      In addition to this change, re-order the list to move the popular
      filters up to the top of the list, as well as adding a "none" entry
      corresponding to the built-in sampling.
      
      Finally, add pl_frame_mixers to provide frame mixer presets.
      
      Update plplay to use these new fields/structs.
      80ab65fd
    • Niklas Haas's avatar
      colorspace: add color temperature adjustment · 8a1c10f0
      Niklas Haas authored
      In theory, this is not quite the right place to do this adjustment,
      because it's applied in gamma light. But the alternative fix here, I
      think, would be making `pl_renderer` smart enough to apply these
      controls on its own. Plus, I don't think this feature is worth the extra
      API complexity of somehow moving it to a separate location. The more we
      can roll into this struct, the better.
      
      Supporting this, a helper is provided to compute the CIE xy coordinates
      for a given color temperature, as well as a function to compute a
      chromatic adaptation matrix.
      8a1c10f0
    • Niklas Haas's avatar
      utils: add PL_CLAMP helper · fabeb4f1
      Niklas Haas authored
      I noticed that a couple of usages of PL_MIN(PL_MAX and vice versa
      involve a wasteful double evaluation. Plus, the argument order of
      PL_CLAMP is way easier to remember.
      fabeb4f1
    • Niklas Haas's avatar
      demos/plplay: minor fixes · c8010c4e
      Niklas Haas authored
      Delete leftovers, and fix some error messages.
      c8010c4e
    • Niklas Haas's avatar
      renderer: fix deprecated struct name in comment · 3ba01d2a
      Niklas Haas authored
      Reference to the deprecated struct `pl_render_target`.
      3ba01d2a
  10. 26 Mar, 2021 3 commits
    • Niklas Haas's avatar
      README: add screenshot of plplay · 0b9f1eca
      Niklas Haas authored
      It would be cool if I could figure out more screenshots to add, maybe
      some sort of comparison between bilinear and jinc scaling or w/e.
      0b9f1eca
    • Niklas Haas's avatar
      utils/frame_queue: guard against future PTS · 7329f2c2
      Niklas Haas authored
      Fixes at least one abort() by turning it into a more reasonable
      fallback to zOH semantics.
      
      Not the proper solution to #133, but better than crashing.
      7329f2c2
    • Niklas Haas's avatar
      shaders/colorspace: make gamut warning less broken · 46ab5528
      Niklas Haas authored
      The current logic either just saturates the pixel or else does whatever.
      I realized there's no really sane way to "invert" an out-of-gamut color,
      and even if we did invert it in a reasonable manner, it's still less
      visible than just making it pink.
      
      Context provides better clues for what's out of gamut, anyways.
      46ab5528