nir: Add colorspace support to YUV lowering pass
authorDavid Stevens <stevensd@chromium.org>
Wed, 8 Jul 2020 04:23:22 +0000 (13:23 +0900)
committerMarge Bot <eric+marge@anholt.net>
Fri, 31 Jul 2020 07:27:03 +0000 (07:27 +0000)
commitd8fdb8dab4658de2d255718627ee671e84fedf2d
treed3bd4e91af685c341612a54c586594eccc621833
parentf3509c07663bf72da43d3b47c391acd75d33430a
nir: Add colorspace support to YUV lowering pass

This change adds support for BT709 and BT2020 colorspace to the YUV
lowering pass. The default remains BT601.

This change also fixes minor imprecision in the last digits of the BT601
offsets due to computation from rounded values when the math was
simplified.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6122>
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_tex.c