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