From 35470e38ef57a61a74447f556a17f730c66912c8 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 22 May 2026 14:08:15 -0700 Subject: [PATCH] jay: Don't skip sampler payload copies for 2 or fewer sources Sources may be the wrong file for a payload, and this is what copies them to the correct one. For example, a 1D shadow comparison may have a UGPR coordinate but a GPR shadow comparator. The UGPR needs to be splatted to a full GPR because the sampler message is divergent. Unnecessary copies should be easy to propagate away. Fixes 366 tests in dEQP-VK.texture.shadow.1d.* and dEQP-VK.pipeline.monolithic.sampler.view_type.1d.* Part-of: --- src/intel/compiler/jay/jay_from_nir.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/intel/compiler/jay/jay_from_nir.c b/src/intel/compiler/jay/jay_from_nir.c index ef092a58d5b..c68e2b3c60b 100644 --- a/src/intel/compiler/jay/jay_from_nir.c +++ b/src/intel/compiler/jay/jay_from_nir.c @@ -2124,11 +2124,9 @@ jay_emit_texture(struct nir_to_jay_state *nj, nir_tex_instr *tex) desc_src = jay_AND_u32(b, desc_src, 0xfff); } - if (n_sources > 2 || !jay_is_null(header)) { - for (unsigned i = 0; i < n_sources; ++i) { - payload[i] = - jay_src_as_strided(b, payload[i], 1, payload_uniform ? UGPR : GPR); - } + for (unsigned i = 0; i < n_sources; ++i) { + payload[i] = + jay_src_as_strided(b, payload[i], 1, payload_uniform ? UGPR : GPR); } enum jay_type src_type = jay_type(JAY_TYPE_U, payload_type_bit_size);