Home | History | Annotate | Download | only in rs

Lines Matching refs:mHal

25     mHal.drv = nullptr;
26 mHal.state.primitives = nullptr;
27 mHal.state.primitivesCount = 0;
28 mHal.state.indexBuffers = nullptr;
29 mHal.state.indexBuffersCount = 0;
30 mHal.state.vertexBuffers = nullptr;
31 mHal.state.vertexBuffersCount = 0;
41 mHal.drv = nullptr;
42 mHal.state.primitivesCount = primitivesCount;
43 mHal.state.indexBuffersCount = primitivesCount;
44 mHal.state.primitives = new RsPrimitive[mHal.state.primitivesCount];
45 mHal.state.indexBuffers = new Allocation *[mHal.state.indexBuffersCount];
46 for (uint32_t i = 0; i < mHal.state.primitivesCount; i ++) {
47 mHal.state.primitives[i] = RS_PRIMITIVE_POINT;
49 for (uint32_t i = 0; i < mHal.state.indexBuffersCount; i ++) {
50 mHal.state.indexBuffers[i] = nullptr;
52 mHal.state.vertexBuffersCount = vertexBuffersCount;
53 mHal.state.vertexBuffers = new Allocation *[mHal.state.vertexBuffersCount];
54 for (uint32_t i = 0; i < mHal.state.vertexBuffersCount; i ++) {
55 mHal.state.vertexBuffers[i] = nullptr;
58 mVertexBuffers = new ObjectBaseRef<Allocation>[mHal.state.vertexBuffersCount];
59 mIndexBuffers = new ObjectBaseRef<Allocation>[mHal.state.primitivesCount];
64 mRSC->mHal.funcs.mesh.destroy(mRSC, this);
67 delete[] mHal.state.vertexBuffers;
68 delete[] mHal.state.primitives;
69 delete[] mHal.state.indexBuffers;
77 mRSC->mHal.funcs.mesh.init(mRSC, this);
87 stream->addU32(mHal.state.vertexBuffersCount);
88 for (uint32_t vCount = 0; vCount < mHal.state.vertexBuffersCount; vCount ++) {
89 mHal.state.vertexBuffers[vCount]->serialize(rsc, stream);
92 stream->addU32(mHal.state.primitivesCount);
94 for (uint32_t pCount = 0; pCount < mHal.state.primitivesCount; pCount ++) {
95 stream->addU8((uint8_t)mHal.state.primitives[pCount]);
97 if (mHal.state.indexBuffers[pCount]) {
99 mHal.state.indexBuffers[pCount]->serialize(rsc, stream);
173 for (uint32_t ct = 0; ct < mHal.state.primitivesCount; ct ++) {
179 if (primIndex >= mHal.state.primitivesCount) {
184 if (mHal.state.indexBuffers[primIndex]) {
185 renderPrimitiveRange(rsc, primIndex, 0, mHal.state.indexBuffers[primIndex]->getType()->getDimX());
189 renderPrimitiveRange(rsc, primIndex, 0, mHal.state.vertexBuffers[0]->getType()->getDimX());
193 if (len < 1 || primIndex >= mHal.state.primitivesCount) {
198 mRSC->mHal.funcs.mesh.draw(mRSC, this, primIndex, start, len);
202 for (uint32_t ct = 0; ct < mHal.state.vertexBuffersCount; ct ++) {
203 if (mHal.state.vertexBuffers[ct]) {
204 rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.vertexBuffers[ct]);
208 for (uint32_t ct = 0; ct < mHal.state.primitivesCount; ct ++) {
209 if (mHal.state.indexBuffers[ct]) {
210 rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.indexBuffers[ct]);
222 for (uint32_t ct=0; ct < mHal.state.vertexBuffersCount; ct++) {
223 const Type *bufferType = mHal.state.vertexBuffers[ct]->getType();
231 posAlloc = mHal.state.vertexBuffers[ct];
232 const uint8_t *bp = (const uint8_t *)rsc->mHal.funcs.allocation.lock1D(
262 rsc->mHal.funcs.allocation.unlock1D(rsc, posAlloc);