render/color: replace COLOR_TRANSFORM_LUT_3D with COLOR_TRANSFORM_LCMS2

Converting the LCMS2 transform to a 3D LUT early causes issues:

- It's a lossy process, the consumer will not be able to pick a
  3D LUT size on their own.
- It requires unnecessary conversions and allocations: an intermediate
  3D LUT is allocated, but the renderer already allocates one.
- It makes it harder to support arbitrary color transforms in the
  renderer, because each type needs to be handled differently.

Instead, expose a function to evaluate a color transform, and use
that to build the 3D LUT in the renderer.
This commit is contained in:
Simon Ser 2025-05-24 13:04:45 +02:00 committed by Kenny Levinsen
parent 9b97e2607d
commit 3665b53e29
6 changed files with 109 additions and 111 deletions

View file

@ -516,6 +516,7 @@ struct wlr_vk_color_transform {
struct wl_list link; // wlr_vk_renderer, list of all color transforms
struct {
size_t dim;
VkImage image;
VkImageView image_view;
VkDeviceMemory memory;