nir: Add a lowering pass for YUV textures

This lowers sampling from YUV textures to 1) one or more texture
instructions to sample each plane and 2) color space conversion to RGB.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Kristian Høgsberg Kristensen
2016-05-01 21:13:37 -07:00
committed by Kristian Høgsberg Kristensen
parent 50c24c3ff3
commit a41b57679f
2 changed files with 126 additions and 0 deletions

View File

@@ -2345,6 +2345,13 @@ typedef struct nir_lower_tex_options {
*/
bool lower_rect;
/**
* If true, convert yuv to rgb.
*/
unsigned lower_y_uv_external;
unsigned lower_y_u_v_external;
unsigned lower_yx_xuxv_external;
/**
* To emulate certain texture wrap modes, this can be used
* to saturate the specified tex coord to [0.0, 1.0]. The