Lines Matching refs:mHal

32     memset(&mHal, 0, sizeof(mHal));
33 mHal.state.mipmapControl = RS_ALLOCATION_MIPMAP_NONE;
34 mHal.state.usageFlags = usages;
35 mHal.state.mipmapControl = mc;
45 if (!rsc->mHal.funcs.allocation.init(rsc, a, type->getElement()->getHasReferences())) {
55 const Type *type = mHal.state.type;
56 mHal.state.dimensionX = type->getDimX();
57 mHal.state.dimensionY = type->getDimY();
58 mHal.state.dimensionZ = type->getDimZ();
59 mHal.state.hasFaces = type->getDimFaces();
60 mHal.state.hasMipmaps = type->getDimLOD();
61 mHal.state.elementSizeBytes = type->getElementSizeBytes();
62 mHal.state.hasReferences = mHal.state.type->getElement()->getHasReferences();
63 mHal.state.eType = mHal.state.type->getElement()->getType();
69 mRSC->mHal.funcs.allocation.destroy(mRSC, this);
73 rsc->mHal.funcs.allocation.syncAll(rsc, this, src);
78 const size_t eSize = mHal.state.type->getElementSizeBytes();
83 mHal.state.type->dumpLOGV("type info");
87 rsc->mHal.funcs.allocation.data1D(rsc, this, xoff, lod, count, data, sizeBytes);
93 const size_t eSize = mHal.state.elementSizeBytes;
104 rsc->mHal.funcs.allocation.data2D(rsc, this, xoff, yoff, lod, face, w, h, data, sizeBytes);
115 const size_t eSize = mHal.state.type->getElementSizeBytes();
120 mHal.state.type->dumpLOGV("type info");
124 rsc->mHal.funcs.allocation.read1D(rsc, this, xoff, lod, count, data, sizeBytes);
129 const size_t eSize = mHal.state.elementSizeBytes;
138 rsc->mHal.funcs.allocation.read2D(rsc, this, xoff, yoff, lod, face, w, h, data, sizeBytes);
148 size_t eSize = mHal.state.elementSizeBytes;
150 if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
156 if (x >= mHal.state.dimensionX) {
162 const Element * e = mHal.state.type->getElement()->getField(cIdx);
163 uint32_t elemArraySize = mHal.state.type->getElement()->getFieldArraySize(cIdx);
170 rsc->mHal.funcs.allocation.elementData1D(rsc, this, x, data, cIdx, sizeBytes);
176 size_t eSize = mHal.state.elementSizeBytes;
178 if (x >= mHal.state.dimensionX) {
184 if (y >= mHal.state.dimensionY) {
190 if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
196 const Element * e = mHal.state.type->getElement()->getField(cIdx);
197 uint32_t elemArraySize = mHal.state.type->getElement()->getFieldArraySize(cIdx);
204 rsc->mHal.funcs.allocation.elementData2D(rsc, this, x, y, data, cIdx, sizeBytes);
227 if (mHal.state.type) {
228 mHal.state.type->dumpLOGV(s.string());
232 prefix, mHal.drvState.mallocPtrLOD0, mHal.state.usageFlags, mHal.state.mipmapControl);
236 uint32_t numItems = mHal.state.type->getSizeBytes() / mHal.state.type->getElementSizeBytes();
237 return numItems * mHal.state.type->getElement()->getSizeBytesUnpadded();
291 uint8_t *dst = (uint8_t *)rsc->mHal.funcs.allocation.lock1D(rsc, this);
294 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
300 uint32_t numItems = mHal.state.type->getSizeBytes() / paddedBytes;
302 const uint8_t *src = (const uint8_t*)rsc->mHal.funcs.allocation.lock1D(rsc, this);
309 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
321 mHal.state.type->serialize(rsc, stream);
323 uint32_t dataSize = mHal.state.type->getSizeBytes();
330 stream->addByteArray(rsc->mHal.funcs.allocation.lock1D(rsc, this), dataSize);
331 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
388 mRSC->mHal.funcs.allocation.markDirty(rsc, this);
392 mHal.state.type->incRefs(ptr, ct, startOff);
396 if (!mHal.state.hasReferences || !getIsScript()) {
399 mHal.state.type->decRefs(ptr, ct, startOff);
403 void *ptr = mRSC->mHal.funcs.allocation.lock1D(mRSC, this);
404 decRefs(ptr, mHal.state.type->getSizeBytes() / mHal.state.type->getElementSizeBytes(), 0);
405 mRSC->mHal.funcs.allocation.unlock1D(mRSC, this);
409 if (mHal.state.hasReferences) {
421 uint32_t oldDimX = mHal.state.dimensionX;
426 ObjectBaseRef<Type> t = mHal.state.type->cloneAndResize1D(rsc, dimX);
428 decRefs(rsc->mHal.funcs.allocation.lock1D(rsc, this), oldDimX - dimX, dimX);
429 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
431 rsc->mHal.funcs.allocation.resize(rsc, this, t.get(), mHal.state.hasReferences);
441 int32_t id = rsc->mHal.funcs.allocation.initSurfaceTexture(rsc, this);
442 mHal.state.surfaceTextureID = id;
447 if(st != mHal.state.surfaceTexture) {
448 if(mHal.state.surfaceTexture != NULL) {
449 mHal.state.surfaceTexture->decStrong(NULL);
451 mHal.state.surfaceTexture = st;
452 if(mHal.state.surfaceTexture != NULL) {
453 mHal.state.surfaceTexture->incStrong(NULL);
460 ANativeWindow *old = mHal.state.wndSurface;
464 rsc->mHal.funcs.allocation.setSurfaceTexture(rsc, this, nw);
465 mHal.state.wndSurface = nw;
472 rsc->mHal.funcs.allocation.ioSend(rsc, this);
476 rsc->mHal.funcs.allocation.ioReceive(rsc, this);
494 rsc->mHal.funcs.allocation.generateMipmaps(rsc, alloc);
576 rsc->mHal.funcs.allocation.generateMipmaps(rsc, texAlloc);
614 rsc->mHal.funcs.allocation.generateMipmaps(rsc, texAlloc);
631 rsc->mHal.funcs.allocation.allocData2D(rsc, dst, dstXoff, dstYoff, dstMip,