BACKPORT: UPSTREAM: mesa/st: Account for YUV color space and range.

- Upstream patch description:

This patch plumbs the YUV color space and range provided through
EGL_EXT_image_dma_buf_import all the way to nir_lower_tex().

NIR already accounts for the YUV color space courtesy of commit
d8fdb8da. However, the color space was wired only for i965/i915 (see
6c11a799) and not for Gallium.

Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16651>
(cherry picked from commit cd04679a08c7c276a7cadad5ddb5ced540d95300)

- Upstream MR:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16651

- Upstream commit:

https://gitlab.freedesktop.org/mesa/mesa/-/commit/cd04679a08c7c276a7cadad5ddb5ced540d95300

- Conflicts:

In st_program.c: it looks like st_create_fp_variant() has changed quite
a bit upstream. I went ahead and added the new options.bt709_external,
options.bt2020_external, and options.yuv_full_range_external right above
the NIR_PASS_V(state.ir.nir, nir_lower_tex, &options) call in the
ChromeOS version of st_create_fp_variant().

BUG=b:220336463
TEST=Play full-range video on drallion with the mesa-iris driver

Cq-Depend: chromium:3718548
Change-Id: I85d483eb06bfba03ff7c03afb8a7f7ba28a49e74
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/mesa/+/3718549
Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
6 files changed