diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-01-12 21:20:18 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-01-12 21:20:18 +0000 |
commit | a827b41439807fdba6e76d6d96f587e20405177a (patch) | |
tree | f88d0d28b102216ab00399dc05484768cb6591b7 /gpu/src/GrVertexBufferAllocPool.cpp | |
parent | 8195f674278e8d785bf57489847b1d05d3c2f7d5 (diff) |
Should be calculating alignment based on the vertex size.
git-svn-id: http://skia.googlecode.com/svn/trunk@690 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrVertexBufferAllocPool.cpp')
-rw-r--r-- | gpu/src/GrVertexBufferAllocPool.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gpu/src/GrVertexBufferAllocPool.cpp b/gpu/src/GrVertexBufferAllocPool.cpp index b6f08c97ee..360a086a09 100644 --- a/gpu/src/GrVertexBufferAllocPool.cpp +++ b/gpu/src/GrVertexBufferAllocPool.cpp @@ -93,7 +93,8 @@ void* GrVertexBufferAllocPool::alloc(GrVertexLayout layout, GrAssert(fBlocks.back().fVertexBuffer->isLocked()); BufferBlock& back = fBlocks.back(); uint32_t usedBytes = back.fVertexBuffer->size() - back.fBytesFree; - uint32_t pad = GrUIAlignUpPad(usedBytes, layout); + uint32_t pad = GrUIAlignUpPad(usedBytes, + GrDrawTarget::VertexSize(layout)); if ((bytes + pad) <= back.fBytesFree) { usedBytes += pad; *startVertex = usedBytes / vSize; |