summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2016-12-12 13:43:53 +0100
committerIago Toral Quiroga <[email protected]>2016-12-13 10:33:29 +0100
commitda3389a331b07d3e58aa9ad8df6864cc04f877e4 (patch)
treef053437938e77cb506b2c49a1f4142facbe1fa9a /src
parent44873ad0a45281479434a9183b644cb29407829b (diff)
nir/lower_tex: lower gradients on shadow cube maps if lower_txd_shadow is set
Even if lower_txd_cube_map isn't. Suggested by Ken to make the flag more consistent with its name. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_tex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c
index 91aa9e17431..c67a8eda3f2 100644
--- a/src/compiler/nir/nir_lower_tex.c
+++ b/src/compiler/nir/nir_lower_tex.c
@@ -784,8 +784,10 @@ nir_lower_tex_block(nir_block *block, nir_builder *b,
progress = true;
}
- if (tex->op == nir_texop_txd && options->lower_txd_cube_map &&
- tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE) {
+ if (tex->op == nir_texop_txd &&
+ tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE &&
+ (options->lower_txd_cube_map ||
+ (tex->is_shadow && options->lower_txd_shadow))) {
lower_gradient_cube_map(b, tex);
progress = true;
continue;