summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-02-06 09:05:10 -0800
committerJason Ekstrand <[email protected]>2016-02-09 15:00:17 -0800
commitee85014b90af1d94d637ec763a803479e9bac5dc (patch)
tree91a7aea9be51e8c18b18f40f237175e9471e0d41 /src/gallium/auxiliary/nir
parent3f421849945d763b3e477ceb1c726c2dbed3bafd (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/gallium/auxiliary/nir')
-rw-r--r--src/gallium/auxiliary/nir/tgsi_to_nir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index 61ff0a74379..8cd8ea4cb66 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -1309,13 +1309,13 @@ ttn_tex(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
instr->coord_components++;
assert(tgsi_inst->Src[samp].Register.File == TGSI_FILE_SAMPLER);
- instr->sampler_index = tgsi_inst->Src[samp].Register.Index;
+ instr->texture_index = tgsi_inst->Src[samp].Register.Index;
/* TODO if we supported any opc's which take an explicit SVIEW
* src, we would use that here instead. But for the "legacy"
* texture opc's the SVIEW index is same as SAMP index:
*/
- sview = instr->sampler_index;
+ sview = instr->texture_index;
if (op == nir_texop_lod) {
instr->dest_type = nir_type_float;
@@ -1456,8 +1456,8 @@ ttn_txq(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
setup_texture_info(qlv, tgsi_inst->Texture.Texture);
assert(tgsi_inst->Src[1].Register.File == TGSI_FILE_SAMPLER);
- txs->sampler_index = tgsi_inst->Src[1].Register.Index;
- qlv->sampler_index = tgsi_inst->Src[1].Register.Index;
+ txs->texture_index = tgsi_inst->Src[1].Register.Index;
+ qlv->texture_index = tgsi_inst->Src[1].Register.Index;
/* only single src, the lod: */
txs->src[0].src = nir_src_for_ssa(ttn_channel(b, src[0], X));