From 7221ef023024bd4ebfa61bdd5b9f343e98448c8e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 28 May 2026 12:49:50 -0400 Subject: [PATCH] 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 Part-of: --- src/intel/compiler/jay/jay_partition.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/compiler/jay/jay_partition.c b/src/intel/compiler/jay/jay_partition.c index 53a0fa6fd1a..63d7ccab4f9 100644 --- a/src/intel/compiler/jay/jay_partition.c +++ b/src/intel/compiler/jay/jay_partition.c @@ -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); } }