radv/gfx10: fix the out-of-bounds check for vertex descriptors
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 18 Dec 2019 12:29:39 +0000 (13:29 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 19 Dec 2019 14:15:30 +0000 (15:15 +0100)
commitf3cccd05d9f6e9d05c18d1a3a5f9eb863e4f264b
treeaa6d2d40ae8c5e2056d90ea5adc19b3dccaf031f
parent8172b1fa03fe74165728bfb182c98a3e62193d2b
radv/gfx10: fix the out-of-bounds check for vertex descriptors

When stride is 0, it should check against the offset not the index.

This fixes black character models with Beat Saber and missing snow
with Dragon Quest.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2233
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1975
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3147>
src/amd/vulkan/radv_cmd_buffer.c