diff options
author | Samuel Pitoiset <[email protected]> | 2020-01-29 09:18:20 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-29 13:58:37 +0000 |
commit | 6aecc316c000c343b25963c1356525f95ea6cafe (patch) | |
tree | afac0a2c69afc326d431ad6afe0dca19435f60db /src | |
parent | 404818dd288de1b374c3b5f3589450c382bad3c4 (diff) |
aco: fix VS input loads with MUBUF on GFX6
Only MTBUF supports vec3.
Fixes: 03a0d39366d ("aco: use MUBUF in some situations instead of splitting vertex fetches")
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3615>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3615>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/compiler/aco_instruction_selection.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 5859cb536e2..64f5270acd0 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -3236,8 +3236,14 @@ void visit_load_input(isel_context *ctx, nir_intrinsic_instr *instr) nfmt == V_008F0C_BUF_NUM_FORMAT_SINT) && vtx_info->chan_byte_size == 4; 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); + } 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; if (attrib_stride != 0 && fetch_offset > attrib_stride) { |