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 <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand
2016-02-06 09:05:10 -08:00
parent 3f42184994
commit ee85014b90
18 changed files with 95 additions and 95 deletions

View File

@@ -486,9 +486,9 @@ nir_tex_instr_create(nir_shader *shader, unsigned num_srcs)
for (unsigned i = 0; i < num_srcs; i++)
src_init(&instr->src[i].src);
instr->sampler_index = 0;
instr->sampler_array_size = 0;
instr->sampler = NULL;
instr->texture_index = 0;
instr->texture_array_size = 0;
instr->texture = NULL;
return instr;
}
@@ -1007,8 +1007,8 @@ visit_tex_src(nir_tex_instr *instr, nir_foreach_src_cb cb, void *state)
return false;
}
if (instr->sampler != NULL) {
if (!visit_deref_src(instr->sampler, cb, state))
if (instr->texture != NULL) {
if (!visit_deref_src(instr->texture, cb, state))
return false;
}