Home | History | Annotate | Download | only in rs

Lines Matching refs:mHal

34     memset(&mHal, 0, sizeof(mHal));
35 mHal.state.mipmapControl = RS_ALLOCATION_MIPMAP_NONE;
36 mHal.state.usageFlags = usages;
37 mHal.state.mipmapControl = mc;
38 mHal.state.userProvidedPtr = ptr;
47 a->getContext()->mHal.funcs.freeRuntimeMem(ptr);
54 void* allocMem = rsc->mHal.funcs.allocRuntimeMem(sizeof(Allocation), 0);
63 if (!rsc->mHal.funcs.allocation.init(rsc, a, type->getElement()->getHasReferences())) {
73 const Type *type = mHal.state.type;
74 mHal.state.yuv = type->getDimYuv();
75 mHal.state.hasFaces = type->getDimFaces();
76 mHal.state.hasMipmaps = type->getDimLOD();
77 mHal.state.elementSizeBytes = type->getElementSizeBytes();
78 mHal.state.hasReferences = mHal.state.type->getElement()->getHasReferences();
83 mRSC->mHal.funcs.allocation.destroy(mRSC, this);
87 rsc->mHal.funcs.allocation.syncAll(rsc, this, src);
92 const size_t eSize = mHal.state.type->getElementSizeBytes();
97 mHal.state.type->dumpLOGV("type info");
101 rsc->mHal.funcs.allocation.data1D(rsc, this, xoff, lod, count, data, sizeBytes);
107 rsc->mHal.funcs.allocation.data2D(rsc, this, xoff, yoff, lod, face, w, h, data, sizeBytes, stride);
114 rsc->mHal.funcs.allocation.data3D(rsc, this, xoff, yoff, zoff, lod, w, h, d, data, sizeBytes, stride);
120 const size_t eSize = mHal.state.type->getElementSizeBytes();
125 mHal.state.type->dumpLOGV("type info");
129 rsc->mHal.funcs.allocation.read1D(rsc, this, xoff, lod, count, data, sizeBytes);
134 const size_t eSize = mHal.state.elementSizeBytes;
146 rsc->mHal.funcs.allocation.read2D(rsc, this, xoff, yoff, lod, face, w, h, data, sizeBytes, stride);
151 const size_t eSize = mHal.state.elementSizeBytes;
157 rsc->mHal.funcs.allocation.read3D(rsc, this, xoff, yoff, zoff, lod, w, h, d, data, sizeBytes, stride);
163 size_t eSize = mHal.state.elementSizeBytes;
165 if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
171 if (x >= mHal.drvState.lod[0].dimX) {
177 const Element * e = mHal.state.type->getElement()->getField(cIdx);
178 uint32_t elemArraySize = mHal.state.type->getElement()->getFieldArraySize(cIdx);
185 rsc->mHal.funcs.allocation.elementData1D(rsc, this, x, data, cIdx, sizeBytes);
191 size_t eSize = mHal.state.elementSizeBytes;
193 if (x >= mHal.drvState.lod[0].dimX) {
199 if (y >= mHal.drvState.lod[0].dimY) {
205 if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
211 const Element * e = mHal.state.type->getElement()->getField(cIdx);
212 uint32_t elemArraySize = mHal.state.type->getElement()->getFieldArraySize(cIdx);
219 rsc->mHal.funcs.allocation.elementData2D(rsc, this, x, y, data, cIdx, sizeBytes);
242 if (mHal.state.type) {
243 mHal.state.type->dumpLOGV(s.string());
247 prefix, mHal.drvState.lod[0].mallocPtr, mHal.state.usageFlags, mHal.state.mipmapControl);
251 uint32_t numItems = mHal.state.type->getSizeBytes() / mHal.state.type->getElementSizeBytes();
252 return numItems * mHal.state.type->getElement()->getSizeBytesUnpadded();
306 uint8_t *dst = (uint8_t *)rsc->mHal.funcs.allocation.lock1D(rsc, this);
309 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
315 uint32_t numItems = mHal.state.type->getSizeBytes() / paddedBytes;
317 const uint8_t *src = (const uint8_t*)rsc->mHal.funcs.allocation.lock1D(rsc, this);
324 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
336 mHal.state.type->serialize(rsc, stream);
338 uint32_t dataSize = mHal.state.type->getSizeBytes();
345 stream->addByteArray(rsc->mHal.funcs.allocation.lock1D(rsc, this), dataSize);
346 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
405 mRSC->mHal.funcs.allocation.markDirty(rsc, this);
409 mHal.state.type->incRefs(ptr, ct, startOff);
413 if (!mHal.state.hasReferences || !getIsScript()) {
416 mHal.state.type->decRefs(ptr, ct, startOff);
420 void *ptr = mRSC->mHal.funcs.allocation.lock1D(mRSC, this);
421 decRefs(ptr, mHal.state.type->getSizeBytes() / mHal.state.type->getElementSizeBytes(), 0);
422 mRSC->mHal.funcs.allocation.unlock1D(mRSC, this);
426 if (mHal.state.hasReferences) {
438 uint32_t oldDimX = mHal.drvState.lod[0].dimX;
443 ObjectBaseRef<Type> t = mHal.state.type->cloneAndResize1D(rsc, dimX);
445 decRefs(rsc->mHal.funcs.allocation.lock1D(rsc, this), oldDimX - dimX, dimX);
446 rsc->mHal.funcs.allocation.unlock1D(rsc, this);
448 rsc->mHal.funcs.allocation.resize(rsc, this, t.get(), mHal.state.hasReferences);
458 return rsc->mHal.funcs.allocation.getSurface(rsc, this);
463 rsc->mHal.funcs.allocation.setSurface(rsc, this, nw);
467 rsc->mHal.funcs.allocation.ioSend(rsc, this);
471 rsc->mHal.funcs.allocation.ioReceive(rsc, this);
489 rsc->mHal.funcs.allocation.generateMipmaps(rsc, alloc);
578 rsc->mHal.funcs.allocation.generateMipmaps(rsc, texAlloc);
616 rsc->mHal.funcs.allocation.generateMipmaps(rsc, texAlloc);
633 rsc->mHal.funcs.allocation.allocData2D(rsc, dst, dstXoff, dstYoff, dstMip,
650 rsc->mHal.funcs.allocation.allocData3D(rsc, dst, dstXoff, dstYoff, dstZoff, dstMip,
680 rsc->mHal.funcs.allocation.read1D(rsc, a, xoff, lod, count, data, sizeBytes);