Should be calculating alignment based on the vertex size.
git-svn-id: http://skia.googlecode.com/svn/trunk@690 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
8195f67427
commit
a827b41439
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user