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 <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
This commit is contained in:
Alyssa Rosenzweig 2026-05-26 16:48:39 -04:00 committed by Marge Bot
parent 31e1e98ae3
commit b2edda3037

View file

@ -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;