summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-03-27 09:43:23 -0700
committerJason Ekstrand <[email protected]>2018-06-22 20:54:00 -0700
commit54bfc0cbcf423218ea8e665a40b4c3121861f75b (patch)
tree91f9c9ad68cb0030c31b407ddd597b2cb29e44e9 /src/compiler/nir
parenta3589bb01f73e7b9c23ffb15ee78f21fe4c846a0 (diff)
nir: Remove deref chain support from lower_tex
Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_lower_tex.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c
index 449b92fbce3..da7f82c10ca 100644
--- a/src/compiler/nir/nir_lower_tex.c
+++ b/src/compiler/nir/nir_lower_tex.c
@@ -124,9 +124,7 @@ get_texture_size(nir_builder *b, nir_tex_instr *tex)
txs->is_shadow = tex->is_shadow;
txs->is_new_style_shadow = tex->is_new_style_shadow;
txs->texture_index = tex->texture_index;
- txs->texture = nir_deref_var_clone(tex->texture, txs);
txs->sampler_index = tex->sampler_index;
- txs->sampler = nir_deref_var_clone(tex->sampler, txs);
txs->dest_type = nir_type_int;
unsigned idx = 0;
@@ -251,9 +249,7 @@ sample_plane(nir_builder *b, nir_tex_instr *tex, int plane)
plane_tex->coord_components = 2;
plane_tex->texture_index = tex->texture_index;
- plane_tex->texture = nir_deref_var_clone(tex->texture, plane_tex);
plane_tex->sampler_index = tex->sampler_index;
- plane_tex->sampler = nir_deref_var_clone(tex->sampler, plane_tex);
nir_ssa_dest_init(&plane_tex->instr, &plane_tex->dest, 4, 32, NULL);
@@ -367,8 +363,6 @@ replace_gradient_with_lod(nir_builder *b, nir_ssa_def *lod, nir_tex_instr *tex)
txl->is_shadow = tex->is_shadow;
txl->is_new_style_shadow = tex->is_new_style_shadow;
txl->sampler_index = tex->sampler_index;
- txl->texture = nir_deref_var_clone(tex->texture, txl);
- txl->sampler = nir_deref_var_clone(tex->sampler, txl);
txl->coord_components = tex->coord_components;
nir_ssa_dest_init(&txl->instr, &txl->dest, 4, 32, NULL);
@@ -888,6 +882,8 @@ nir_lower_tex(nir_shader *shader, const nir_lower_tex_options *options)
{
bool progress = false;
+ nir_assert_unlowered_derefs(shader, nir_lower_texture_derefs);
+
nir_foreach_function(function, shader) {
if (function->impl)
progress |= nir_lower_tex_impl(function->impl, options);