anv: correct a duplicate check in an assert
authorGrazvydas Ignotas <notasas@gmail.com>
Mon, 22 Jan 2018 22:44:36 +0000 (00:44 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 24 Jan 2018 23:10:45 +0000 (01:10 +0200)
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@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/intel/vulkan/anv_nir_apply_pipeline_layout.c

index 978a8a57c701565a107b0abb02b2a44bb890fb3c..6775f9b464e36b775309ac68dddb5222b5576cd6 100644 (file)
@@ -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);