ac/nir/ngg: fix gs store output for no param offset slot when gfx11

When slot has no param offset, we should not emit store output for
them on gfx11.

Fixes: abe2e99e9e ("ac/nir/ngg: gs support 16bit outputs")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20350>
This commit is contained in:
Qiang Yu 2022-12-09 17:42:31 +08:00 committed by Marge Bot
parent b4695f78ad
commit 3c26fbc934

View File

@ -2832,10 +2832,7 @@ ngg_gs_export_vertices(nir_builder *b, nir_ssa_def *max_num_out_vtx, nir_ssa_def
nir_ssa_def *val = nir_channel(b, load, i);
unsigned comp = start + i;
if (output) {
/* low and high varyings have been packed when LDS store */
output->chan[comp] = val;
} else {
if (s->options->gfx_level < GFX11) {
if (mask_lo & BITFIELD_BIT(comp)) {
nir_store_output(b, nir_unpack_32_2x16_split_x(b, val),
nir_imm_int(b, 0),
@ -2854,6 +2851,10 @@ ngg_gs_export_vertices(nir_builder *b, nir_ssa_def *max_num_out_vtx, nir_ssa_def
.write_mask = 1);
}
}
/* low and high varyings have been packed when LDS store */
if (output)
output->chan[comp] = val;
}
}
}