From 0cc7370733e9d20999d13c4c8565f0c91846a45c Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Tue, 23 Jan 2018 00:44:36 +0200 Subject: [PATCH] anv: correct a duplicate check in an assert MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tapani Pälli --- 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 978a8a57c70..6775f9b464e 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -147,7 +147,7 @@ lower_res_reindex_intrinsic(nir_intrinsic_instr *intrin, * 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); -- 2.30.2