aco: fix MUBUF VS input loads when expanding vec3 to vec4 on GFX6
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 31 Jan 2020 07:23:02 +0000 (08:23 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 31 Jan 2020 12:48:56 +0000 (13:48 +0100)
commit0d14f41625fa00187f690f283c1eb6a22e354a71
tree5a8e81503de205267a74a0bc824d4a49fe3583cf
parentd8410fec4efa4fb8847342a15b021501e3e2341b
aco: fix MUBUF VS input loads when expanding vec3 to vec4 on GFX6

When some unused channels are skipped and that we expand vec3 loads
to vec4 loads, we have to adjust the fourth component.

While we are at it, add an assertion to make sure we don't use
MUBUF for vec3 loads on GFX6.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2450
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2442
Fixes: 6aecc316 ("aco: fix VS input loads with MUBUF on GFX6")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3641>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3641>
src/amd/compiler/aco_instruction_selection.cpp