Index: src/gpu/vk/GrVkIndexBuffer.cpp |
diff --git a/src/gpu/vk/GrVkIndexBuffer.cpp b/src/gpu/vk/GrVkIndexBuffer.cpp |
index 52f7bd59b738d37c90ebaeda00f8bd141fbd3b64..6cec856cd4d661161b9d8828b47c7e0947508fa8 100644 |
--- a/src/gpu/vk/GrVkIndexBuffer.cpp |
+++ b/src/gpu/vk/GrVkIndexBuffer.cpp |
@@ -10,7 +10,8 @@ |
GrVkIndexBuffer::GrVkIndexBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc, |
const GrVkBuffer::Resource* bufferResource) |
- : INHERITED(gpu, desc.fSizeInBytes, desc.fDynamic, false) |
+ : INHERITED(gpu, kIndex_GrBufferType, desc.fSizeInBytes, |
+ desc.fDynamic ? kDynamic_GrAccessPattern : kStatic_GrAccessPattern, false) |
, GrVkBuffer(desc, bufferResource) { |
this->registerWithCache(); |
} |
@@ -47,11 +48,9 @@ void GrVkIndexBuffer::onAbandon() { |
INHERITED::onAbandon(); |
} |
-void* GrVkIndexBuffer::onMap() { |
+void GrVkIndexBuffer::onMap() { |
if (!this->wasDestroyed()) { |
- return this->vkMap(this->getVkGpu()); |
- } else { |
- return NULL; |
+ this->GrBuffer::fMapPtr = this->vkMap(this->getVkGpu()); |
} |
} |