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:
@@ -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);
|
nir_ssa_def *val = nir_channel(b, load, i);
|
||||||
unsigned comp = start + i;
|
unsigned comp = start + i;
|
||||||
|
|
||||||
if (output) {
|
if (s->options->gfx_level < GFX11) {
|
||||||
/* low and high varyings have been packed when LDS store */
|
|
||||||
output->chan[comp] = val;
|
|
||||||
} else {
|
|
||||||
if (mask_lo & BITFIELD_BIT(comp)) {
|
if (mask_lo & BITFIELD_BIT(comp)) {
|
||||||
nir_store_output(b, nir_unpack_32_2x16_split_x(b, val),
|
nir_store_output(b, nir_unpack_32_2x16_split_x(b, val),
|
||||||
nir_imm_int(b, 0),
|
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);
|
.write_mask = 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* low and high varyings have been packed when LDS store */
|
||||||
|
if (output)
|
||||||
|
output->chan[comp] = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user