Skip to content

The major changes of this release include a new and completely overhauled
HDR tone mapping algorithm, support for importing backing memory for
textures and buffers (such as via dmabuf fds), as well as a swapchain
resizing API that, among other benefits, allows libplacebo to function
properly on Wayland.

There is also now support for generating CPU-backed "dummy resources"
for things like lookup tables or convolution kernels, for users who
prefer managing their own GPU resources. This allows `pl_shader`-level
API users to access the full host of libplacebo shaders without being
restricted the lack of a `pl_gpu`.

- `pl_color_space` now has a `sig_scale` field, which allows modifying
   the signal range without affecting the transfer function's shape.
   (Effectively, by "stretching" it). This can be useful when dealing
   with HDR material encoded in a non-HDR curve such as linear light.
- Add support for importing handles (including `pl_sync` objects and
  `pl_shared_mem`). Currently, only memory can be imported.
- Add partial support for dmabuf fd interop. Currently does not support
  dma layout modifiers, so the usefulness of this feature is limited.
- Allow importing external memory when creating textures.
- Add a way to overexpose HDR material to bring its brightness up to
  more easily viewable levels.
- Add `pl_var_int` to go alongside the other `gpu.h` helpers.
- Add a way to create CPU-backed "dummy" instances of `pl_gpu`. These
  are not capable of compiling or executing any shaders, so they're only
  useful for users who want to generate and compile their own shaders.
  All GPU resources (textures, buffers) are backed by `malloc`.
- Add a new field to `pl_tex/buf_params` allowing users to attach
  arbitrary references (void*) that libplacebo will ignore.
- Add a function for changing the `pl_context_params` after creation.
- Add a new API function for dealing with swapchain resize events. This
  function can be used to both query and update the swapchain size, based
  on the usage. Not all platforms support all operations.
- Add new demo/skeleton based on GLFW.

- Remove the `hdr_simulation` field from `pl_color_map_params`.
  Use `signal_scale` on the target color space instead.
- Subdivide handle capabilities based on object type (texture vs
- Completely redesign the HDR tone mapping algorithm. Most members of
  `pl_tone_mapping_params` have been updated, in particular the options
  related to desaturation and peak detection.
- Split up the HDR peak detection API into a "detection" and
  "application" stage, which can run independently. This avoids the
  one-frame delay inherent with the previous API, and thus allows
  tone mapping to be frame perfect.
- Remove superfluous field from `pl_shader_reset` left behind from a
  previous version of the API.

Fixes and performance improvements:
- Correctly apply the OOTF before performing linear colorspace
  operations on scene-referred content.
- Avoid clipping when tone-mapping out of gamut content by tone mapping
  before gamut mapping.
- Correctly reset the peak detection buffer state when running
- Correctly use the image's original color space as the reference space
  when the content is prelinearized by the renderer. Fixes some cases
  where libplacebo could end up defaulting `PL_COLOR_TRC_AUTO` to a
  suboptimal curve.
- Correctly track the lifetime and ownership of individual vulkan buffer
  objects. Fixes some synchronization issues when attempting to use the
  same buffer from multiple different queue families.
- Fix integer overflow on implementations with very large texture size
- Fix building against static libshaderc.