nvk: Handle zero-size index and vertex buffers pre-Turing
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:12:06 +0000 (20:12 -0600)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:03 +0000 (21:32 +0000)
commitade334a8078a01c50703419480f6f45297ce162e
treee2a02517782c468040cf5dafc2a7b98c36f603be
parent7c096786cad073f34b090f0069205adf209b8d1a
nvk: Handle zero-size index and vertex buffers pre-Turing

According to the nouveau GL driver, this should be the addres of the
last byte, not the byte after the end.  The calculation will overflow if
range is 0 so we need to handle that special.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
src/nouveau/vulkan/nvk_cmd_draw.c