[Mesa-dev] [PATCH] anv: correct a duplicate check in an assert
Grazvydas Ignotas
notasas at gmail.com
Mon Jan 22 22:57:44 UTC 2018
Looks like checking both sources was intended, instead of the first one
twice. Found with Coccinelle, coccinellery/xand/xand.cocci semantic patch.
Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
---
src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c
index 978a8a5..6775f9b 100644
--- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c
+++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c
@@ -145,11 +145,11 @@ lower_res_reindex_intrinsic(nir_intrinsic_instr *intrin,
/* For us, the resource indices are just indices into the binding table and
* array elements are sequential. A resource_reindex just turns into an
* add of the two indices.
*/
- assert(intrin->src[0].is_ssa && intrin->src[0].is_ssa);
+ assert(intrin->src[0].is_ssa && intrin->src[1].is_ssa);
nir_ssa_def *new_index = nir_iadd(b, intrin->src[0].ssa,
intrin->src[1].ssa);
assert(intrin->dest.is_ssa);
nir_ssa_def_rewrite_uses(&intrin->dest.ssa, nir_src_for_ssa(new_index));
--
2.7.4
More information about the mesa-dev
mailing list