Index: src/gpu/vk/GrVkCommandBuffer.h |
diff --git a/src/gpu/vk/GrVkCommandBuffer.h b/src/gpu/vk/GrVkCommandBuffer.h |
index 525ea776bb2bcb234bdf20a1efd3b5b6250589da..c8bac336d5775fd4e3d344aa4fcbd1c898f22524 100644 |
--- a/src/gpu/vk/GrVkCommandBuffer.h |
+++ b/src/gpu/vk/GrVkCommandBuffer.h |
@@ -42,7 +42,7 @@ public: |
void bindVertexBuffer(GrVkGpu* gpu, GrVkVertexBuffer* vbuffer) { |
VkBuffer vkBuffer = vbuffer->buffer(); |
if (!fBoundVertexBufferIsValid || vkBuffer != fBoundVertexBuffer) { |
- VkDeviceSize offset = 0; |
+ VkDeviceSize offset = vbuffer->offset(); |
GR_VK_CALL(gpu->vkInterface(), CmdBindVertexBuffers(fCmdBuffer, |
0, |
1, |
@@ -59,7 +59,7 @@ public: |
if (!fBoundIndexBufferIsValid || vkBuffer != fBoundIndexBuffer) { |
GR_VK_CALL(gpu->vkInterface(), CmdBindIndexBuffer(fCmdBuffer, |
vkBuffer, |
- 0, |
+ ibuffer->offset(), |
VK_INDEX_TYPE_UINT16)); |
fBoundIndexBufferIsValid = true; |
fBoundIndexBuffer = vkBuffer; |