gallium/auxiliary/vl: Set correct csc matrix in set_buffer_layer
authorDavid Rosca <nowrep@gmail.com>
Thu, 10 Aug 2023 20:05:12 +0000 (22:05 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 14 Aug 2023 18:18:16 +0000 (18:18 +0000)
commitcbb28eaeaf35ca5581e6d75a1fa15533984d66ce
tree440486f883c6f19c01f4cff4da7ad7ed37950e98
parent69fa48fbb1cca7b2fd804104077b17dedadfd090
gallium/auxiliary/vl: Set correct csc matrix in set_buffer_layer

Shaders used in set_buffer_layer will apply colorspace conversion,
so we need to set correct matrix depending on the input and output
surface formats.
Use BT.601 (default) for YUV to RGB and identity for RGB to RGB.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24626>
src/gallium/auxiliary/vl/vl_compositor.c