dzn: Ensure buffer offsets are aligned
authorJesse Natalie <jenatali@microsoft.com>
Thu, 30 Mar 2023 20:38:37 +0000 (13:38 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Apr 2023 22:08:28 +0000 (22:08 +0000)
commitc914d53d1389ac3ad5fb32508ae0f43742b1ea50
tree201c9f49f3d4fb99a5c442edecd4bffd170f8bd1
parenteaa8c8097cb4f7a11e91f6214972fd236effe100
dzn: Ensure buffer offsets are aligned

If the app passes us unaligned buffer offsets, we need to align them
down to the nearest aligned offset, and then put the difference into
the descriptor set buffer.

Fixes: 8bd5fbf8 ("dzn: Bind buffers for bindless descriptor sets")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225>
src/microsoft/vulkan/dzn_cmd_buffer.c
src/microsoft/vulkan/dzn_descriptor_set.c