summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_samplers.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2015-02-10 11:20:13 -0800
committerMatt Turner <[email protected]>2015-02-10 17:48:16 -0800
commit942b56ad05e3ae5a924e5b450f25084a332d9c89 (patch)
treee17c6d1fbbf60610d4c4e11094055d8a5f79aade /src/glsl/nir/nir_lower_samplers.cpp
parentfff0b2eab507527395d34c145b19cfa39dc0a44c (diff)
nir: Remove unused has_indirect variable.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_lower_samplers.cpp')
-rw-r--r--src/glsl/nir/nir_lower_samplers.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/glsl/nir/nir_lower_samplers.cpp b/src/glsl/nir/nir_lower_samplers.cpp
index dca086d709e..3015dbd09e7 100644
--- a/src/glsl/nir/nir_lower_samplers.cpp
+++ b/src/glsl/nir/nir_lower_samplers.cpp
@@ -69,7 +69,6 @@ lower_sampler(nir_tex_instr *instr, struct gl_shader_program *shader_program,
/* Get the name and the offset */
instr->sampler_index = 0;
- bool has_indirect = false;
char *name = ralloc_strdup(mem_ctx, instr->sampler->var->name);
for (nir_deref *deref = &instr->sampler->deref;
@@ -82,7 +81,6 @@ lower_sampler(nir_tex_instr *instr, struct gl_shader_program *shader_program,
* thing we have. This should be ok for now as we don't support
* arrays_of_arrays yet.
*/
- assert(!has_indirect);
instr->sampler_index *= glsl_get_length(deref->type);
switch (deref_array->deref_array_type) {
@@ -92,8 +90,6 @@ lower_sampler(nir_tex_instr *instr, struct gl_shader_program *shader_program,
ralloc_asprintf_append(&name, "[%u]", deref_array->base_offset);
break;
case nir_deref_array_type_indirect: {
- assert(!has_indirect);
-
instr->src = reralloc(mem_ctx, instr->src, nir_tex_src,
instr->num_srcs + 1);
memset(&instr->src[instr->num_srcs], 0, sizeof *instr->src);