Mesa (main): panvk: Take buffer offsets into account in BindVertexBuffers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 27 14:41:06 UTC 2022


Module: Mesa
Branch: main
Commit: e248c64f06986f1a555f2d145274f1f1acbfba3e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e248c64f06986f1a555f2d145274f1f1acbfba3e

Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date:   Tue Apr 26 17:43:59 2022 -0500

panvk: Take buffer offsets into account in BindVertexBuffers

Found by inspection.  No idea what all it fixes.

Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16183>

---

 src/panfrost/vulkan/panvk_cmd_buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/panfrost/vulkan/panvk_cmd_buffer.c b/src/panfrost/vulkan/panvk_cmd_buffer.c
index c3b6f9c87d9..8c7df9c4bac 100644
--- a/src/panfrost/vulkan/panvk_cmd_buffer.c
+++ b/src/panfrost/vulkan/panvk_cmd_buffer.c
@@ -49,7 +49,8 @@ panvk_CmdBindVertexBuffers(VkCommandBuffer commandBuffer,
    for (uint32_t i = 0; i < bindingCount; i++) {
       struct panvk_buffer *buf = panvk_buffer_from_handle(pBuffers[i]);
 
-      cmdbuf->state.vb.bufs[firstBinding + i].address = buf->bo->ptr.gpu + pOffsets[i];
+      cmdbuf->state.vb.bufs[firstBinding + i].address =
+        buf->bo->ptr.gpu + buf->bo_offset + pOffsets[i];
       cmdbuf->state.vb.bufs[firstBinding + i].size = buf->size - pOffsets[i];
    }
 



More information about the mesa-commit mailing list