diff options
author | Rob Clark <[email protected]> | 2015-09-16 12:56:58 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-09-18 21:07:49 -0400 |
commit | faf5f174ddbc7680f6947ceababb94fdb552bcdb (patch) | |
tree | e397325f701a364dcc5010016ccee4a4a852485c /src/glsl/nir/nir.h | |
parent | f83ba7bc41a381a0e52c456431dbe1a15176ffb4 (diff) |
nir/lower_tex: support projector lowering per sampler type
Some hardware, such as adreno a3xx, supports txp on some but not all
sampler types. In this case we want more fine grained control over
which texture projectors get lowered.
v2: split out nir_lower_tex_options struct to make it easier to
add the additional parameters coming in the following patches
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r-- | src/glsl/nir/nir.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index c484d8e81ce..4600fb0a744 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1836,7 +1836,18 @@ void nir_lower_samplers(nir_shader *shader, const struct gl_shader_program *shader_program); void nir_lower_system_values(nir_shader *shader); -void nir_lower_tex(nir_shader *shader); + +typedef struct nir_lower_tex_options { + /** + * bitmask of (1 << GLSL_SAMPLER_DIM_x) to control for which + * sampler types a texture projector is lowered. + */ + unsigned lower_txp; +} nir_lower_tex_options; + +void nir_lower_tex(nir_shader *shader, + const nir_lower_tex_options *options); + void nir_lower_idiv(nir_shader *shader); void nir_lower_clip_vs(nir_shader *shader, unsigned ucp_enables); |