summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_tex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_lower_tex.c')
-rw-r--r--src/compiler/nir/nir_lower_tex.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c
index ae24fb2e16a..4c0759b8788 100644
--- a/src/compiler/nir/nir_lower_tex.c
+++ b/src/compiler/nir/nir_lower_tex.c
@@ -133,7 +133,7 @@ get_texture_size(nir_builder *b, nir_tex_instr *tex)
txs = nir_tex_instr_create(b->shader, 1);
txs->op = nir_texop_txs;
txs->sampler_dim = GLSL_SAMPLER_DIM_RECT;
- txs->sampler_index = tex->sampler_index;
+ txs->texture_index = tex->texture_index;
txs->dest_type = nir_type_int;
/* only single src, the lod: */
@@ -291,11 +291,11 @@ nir_lower_tex_block(nir_block *block, void *void_state)
/* mask of src coords to saturate (clamp): */
unsigned sat_mask = 0;
- if ((1 << tex->sampler_index) & state->options->saturate_r)
+ if ((1 << tex->texture_index) & state->options->saturate_r)
sat_mask |= (1 << 2); /* .z */
- if ((1 << tex->sampler_index) & state->options->saturate_t)
+ if ((1 << tex->texture_index) & state->options->saturate_t)
sat_mask |= (1 << 1); /* .y */
- if ((1 << tex->sampler_index) & state->options->saturate_s)
+ if ((1 << tex->texture_index) & state->options->saturate_s)
sat_mask |= (1 << 0); /* .x */
/* If we are clamping any coords, we must lower projector first
@@ -317,10 +317,10 @@ nir_lower_tex_block(nir_block *block, void *void_state)
state->progress = true;
}
- if (((1 << tex->sampler_index) & state->options->swizzle_result) &&
+ if (((1 << tex->texture_index) & state->options->swizzle_result) &&
!nir_tex_instr_is_query(tex) &&
!(tex->is_shadow && tex->is_new_style_shadow)) {
- swizzle_result(b, tex, state->options->swizzles[tex->sampler_index]);
+ swizzle_result(b, tex, state->options->swizzles[tex->texture_index]);
state->progress = true;
}
}