zink: fix broken pool-alloc consolidation
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 13 Oct 2022 18:44:12 +0000 (20:44 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 14 Oct 2022 23:29:08 +0000 (23:29 +0000)
commit510a34fbf33918a67f6a2e7277480cb02e1ca172
tree35ac50d5f1df0aa8ba0c2adea4a17db0330c7b5a
parentb49b18f0b7acb4c64a0a9fd2ee55aeea868e701d
zink: fix broken pool-alloc consolidation

When appending the content of a util_dynarray to another util_dynarray, we
need to copy the content to the *end* of the util_dynarray, not the
beginning.

As we've already resized the dynarray, We also shouldn't add to the size
once more at the end, otherwise we'll end up with garbage.

Fixes: 43dcdf33654 ("zink: rework/improve descriptor pool overflow handling on batch reset")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7485
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19068>
src/gallium/drivers/zink/zink_descriptors.c