mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 07:48:19 +02:00
jay/partition: validate we don't generate g127<2>
GPU hangs with a buggy version of the next patch. EU validate misses this :( Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
This commit is contained in:
parent
3905c7156d
commit
7221ef0230
1 changed files with 6 additions and 0 deletions
|
|
@ -87,6 +87,12 @@ build_partition(jay_shader *shader, struct jay_partition_builder *b, unsigned n)
|
|||
assert(B.start_grf + len_grf <= JAY_NUM_PHYS_GRF && "GRF file size");
|
||||
assert(!BITSET_TEST_COUNT(regs, B.start_grf, len_grf) && "uniqueness");
|
||||
|
||||
/* This requirement avoids invalid constructions like g127<2> */
|
||||
if (file == GPR && B.stride == JAY_STRIDE_8) {
|
||||
assert(util_is_aligned(len_grf, 2 * jay_grf_per_gpr(shader)) &&
|
||||
"must be a multiple of 2 GPRs");
|
||||
}
|
||||
|
||||
BITSET_SET_COUNT(regs, B.start_grf, len_grf);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue