v3dv: always return true from a fallback path if it can handle the case
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 8 May 2020 10:20:57 +0000 (12:20 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:30 +0000 (21:21 +0000)
commitd3c6bd6e7ad0d7f298b96159a4c25deaad0fc38e
tree1529e554e591c446350ba9639a2784ddce072b3c
parent21633aa112464008f6bfa402422c1887693dfbf4
v3dv: always return true from a fallback path if it can handle the case

As opposed to returning true only if it can handle the case and it
also successfully processes it.

This is because we expect handled cases to be successfully processed
except in abnormal situations such as out-of-memory errors. If an OOM
is the reason a fallback path fails, we don't want to try another path
(which will likely hit an OOM too): we have already recorded the OOM
error in the command buffer and we just want to stop executing the
command, so just flag the case as handled and move on.

Also, if we don't do this, in an OOM scenario we'll likely end up running
out of fallback paths and end up asserting (on debug builds), which makes
some CTS tests unhappy because they expect OOM to be handled more
gracefully, so this allows us to make CTS happy also in debug builds,
which is convenient.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/vulkan/v3dv_meta_copy.c