gallium/auxiliary/vl: Set correct csc matrix in set_buffer_layer
What does this MR do and why?
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.
Tested with:
# YUV to RGB
ffmpeg -vaapi_device /dev/dri/renderD128 -f lavfi -i testsrc -vf hwupload,scale_vaapi=format=rgba,hwdownload,format=rgba,format=nv12,hwupload,scale_vaapi=format=rgba,hwdownload,format=rgba -vframes 1 -f image2 -y /tmp/out%03d.png
# RGB to RGB
ffmpeg -vaapi_device /dev/dri/renderD128 -f lavfi -i testsrc -vf format=bgra,hwupload,scale_vaapi=format=rgba,hwdownload,format=rgba -vframes 1 -f image2 -y /tmp/out%03d.png