Home | History | Annotate | Download | only in driver

Lines Matching refs:drvState

87     uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr;
88 ptr += face * alloc->mHal.drvState.faceOffset;
89 ptr += zoff * alloc->mHal.drvState.lod[lod].dimY * alloc->mHal.drvState.lod[lod].stride;
90 ptr += yoff * alloc->mHal.drvState.lod[lod].stride;
172 if (!alloc->mHal.drvState.lod[0].mallocPtr) {
186 if (alloc->mHal.drvState.lod[0].mallocPtr) {
187 free(alloc->mHal.drvState.lod[0].mallocPtr);
188 alloc->mHal.drvState.lod[0].mallocPtr = nullptr;
214 alloc->mHal.drvState.lod[0].dimX, alloc->mHal.drvState.lod[0].dimY);
240 alloc->mHal.drvState.lod[0].mallocPtr, GL_DYNAMIC_DRAW);
247 static size_t DeriveYUVLayout(int yuv, Allocation::Hal::DrvState *state) {
298 alloc->mHal.drvState.lod[0].dimX = type->getDimX();
299 alloc->mHal.drvState.lod[0].dimY = type->getDimY();
300 alloc->mHal.drvState.lod[0].dimZ = type->getDimZ();
301 alloc->mHal.drvState.lod[0].mallocPtr = 0;
303 size_t stride = alloc->mHal.drvState.lod[0].dimX * type->getElementSizeBytes();
304 alloc->mHal.drvState.lod[0].stride = rsRound(stride, requiredAlignment);
305 alloc->mHal.drvState.lodCount = type->getLODCount();
306 alloc->mHal.drvState.faceCount = type->getDimFaces();
311 size_t o = alloc->mHal.drvState.lod[0].stride * rsMax(alloc->mHal.drvState.lod[0].dimY, 1u) *
312 rsMax(alloc->mHal.drvState.lod[0].dimZ, 1u);
314 o += DeriveYUVLayout(alloc->mHal.state.yuv, &alloc->mHal.drvState);
316 for (uint32_t ct = 1; ct < alloc->mHal.drvState.lodCount; ct++) {
317 offsets[ct] = (size_t)alloc->mHal.drvState.lod[ct].mallocPtr;
319 } else if(alloc->mHal.drvState.lodCount > 1) {
320 uint32_t tx = alloc->mHal.drvState.lod[0].dimX;
321 uint32_t ty = alloc->mHal.drvState.lod[0].dimY;
322 uint32_t tz = alloc->mHal.drvState.lod[0].dimZ;
323 for (uint32_t lod=1; lod < alloc->mHal.drvState.lodCount; lod++) {
324 alloc->mHal.drvState.lod[lod].dimX = tx;
325 alloc->mHal.drvState.lod[lod].dimY = ty;
326 alloc->mHal.drvState.lod[lod].dimZ = tz;
327 alloc->mHal.drvState.lod[lod].stride =
330 o += alloc->mHal.drvState.lod[lod].stride * rsMax(ty, 1u) * rsMax(tz, 1u);
337 alloc->mHal.drvState.faceOffset = o;
339 alloc->mHal.drvState.lod[0].mallocPtr = ptr;
340 for (uint32_t lod=1; lod < alloc->mHal.drvState.lodCount; lod++) {
341 alloc->mHal.drvState.lod[lod].mallocPtr = ptr + offsets[lod];
344 size_t allocSize = alloc->mHal.drvState.faceOffset;
345 if(alloc->mHal.drvState.faceCount) {
507 //ALOGE("rsdAllocationAdapterOffset lodCount %i", alloc->mHal.drvState.lodCount);
510 uint32_t lodCount = rsMax(alloc->mHal.drvState.lodCount, (uint32_t)1);
512 alloc->mHal.drvState.lod[lod] = base->mHal.drvState.lod[lod + lodBias];
513 alloc->mHal.drvState.lod[lod].mallocPtr = GetOffsetPtr(alloc,
553 if (alloc->mHal.drvState.lod[0].mallocPtr) {
558 free(alloc->mHal.drvState.lod[0].mallocPtr);
560 alloc->mHal.drvState.lod[0].mallocPtr = nullptr;
593 const uint32_t oldDimX = alloc->mHal.drvState.lod[0].dimX;
601 void * oldPtr = alloc->mHal.drvState.lod[0].mallocPtr;
614 memset(((uint8_t *)alloc->mHal.drvState.lod[0].mallocPtr) + stride * oldDimX,
643 RSD_CALL_GL(glReadPixels, 0, 0, alloc->mHal.drvState.lod[0].dimX,
644 alloc->mHal.drvState.lod[0].dimY,
645 drv->glFormat, drv->glType, alloc->mHal.drvState.lod[0].mallocPtr);
723 alloc->mHal.drvState.lod[0].mallocPtr = dst;
724 alloc->mHal.drvState.lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes;
725 rsAssert((alloc->mHal.drvState.lod[0].stride & 0xf) == 0);
757 int32_t r = ANativeWindow_setBuffersGeometry(nw, alloc->mHal.drvState.lod[0].dimX,
758 alloc->mHal.drvState.lod[0].dimY,
811 DeriveYUVLayout(alloc->mHal.state.yuv, &alloc->mHal.drvState);
847 if (alloc->mHal.drvState.lod[0].mallocPtr) {
864 dst += alloc->mHal.drvState.lod[lod].stride;
886 dst += alloc->mHal.drvState.lod[lod].stride;
911 if (alloc->mHal.drvState.lod[0].mallocPtr) {
930 dst += alloc->mHal.drvState.lod[lod].stride;
958 if (alloc->mHal.drvState.lod[0].mallocPtr) {
970 src += alloc->mHal.drvState.lod[lod].stride;
988 if (alloc->mHal.drvState.lod[0].mallocPtr) {
1002 src += alloc->mHal.drvState.lod[lod].stride;
1010 return alloc->mHal.drvState.lod[0].mallocPtr;
1133 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX;
1134 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY;
1151 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX;
1152 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY;
1169 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX;
1170 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY;
1187 if(!alloc->mHal.drvState.lod[0].mallocPtr) {