intel/brw/validate: Update dst grf crossing check for Xe2
Rework: * Update grf_size_shift calculation (s-b Ken) Backport-to: 24.2 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28479>
This commit is contained in:
@@ -1076,15 +1076,17 @@ general_restrictions_on_region_parameters(const struct brw_isa_info *isa,
|
||||
* implies that elements within a 'Width' cannot cross GRF boundaries.
|
||||
*/
|
||||
unsigned rowbase = subreg;
|
||||
assert(util_is_power_of_two_nonzero(reg_unit(devinfo)));
|
||||
unsigned grf_size_shift = ffs(REG_SIZE * reg_unit(devinfo)) - 1;
|
||||
|
||||
for (int y = 0; y < exec_size / width; y++) {
|
||||
bool spans_grfs = false;
|
||||
unsigned offset = rowbase;
|
||||
unsigned first_grf = offset / REG_SIZE;
|
||||
unsigned first_grf = offset >> grf_size_shift;
|
||||
|
||||
for (int x = 0; x < width; x++) {
|
||||
const unsigned end_byte = offset + (element_size - 1);
|
||||
const unsigned end_grf = end_byte / REG_SIZE;
|
||||
const unsigned end_grf = end_byte >> grf_size_shift;
|
||||
spans_grfs = end_grf != first_grf;
|
||||
if (spans_grfs)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user