intel/brw: Only validate GRF boundary crossing restriction for GRFs

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31294>
This commit is contained in:
Caio Oliveira 2024-09-20 15:17:28 -07:00 committed by Marge Bot
parent 878ae9708a
commit e1b74407bb

View file

@ -1014,10 +1014,11 @@ general_restrictions_on_region_parameters(const struct brw_isa_info *isa,
for (unsigned i = 0; i < num_sources; i++) { for (unsigned i = 0; i < num_sources; i++) {
unsigned vstride, width, hstride, element_size, subreg; unsigned vstride, width, hstride, element_size, subreg;
enum brw_reg_type type; enum brw_reg_type type;
enum brw_reg_file file;
#define DO_SRC(n) \ #define DO_SRC(n) \
if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \ file = brw_inst_src ## n ## _reg_file(devinfo, inst); \
IMM) \ if (file == IMM) \
continue; \ continue; \
\ \
vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \ vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \
@ -1075,6 +1076,7 @@ general_restrictions_on_region_parameters(const struct brw_isa_info *isa,
/* VertStride must be used to cross GRF register boundaries. This rule /* VertStride must be used to cross GRF register boundaries. This rule
* implies that elements within a 'Width' cannot cross GRF boundaries. * implies that elements within a 'Width' cannot cross GRF boundaries.
*/ */
if (file == FIXED_GRF) {
unsigned rowbase = subreg; unsigned rowbase = subreg;
assert(util_is_power_of_two_nonzero(reg_unit(devinfo))); assert(util_is_power_of_two_nonzero(reg_unit(devinfo)));
unsigned grf_size_shift = ffs(REG_SIZE * reg_unit(devinfo)) - 1; unsigned grf_size_shift = ffs(REG_SIZE * reg_unit(devinfo)) - 1;
@ -1101,6 +1103,7 @@ general_restrictions_on_region_parameters(const struct brw_isa_info *isa,
} }
} }
} }
}
/* Dst.HorzStride must not be 0. */ /* Dst.HorzStride must not be 0. */
if (desc->ndst != 0 && !dst_is_null(devinfo, inst)) { if (desc->ndst != 0 && !dst_is_null(devinfo, inst)) {