Skip to content
Snippets Groups Projects
  1. Feb 26, 2023
  2. Feb 25, 2023
    • Kacper Michajłow's avatar
      plplay: forward dynamic brightness changes to display · ac45f213
      Kacper Michajłow authored
      Mostly for debugging purposes to see how slow display reacts to metadata
      changes.
      ac45f213
    • Kacper Michajłow's avatar
      swapchain/vulkan: properly remember the size · 7ecb1789
      Kacper Michajłow authored
      This allow `vk_sw_recreate(sw, 0, 0)` to correctly recreate swapchain
      when needed with previous size. Without this change expected size was
      not set and recreation failed.
      7ecb1789
    • Kacper Michajłow's avatar
      demos/plplay: add fullscreen mode · cd722bad
      Kacper Michajłow authored
      cd722bad
    • Kacper Michajłow's avatar
    • Kacper Michajłow's avatar
    • Niklas Haas's avatar
      demos/plplay: communicate detected CSP values to user · e3c3b020
      Niklas Haas authored
      Replace the "Auto" label by a more informative label than "unknown" if
      the colorspace information is signalled by the swapchain.
      e3c3b020
    • Niklas Haas's avatar
      demos/plplay: major refactor of HDR override section · 41e719ad
      Niklas Haas authored
      Instead of these complicated bools and structs that get updated from
      different places at diferent times, simplify this set of fields into
      something easier to understand: `force_*` fields which simply
      hard-override their respective values if present.
      
      Rather than updating from multiple places, we thread the configured
      target swapchain directly into the `update_settings` function so we can
      use it directly as the basis for our configured HDR levels, including
      displaying the actually-signalled values *as-is* in the absence of an
      override.
      
      We also allow the ICC luma hack to be configurable, forcing
      icc_params.max_luma to always be either the detected luminance or the
      configured luminance (falling back to the default SDR luminance).
      41e719ad
    • Niklas Haas's avatar
      d3d11/swapchain: strip unsupported HDR10+ metadata · f4e4d9f3
      Niklas Haas authored
      Until we support signalling this to the display, we need to whitelist
      here to prevent returning unsignalled properties back to the user.
      f4e4d9f3
    • Niklas Haas's avatar
      vulkan/swapchain: strip unsupported HDR10+ metadata · a2bfbc01
      Niklas Haas authored
      It makes no sense to re-return HDR metadata that we never signalled to
      the display, so strip it here to whitelist only properties that we
      actually support signalling to the display.
      a2bfbc01
    • Niklas Haas's avatar
      colorspace: add pl_color_space_nominal_luma to replace nominal_min/max · 8b49a25a
      Niklas Haas authored
      Due to a multitude of problems and corner cases, I became very unhappy
      with the way this field was handled, and decided to re-remove it. I
      don't think this affects any API users, so I won't bother with a
      deprecation period.
      
      The downside of using a function like this is that we increase CPU work
      on every usage site, but I don't really care about micro-optimizing
      this. (And the fact that `min_luma/max_luma` get defaulted to their
      detected values anyway at the beginning of pl_renderer makes this not so
      bad)
      
      One possibly unintended consequence of this change is that
      `pl_shader_(de)linearize` now default to SDR gamma even on empty
      structs. This is probably intended semantics, though our test framework
      does need to be changed to prevent it from exploding due to the implicit
      clipping semantics.
      8b49a25a
    • Niklas Haas's avatar
      colorspace: pass scene_max through luma coeffs · ac01feb4
      Niklas Haas authored
      Instead of just blindly taking the PL_MAX3() of this array. This should
      serve to hopefully fix a disconnect between what we consider to be the
      relevant metric (max luminance) and what HDR10+ thinks is important
      (maximum component).
      
      Arguably, doing it this way is worse for PL_TONE_MAP_RGB, but since we
      default to the BT.2446a-style PL_TONE_MAP_LUMA methods, this should give
      us better results in practice.
      ac01feb4
    • Niklas Haas's avatar
      ci: raise process limits for llvmpipe · 73435923
      Niklas Haas authored
      A smarter man would probably disable testing older GLSL versions on
      llvmpipe.
      73435923
    • Niklas Haas's avatar
      shaders/colorspace: mark src-dependent shader vars dynamic · d9a1482d
      Niklas Haas authored
      As these can change due to dynamic metadata etc.
      d9a1482d
    • Niklas Haas's avatar
      shaders: add SH_FLOAT_DYN etc. helpers · a03e9228
      Niklas Haas authored
      Parallels to SH_FLOAT for stuff we expect to be dynamic.
      a03e9228
    • Niklas Haas's avatar
      tests/gpu_tests: avoid rounding error in pl_planar_tests · 3a9ab636
      Niklas Haas authored
      Using 0.5 here is ambiguous as it falls exactly in between 0x7F and
      0x80. This test was effectively relying on rounding-up behavior.
      
      Fixes: videolan/libplacebo#247
      3a9ab636
    • Niklas Haas's avatar
      tests/string: add pl_str_append_asprintf_c test · 7727af76
      Niklas Haas authored
      This was never actually tested before now.
      7727af76
    • Niklas Haas's avatar
      dispatch: only execute string templates when compiling · 13372b0f
      Niklas Haas authored
      When re-using existing shaders, we now ignore the string builders, and
      defer execution to the case where the shader needs to be rebuilt.
      
      This commit needs a lot of special care to ensure that we don't conflate
      pass *signatures* (which are now based on the output of
      pl_str_builder_hash, unstable values that aren't expected to persist
      across program invocations) and the hash used for shader cache entries,
      which require some special finesse to ensure their values don't change
      as a result of this change.
      
      I've tested this commit to make sure that cached_program entries receive
      the exact same hash as before.
      13372b0f
    • Niklas Haas's avatar
      dispatch: switch to pl_str_builder · 7cb15c20
      Niklas Haas authored
      Not much exciting happening in this commit, since it doesn't actually
      save any work yet. That will happen in an upcoming commit, which will
      make `pl_shader_finalize` defer GLSL templating until required.
      7cb15c20
    • Niklas Haas's avatar
      shaders: switch to pl_str_builder · fba74b69
      Niklas Haas authored
      Instead of building a pl_str directly. This opens up the opportunity to
      avoid having to template strings altogether in the future, as well as
      allowing us to use more efficient string templaters (such as the output
      of a preprocessing stage with #pragma GLSL macros).
      fba74b69
    • Niklas Haas's avatar
      pl_string: add pl_str_builder · aaf16a05
      Niklas Haas authored
      Will replace `pl_str` inside `pl_shader`, with the ultimate goal of
      making shader construction more efficient.
      aaf16a05
    • Niklas Haas's avatar
      format: add pl_str_append_memprintf_c · 9b0782b6
      Niklas Haas authored
      Formats arguments directly from memory. Useful for wrapping printf-style
      calls into a pl_str_builder.
      9b0782b6
    • Niklas Haas's avatar
      format: use pl_str_append_raw · b24a8fb3
      Niklas Haas authored
      And also condense the logic slightly by coalescing these calls into a
      common base case for most data types.
      b24a8fb3
    • Niklas Haas's avatar
      pl_string: add pl_str_append_raw · 0cc4d5f6
      Niklas Haas authored
      To avoid overhead of adding a bunch of redundant \0 terminators in cases
      when we want to frequently append small strings, such as inside
      pl_str_append_asprintf_c.
      
      Also changes pl_str_append to always emit the \0 even when appending an
      empty string, so it can effectively be used as a way to force strings to
      be \0-terminated at the end of such a function.
      0cc4d5f6
  3. Feb 23, 2023
Loading