intel/compiler: fix alignment assert in nir_emit_intrinsic
authorArcady Goldmints-Orlov <agoldmints@igalia.com>
Mon, 11 May 2020 23:31:49 +0000 (18:31 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 12 May 2020 22:14:31 +0000 (22:14 +0000)
Fixes: c643979228 (intel/fs: Choose memory message type based on bit size)
Fixes: dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_i8vec2
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5000>

src/intel/compiler/brw_fs_nir.cpp

index 383c99c9f45e2e2c1f6a249adcacbc1b9c99f5da..7b316b62f8a0e17d1b22647a1d726f957acb401f 100644 (file)
@@ -4881,7 +4881,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
       assert(nir_src_num_components(instr->src[0]) == 1);
       assert(nir_src_bit_size(instr->src[0]) <= 32);
       assert(nir_intrinsic_write_mask(instr) == 1);
-      assert(nir_intrinsic_align(instr) > 1);
+      assert(nir_intrinsic_align(instr) > 0);
       if (nir_src_bit_size(instr->src[0]) == 32 &&
           nir_intrinsic_align(instr) >= 4) {
          srcs[SURFACE_LOGICAL_SRC_DATA] = data;