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;
36 mHal.state.userProvidedPtr = ptr;
45 memset(&mHal, 0, sizeof(mHal));
46 mHal.state.baseAlloc = alloc;
47 mHal.state.usageFlags = alloc->mHal.state.usageFlags;
48 mHal.state.mipmapControl = RS_ALLOCATION_MIPMAP_NONE;
57 a->getContext()->mHal.funcs.freeRuntimeMem(ptr);
65 void* allocMem = rsc->mHal.funcs.allocRuntimeMem(sizeof(Allocation), 0);
75 if (rsc->mHal.funcs.allocation.initOem != nullptr) {
77 success = rsc->mHal.funcs.allocation.initOem(rsc, a, type->getElement()->getHasReferences(), ptr);
85 success = rsc->mHal.funcs.allocation.initStrided(rsc, a, type->getElement()->getHasReferences(), requiredAlignment);
89 success = rsc->mHal.funcs.allocation.init(rsc, a, type->getElement()->getHasReferences());
108 void* allocMem = rsc->mHal.funcs.allocRuntimeMem(sizeof(Allocation), 0);
117 if (!rsc->mHal.funcs.allocation.initAdapter(rsc, a)) {
128 mHal.state.originX = offsets[0];
129 mHal.state.originY = offsets[1];
130 mHal.state.originZ = offsets[2];
131 mHal.state.originLOD = offsets[3];
132 mHal.state.originFace = offsets[4];
133 mHal.state.originArray[0] = offsets[5];
134 mHal.state.originArray[1] = offsets[6];
135 mHal.state.originArray[2] = offsets[7];
136 mHal.state.originArray[3] = offsets[8];
139 rsc->mHal.funcs.allocation.adapterOffset(rsc, this);
145 const Type *type = mHal.state.type;
146 mHal.state.yuv = type->getDimYuv();
147 mHal.state.hasFaces = type->getDimFaces();
148 mHal.state.hasMipmaps = type->getDimLOD();
149 mHal.state.elementSizeBytes = type->getElementSizeBytes();
150 mHal.state.hasReferences = mHal.state.type->getElement()->getHasReferences();
165 mRSC->mHal.funcs.allocation.destroy(mRSC, this);
169 rsc->mHal.funcs.allocation.syncAll(rsc, this, src);
175 if ((lod >= mHal.drvState.lodCount) ||
176 (z && (z >= mHal.drvState.lod[lod].dimZ)) ||
177 ((face != RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X) && !mHal.state.hasFaces) ||
182 if (mRSC->mHal.funcs.allocation.getPointer != nullptr) {
184 mRSC->mHal.funcs.allocation.getPointer(rsc, this, lod, face, z, array);
188 if ((stride != nullptr) && mHal.drvState.lod[0].dimY) {
189 *stride = mHal.drvState.lod[lod].stride;
191 return mHal.drvState.lod[lod].mallocPtr;
196 const size_t eSize = mHal.state.type->getElementSizeBytes();
204 mHal.state.type->dumpLOGV("type info");
208 rsc->mHal.funcs.allocation.data1D(rsc, this, xoff, lod, count, data, sizeBytes);
214 rsc->mHal.funcs.allocation.data2D(rsc, this, xoff, yoff, lod, face, w, h, data, sizeBytes, stride);
221 rsc->mHal.funcs.allocation.data3D(rsc, this, xoff, yoff, zoff, lod, w, h, d, data, sizeBytes, stride);
227 const size_t eSize = mHal.state.type->getElementSizeBytes();
235 mHal.state.type->dumpLOGV("type info");
239 rsc->mHal.funcs.allocation.read1D(rsc, this, xoff, lod, count, data, sizeBytes);
244 const size_t eSize = mHal.state.elementSizeBytes;
258 rsc->mHal.funcs.allocation.read2D(rsc, this, xoff, yoff, lod, face, w, h, data, sizeBytes, stride);
263 const size_t eSize = mHal.state.elementSizeBytes;
269 rsc->mHal.funcs.allocation.read3D(rsc, this, xoff, yoff, zoff, lod, w, h, d, data, sizeBytes, stride);
275 if (x >= mHal.drvState.lod[0].dimX) {
280 if (y > 0 && y >= mHal.drvState.lod[0].dimY) {
285 if (z > 0 && z >= mHal.drvState.lod[0].dimZ) {
290 if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
295 const Element * e = mHal.state.type->getElement()->getField(cIdx);
296 uint32_t elemArraySize = mHal.state.type->getElement()->getFieldArraySize(cIdx);
302 rsc->mHal.funcs.allocation.elementData(rsc, this, x, y, z, data, cIdx, sizeBytes);
308 if (x >= mHal.drvState.lod[0].dimX) {
313 if (y > 0 && y >= mHal.drvState.lod[0].dimY) {
318 if (z > 0 && z >= mHal.drvState.lod[0].dimZ) {
323 if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
328 const Element * e = mHal.state.type->getElement()->getField(cIdx);
329 uint32_t elemArraySize = mHal.state.type->getElement()->getFieldArraySize(cIdx);
335 rsc->mHal.funcs.allocation.elementRead(rsc, this, x, y, z, data, cIdx, sizeBytes);
358 if (mHal.state.type) {
359 mHal.state.type->dumpLOGV(buf);
363 prefix, mHal.drvState.lod[0].mallocPtr, mHal.state.usageFlags, mHal.state.mipmapControl);
367 uint32_t numItems = mHal.state.type->getCellCount();
368 return numItems * mHal.state.type->getElement()->getSizeBytesUnpadded();
422 uint8_t *dst = (uint8_t *)rsc->mHal.funcs.allocation.lock1D(rsc, this);
425 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
430 uint32_t numItems = mHal.state.type->getCellCount();
432 const uint8_t *src = (const uint8_t*)rsc->mHal.funcs.allocation.lock1D(rsc, this);
439 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
449 mHal.state.type->serialize(rsc, stream);
451 uint32_t dataSize = mHal.state.type->getPackedSizeBytes();
458 stream->addByteArray(rsc->mHal.funcs.allocation.lock1D(rsc, this), dataSize);
459 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
518 mRSC->mHal.funcs.allocation.markDirty(rsc, this);
522 mHal.state.type->incRefs(ptr, ct, startOff);
526 if (!mHal.state.hasReferences || !getIsScript()) {
529 mHal.state.type->decRefs(ptr, ct, startOff);
533 if (rsc->mHal.funcs.allocation.updateCachedObject != nullptr) {
534 rsc->mHal.funcs.allocation.updateCachedObject(rsc, this, (rs_allocation *)dstObj);
542 void *ptr = mRSC->mHal.funcs.allocation.lock1D(mRSC, this);
543 decRefs(ptr, mHal.state.type->getCellCount(), 0);
544 mRSC->mHal.funcs.allocation.unlock1D(mRSC, this);
548 if (mHal.state.hasReferences) {
560 uint32_t oldDimX = mHal.drvState.lod[0].dimX;
565 ObjectBaseRef<Type> t = mHal.state.type->cloneAndResize1D(rsc, dimX);
567 decRefs(rsc->mHal.funcs.allocation.lock1D(rsc, this), oldDimX - dimX, dimX);
568 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
570 rsc->mHal.funcs.allocation.resize(rsc, this, t.get(), mHal.state.hasReferences);
622 rsc->mHal.funcs.allocation.setSurface(rsc, this, nw);
626 rsc->mHal.funcs.allocation.ioSend(rsc, this);
633 if (mHal.state.usageFlags & RS_ALLOCATION_USAGE_SCRIPT) {
637 rsc->mHal.funcs.allocation.ioReceive(rsc, this);
673 rsc->mHal.funcs.allocation.generateMipmaps(rsc, alloc);
778 rsc->mHal.funcs.allocation.generateMipmaps(rsc, texAlloc);
816 rsc->mHal.funcs.allocation.generateMipmaps(rsc, texAlloc);
833 rsc->mHal.funcs.allocation.allocData2D(rsc, dst, dstXoff, dstYoff, dstMip,
850 rsc->mHal.funcs.allocation.allocData3D(rsc, dst, dstXoff, dstYoff, dstZoff, dstMip,
900 rsc->mHal.funcs.allocation.read1D(rsc, a, xoff, lod, count, data, sizeBytes);