summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_tex.c
diff options
context:
space:
mode:
authorSagar Ghuge <[email protected]>2018-12-13 11:40:58 -0800
committerSagar Ghuge <[email protected]>2018-12-18 13:44:09 -0800
commit933c44bcc435f2285be4c0cdb5684bacc193ff8d (patch)
tree4b20cff2ac8ce9993ad9be2b8b1cd0a475f3ec0a /src/compiler/nir/nir_lower_tex.c
parent7ea8e54dd6399b86961a89c35f46d8faccb2a52b (diff)
nir: Add a new lowering option to lower 3D surfaces from txd to txl.
Tested on gen9. v2: Rename lower_txd_3d_surafaces flag to lower_txd_3d (Jason Ekstrand) Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_tex.c')
-rw-r--r--src/compiler/nir/nir_lower_tex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c
index 6a6b6c41a7b..43094d5174d 100644
--- a/src/compiler/nir/nir_lower_tex.c
+++ b/src/compiler/nir/nir_lower_tex.c
@@ -905,7 +905,9 @@ nir_lower_tex_block(nir_block *block, nir_builder *b,
(options->lower_txd_shadow_clamp && tex->is_shadow && has_min_lod) ||
(options->lower_txd_offset_clamp && has_offset && has_min_lod) ||
(options->lower_txd_cube_map &&
- tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE))) {
+ tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE) ||
+ (options->lower_txd_3d &&
+ tex->sampler_dim == GLSL_SAMPLER_DIM_3D))) {
lower_gradient(b, tex);
progress = true;
continue;