nir/lower_tex: Add lowering for some min_lod cases

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Jason Ekstrand
2018-10-11 14:14:29 -05:00
parent 4a691cfa7e
commit 4ef8f46fd1
2 changed files with 116 additions and 0 deletions

View File

@@ -3013,6 +3013,24 @@ typedef struct nir_lower_tex_options {
* Implies lower_txd_cube_map and lower_txd_shadow.
*/
bool lower_txd;
/**
* If true, lower nir_texop_txb that try to use shadow compare and min_lod
* at the same time to a nir_texop_lod, some math, and nir_texop_tex.
*/
bool lower_txb_shadow_clamp;
/**
* If true, lower nir_texop_txd on shadow samplers when it uses min_lod
* with nir_texop_txl. This includes cube maps.
*/
bool lower_txd_shadow_clamp;
/**
* If true, lower nir_texop_txd on when it uses both offset and min_lod
* with nir_texop_txl. This includes cube maps.
*/
bool lower_txd_offset_clamp;
} nir_lower_tex_options;
bool nir_lower_tex(nir_shader *shader,