From b2edda3037f9ad146f7c047cc1c49ab740103596 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 26 May 2026 16:48:39 -0400 Subject: [PATCH] jay: allow SIMD1 imageStore() Totals: Instrs: 2756797 -> 2755967 (-0.03%); split: -0.04%, +0.01% CodeSize: 41155232 -> 41141520 (-0.03%); split: -0.04%, +0.00% Totals from 130 (4.91% of 2647) affected shaders: Instrs: 40095 -> 39265 (-2.07%); split: -2.46%, +0.39% CodeSize: 618032 -> 604320 (-2.22%); split: -2.42%, +0.20% Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/jay/jay_from_nir.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/intel/compiler/jay/jay_from_nir.c b/src/intel/compiler/jay/jay_from_nir.c index 0016b0950f4..8cf0651059b 100644 --- a/src/intel/compiler/jay/jay_from_nir.c +++ b/src/intel/compiler/jay/jay_from_nir.c @@ -904,7 +904,9 @@ jay_src_as_strided(jay_builder *b, unsigned element_sz, enum jay_file dst_file) { - if (dst_file == UGPR) { + if (jay_is_null(x)) { + return x; + } else if (dst_file == UGPR) { assert(jay_is_uniform(x) && "Uniform dests require uniform sources"); if (x.file != UGPR) { @@ -1031,22 +1033,20 @@ jay_emit_mem_access(struct nir_to_jay_state *nj, nir_intrinsic_instr *intr) if (!has_dest) { uniform &= jay_is_null(data) || data.file == UGPR; uniform &= jay_is_null(offset) || offset.file == UGPR; - uniform &= !(cmask || urb); + uniform &= !urb; } /* Per bspec 57330, 8-bit/16-bit are not supported for transpose */ bool transpose = uniform && !cmask && ndata->bit_size >= 32; - bool scalar_uniform = uniform && !cmask && ndata->bit_size < 32; if (!uniform) { offset = jay_as_gpr(b, offset); + data = jay_as_gpr(b, data); } else if (!transpose) { offset = jay_src_as_strided(b, offset, a64 ? 2 : 1, UGPR); + data = jay_src_as_strided(b, data, 1, UGPR); } - if (!jay_is_null(data) && !transpose && !scalar_uniform) - data = jay_as_gpr(b, data); - unsigned access = nir_intrinsic_has_access(intr) ? nir_intrinsic_access(intr) : 0;