diff options
author | Jason Ekstrand <[email protected]> | 2016-02-06 09:05:10 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-02-09 15:00:17 -0800 |
commit | ee85014b90af1d94d637ec763a803479e9bac5dc (patch) | |
tree | 91a7aea9be51e8c18b18f40f237175e9471e0d41 /src/compiler/nir/nir_lower_tex.c | |
parent | 3f421849945d763b3e477ceb1c726c2dbed3bafd (diff) |
nir/tex_instr: Rename sampler to texture
We're about to separate the two concepts. When we do, the sampler will
become optional. Doing a rename first makes the separation a bit more
safe because drivers that depend on GLSL or TGSI behaviour will be fine to
just use the texture index all the time.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_tex.c')
-rw-r--r-- | src/compiler/nir/nir_lower_tex.c | 12 |
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; } } |