summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2015-09-24 02:18:07 -0400
committerConnor Abbott <[email protected]>2015-10-09 10:15:28 -0400
commitbb59ba8634e3e5e3949103c6013918b8a4953111 (patch)
tree512f88886d81d69007f104ef1faf9067a3d8d76b /src/glsl/nir
parentbf5f931aee35e8448a6560545d86deb35f0639b3 (diff)
nir/instr_set: remove unnecessary check in nir_instrs_equal()
This was originally added to nir_instrs_equal() instead of nir_instr_can_cse() incorrectly, but this was fixed when moving to the instruction set API (as it had to be, otherwise hashing wouldn't work). Now, this is dead code since instr_can_rewrite() will only return true for texture instructions that use an index, so we can turn the check into an assert. This also means that now nir_instrs_equal(instr, instr) will always return true unless it assert-fails. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir')
-rw-r--r--src/glsl/nir/nir_instr_set.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/glsl/nir/nir_instr_set.c b/src/glsl/nir/nir_instr_set.c
index 7886003fe35..d3f939fe805 100644
--- a/src/glsl/nir/nir_instr_set.c
+++ b/src/glsl/nir/nir_instr_set.c
@@ -311,8 +311,7 @@ nir_instrs_equal(const nir_instr *instr1, const nir_instr *instr2)
}
/* Don't support un-lowered sampler derefs currently. */
- if (tex1->sampler || tex2->sampler)
- return false;
+ assert(!tex1->sampler && !tex2->sampler);
return true;
}