From cebc45af43117973abf6847c6a36c19ff402d795 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 21 May 2026 10:06:51 -0400 Subject: [PATCH] brw,jay: add use_src_xy prog data field to complete the xy/z/w fragcoord set for accurate calculations in jay without introducing a secondary sideband just for this boolean. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/brw/brw_compiler.h | 1 + src/intel/compiler/jay/jay_from_nir.c | 2 +- src/intel/compiler/jay/jay_prog_data.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw/brw_compiler.h b/src/intel/compiler/brw/brw_compiler.h index 1eb88637253..1af82e98387 100644 --- a/src/intel/compiler/brw/brw_compiler.h +++ b/src/intel/compiler/brw/brw_compiler.h @@ -560,6 +560,7 @@ struct brw_fs_prog_data { bool uses_pos_offset; bool uses_omask; bool uses_kill; + bool uses_src_xy; bool uses_src_depth; bool uses_src_w; bool uses_depth_w_coefficients; diff --git a/src/intel/compiler/jay/jay_from_nir.c b/src/intel/compiler/jay/jay_from_nir.c index c3f0c188dcd..ef092a58d5b 100644 --- a/src/intel/compiler/jay/jay_from_nir.c +++ b/src/intel/compiler/jay/jay_from_nir.c @@ -2642,7 +2642,7 @@ setup_fragment_payload(struct nir_to_jay_state *nj, struct payload_builder *p) } } - if (BITSET_TEST(nj->nir->info.system_values_read, SYSTEM_VALUE_FRAG_COORD)) { + if (nj->s->prog_data->fs.uses_src_xy) { jay_def t = jay_alloc_def(&nj->bld, GPR, 1); jay_def lo = jay_extract_range(nj->payload.u0, 10, 4); jay_EXPAND_QUAD(&nj->bld, t, lo, payload_u1(nj, 10, 4)); diff --git a/src/intel/compiler/jay/jay_prog_data.c b/src/intel/compiler/jay/jay_prog_data.c index e55c9c6209c..8e9f8dfff85 100644 --- a/src/intel/compiler/jay/jay_prog_data.c +++ b/src/intel/compiler/jay/jay_prog_data.c @@ -95,7 +95,7 @@ gather_fs_info(nir_builder *b, nir_intrinsic_instr *intr, void *data) break; case nir_intrinsic_load_pixel_coord_intel: - BITSET_SET(b->shader->info.system_values_read, SYSTEM_VALUE_FRAG_COORD); + prog_data->uses_src_xy = true; break; default: