Start splitting allocation into hal and core.
Change-Id: Ic506abb0469238cb0471eb1401cfcb7b2fbbe4bb
diff --git a/rsMesh.cpp b/rsMesh.cpp
index 3d0342d..62e388c 100644
--- a/rsMesh.cpp
+++ b/rsMesh.cpp
@@ -191,28 +191,19 @@
return;
}
- for (uint32_t ct=0; ct < mHal.state.vertexBuffersCount; ct++) {
- mHal.state.vertexBuffers[ct]->uploadCheck(rsc);
- }
-
- Primitive_t *prim = mHal.state.primitives[primIndex];
- if (prim->mIndexBuffer.get()) {
- prim->mIndexBuffer->uploadCheck(rsc);
- }
-
mRSC->mHal.funcs.mesh.draw(mRSC, this, primIndex, start, len);
}
void Mesh::uploadAll(Context *rsc) {
for (uint32_t ct = 0; ct < mHal.state.vertexBuffersCount; ct ++) {
if (mHal.state.vertexBuffers[ct].get()) {
- mHal.state.vertexBuffers[ct]->deferredUploadToBufferObject(rsc);
+ rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.vertexBuffers[ct].get());
}
}
for (uint32_t ct = 0; ct < mHal.state.primitivesCount; ct ++) {
if (mHal.state.primitives[ct]->mIndexBuffer.get()) {
- mHal.state.primitives[ct]->mIndexBuffer->deferredUploadToBufferObject(rsc);
+ rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.primitives[ct]->mIndexBuffer.get());
}
}
}