Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: src/gpu/vk/GrVkCommandBuffer.h

Issue 2127183002: Add offsets to GrVkBuffer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkBuffer.cpp ('k') | src/gpu/vk/GrVkGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/gpu/vk/GrVkBuffer.cpp ('k') | src/gpu/vk/GrVkGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698