r300: respect output_semantic_index when writing colors
authorPavel Ondračka <pavel.ondracka@gmail.com>
Wed, 23 Mar 2022 10:03:21 +0000 (11:03 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 28 Mar 2022 17:46:32 +0000 (17:46 +0000)
commitf82a0d10cd1aeba2917b5d4edb1bb830385084b5
treeeb67f36a1fc7b423f7d80573358f0079dcc076d4
parent28d6a5af252f9fc56cf75bbc212a84bcb4a9f8e9
r300: respect output_semantic_index when writing colors

Right now we don't explicitly check it and we expect that the
output_semantic_index array is always ordered. Unfortunately,
this is not the case since 74c02d99b224fbc02132b54bf23e6ac1e117d805

Fixes corruption in Amnesia: the Dark Descent.

cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6179
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15523>
src/gallium/drivers/r300/r300_fs.c