intel/fs: fix mesh indirect movs
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 8 Feb 2023 12:11:07 +0000 (14:11 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 9 Feb 2023 15:35:55 +0000 (15:35 +0000)
The size in src[2] is in byte and needs to cover any possible data
accessed in src[0] by the indirection. That way the register
allocation is aware of what cannot be spilled for the instruction to
execute on valid data.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 70ace2bbcd ("intel/compiler: Implement Task Output and Mesh Input")
Reviewed-by: Marcin Ĺšlusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21188>

src/intel/compiler/brw_mesh.cpp

index 24c5ad7..86f13f8 100644 (file)
@@ -1212,7 +1212,7 @@ emit_urb_indirect_reads(const fs_builder &bld, nir_intrinsic_instr *instr,
                    retype(quarter(dest_comp, q), BRW_REGISTER_TYPE_UD),
                    data,
                    comp,
-                   brw_imm_ud(4));
+                   brw_imm_ud(4 * REG_SIZE));
       }
    }
 }