summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_instr_set.c
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/compiler/nir/nir_instr_set.c
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/compiler/nir/nir_instr_set.c')
-rw-r--r--src/compiler/nir/nir_instr_set.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/compiler/nir/nir_instr_set.c b/src/compiler/nir/nir_instr_set.c
index d3f939fe805..4489a881905 100644
--- a/src/compiler/nir/nir_instr_set.c
+++ b/src/compiler/nir/nir_instr_set.c
@@ -155,10 +155,10 @@ hash_tex(uint32_t hash, const nir_tex_instr *instr)
hash = HASH(hash, instr->const_offset);
unsigned component = instr->component;
hash = HASH(hash, component);
- hash = HASH(hash, instr->sampler_index);
- hash = HASH(hash, instr->sampler_array_size);
+ hash = HASH(hash, instr->texture_index);
+ hash = HASH(hash, instr->texture_array_size);
- assert(!instr->sampler);
+ assert(!instr->texture);
return hash;
}
@@ -305,13 +305,13 @@ nir_instrs_equal(const nir_instr *instr1, const nir_instr *instr2)
memcmp(tex1->const_offset, tex2->const_offset,
sizeof(tex1->const_offset)) != 0 ||
tex1->component != tex2->component ||
- tex1->sampler_index != tex2->sampler_index ||
- tex1->sampler_array_size != tex2->sampler_array_size) {
+ tex1->texture_index != tex2->texture_index ||
+ tex1->texture_array_size != tex2->texture_array_size) {
return false;
}
- /* Don't support un-lowered sampler derefs currently. */
- assert(!tex1->sampler && !tex2->sampler);
+ /* Don't support un-lowered texture derefs currently. */
+ assert(!tex1->texture && !tex2->texture);
return true;
}
@@ -421,8 +421,8 @@ instr_can_rewrite(nir_instr *instr)
case nir_instr_type_tex: {
nir_tex_instr *tex = nir_instr_as_tex(instr);
- /* Don't support un-lowered sampler derefs currently. */
- if (tex->sampler)
+ /* Don't support un-lowered texture derefs currently. */
+ if (tex->texture)
return false;
return true;