mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 18:00:13 +01:00
aco: fix VS input loads with MUBUF on GFX6
Only MTBUF supports vec3.
Fixes: 03a0d39366 ("aco: use MUBUF in some situations instead of splitting vertex fetches")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3615>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3615>
This commit is contained in:
parent
404818dd28
commit
6aecc316c0
1 changed files with 7 additions and 1 deletions
|
|
@ -3236,8 +3236,14 @@ void visit_load_input(isel_context *ctx, nir_intrinsic_instr *instr)
|
||||||
nfmt == V_008F0C_BUF_NUM_FORMAT_SINT) &&
|
nfmt == V_008F0C_BUF_NUM_FORMAT_SINT) &&
|
||||||
vtx_info->chan_byte_size == 4;
|
vtx_info->chan_byte_size == 4;
|
||||||
unsigned fetch_dfmt = V_008F0C_BUF_DATA_FORMAT_INVALID;
|
unsigned fetch_dfmt = V_008F0C_BUF_DATA_FORMAT_INVALID;
|
||||||
if (!use_mubuf)
|
if (!use_mubuf) {
|
||||||
fetch_dfmt = get_fetch_data_format(ctx, vtx_info, fetch_offset, attrib_stride, &fetch_size);
|
fetch_dfmt = get_fetch_data_format(ctx, vtx_info, fetch_offset, attrib_stride, &fetch_size);
|
||||||
|
} else {
|
||||||
|
if (fetch_size == 3 && ctx->options->chip_class == GFX6) {
|
||||||
|
/* GFX6 only supports loading vec3 with MTBUF, expand to vec4. */
|
||||||
|
fetch_size = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Temp fetch_index = index;
|
Temp fetch_index = index;
|
||||||
if (attrib_stride != 0 && fetch_offset > attrib_stride) {
|
if (attrib_stride != 0 && fetch_offset > attrib_stride) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue