Lines Matching refs:DrvState
94 uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr;
95 ptr += face * alloc->mHal.drvState.faceOffset;
96 ptr += zoff * alloc->mHal.drvState.lod[lod].dimY * alloc->mHal.drvState.lod[lod].stride;
97 ptr += yoff * alloc->mHal.drvState.lod[lod].stride;
179 if (!alloc->mHal.drvState.lod[0].mallocPtr) {
193 if (alloc->mHal.drvState.lod[0].mallocPtr) {
194 free(alloc->mHal.drvState.lod[0].mallocPtr);
195 alloc->mHal.drvState.lod[0].mallocPtr = nullptr;
221 alloc->mHal.drvState.lod[0].dimX, alloc->mHal.drvState.lod[0].dimY);
247 alloc->mHal.drvState.lod[0].mallocPtr, GL_DYNAMIC_DRAW);
254 static size_t DeriveYUVLayout(int yuv, Allocation::Hal::DrvState *state) {
307 alloc->mHal.drvState.lod[0].dimX = type->getDimX();
308 alloc->mHal.drvState.lod[0].dimY = type->getDimY();
309 alloc->mHal.drvState.lod[0].dimZ = type->getDimZ();
310 alloc->mHal.drvState.lod[0].mallocPtr = 0;
312 size_t stride = alloc->mHal.drvState.lod[0].dimX * type->getElementSizeBytes();
313 alloc->mHal.drvState.lod[0].stride = rsRound(stride, requiredAlignment);
314 alloc->mHal.drvState.lodCount = type->getLODCount();
315 alloc->mHal.drvState.faceCount = type->getDimFaces();
320 size_t o = alloc->mHal.drvState.lod[0].stride * rsMax(alloc->mHal.drvState.lod[0].dimY, 1u) *
321 rsMax(alloc->mHal.drvState.lod[0].dimZ, 1u);
323 o += DeriveYUVLayout(alloc->mHal.state.yuv, &alloc->mHal.drvState);
325 for (uint32_t ct = 1; ct < alloc->mHal.drvState.lodCount; ct++) {
326 offsets[ct] = (size_t)alloc->mHal.drvState.lod[ct].mallocPtr;
328 } else if(alloc->mHal.drvState.lodCount > 1) {
329 uint32_t tx = alloc->mHal.drvState.lod[0].dimX;
330 uint32_t ty = alloc->mHal.drvState.lod[0].dimY;
331 uint32_t tz = alloc->mHal.drvState.lod[0].dimZ;
332 for (uint32_t lod=1; lod < alloc->mHal.drvState.lodCount; lod++) {
333 alloc->mHal.drvState.lod[lod].dimX = tx;
334 alloc->mHal.drvState.lod[lod].dimY = ty;
335 alloc->mHal.drvState.lod[lod].dimZ = tz;
336 alloc->mHal.drvState.lod[lod].stride =
339 o += alloc->mHal.drvState.lod[lod].stride * rsMax(ty, 1u) * rsMax(tz, 1u);
346 alloc->mHal.drvState.faceOffset = o;
348 alloc->mHal.drvState.lod[0].mallocPtr = ptr;
349 for (uint32_t lod=1; lod < alloc->mHal.drvState.lodCount; lod++) {
350 alloc->mHal.drvState.lod[lod].mallocPtr = ptr + offsets[lod];
353 size_t allocSize = alloc->mHal.drvState.faceOffset;
354 if(alloc->mHal.drvState.faceCount) {
517 //ALOGE("rsdAllocationAdapterOffset lodCount %i", alloc->mHal.drvState.lodCount);
520 uint32_t lodCount = rsMax(alloc->mHal.drvState.lodCount, (uint32_t)1);
522 alloc->mHal.drvState.lod[lod] = base->mHal.drvState.lod[lod + lodBias];
523 alloc->mHal.drvState.lod[lod].mallocPtr = GetOffsetPtr(alloc,
563 if (alloc->mHal.drvState.lod[0].mallocPtr) {
568 free(alloc->mHal.drvState.lod[0].mallocPtr);
570 alloc->mHal.drvState.lod[0].mallocPtr = nullptr;
603 const uint32_t oldDimX = alloc->mHal.drvState.lod[0].dimX;
611 void * oldPtr = alloc->mHal.drvState.lod[0].mallocPtr;
624 memset(((uint8_t *)alloc->mHal.drvState.lod[0].mallocPtr) + stride * oldDimX,
653 RSD_CALL_GL(glReadPixels, 0, 0, alloc->mHal.drvState.lod[0].dimX,
654 alloc->mHal.drvState.lod[0].dimY,
655 drv->glFormat, drv->glType, alloc->mHal.drvState.lod[0].mallocPtr);
731 alloc->mHal.drvState.lod[0].mallocPtr = dst;
732 alloc->mHal.drvState.lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes;
733 rsAssert((alloc->mHal.drvState.lod[0].stride & 0xf) == 0);
789 r = native_window_set_buffers_dimensions(nw, alloc->mHal.drvState.lod[0].dimX,
790 alloc->mHal.drvState.lod[0].dimY);
865 DeriveYUVLayout(alloc->mHal.state.yuv, &alloc->mHal.drvState);
901 if (alloc->mHal.drvState.lod[0].mallocPtr) {
918 dst += alloc->mHal.drvState.lod[lod].stride;
940 dst += alloc->mHal.drvState.lod[lod].stride;
965 if (alloc->mHal.drvState.lod[0].mallocPtr) {
984 dst += alloc->mHal.drvState.lod[lod].stride;
1012 if (alloc->mHal.drvState.lod[0].mallocPtr) {
1024 src += alloc->mHal.drvState.lod[lod].stride;
1042 if (alloc->mHal.drvState.lod[0].mallocPtr) {
1056 src += alloc->mHal.drvState.lod[lod].stride;
1064 return alloc->mHal.drvState.lod[0].mallocPtr;
1187 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX;
1188 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY;
1205 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX;
1206 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY;
1223 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX;
1224 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY;
1241 if(!alloc->mHal.drvState.lod[0].mallocPtr) {
1275 obj->r = alloc->mHal.drvState.lod[0].mallocPtr;
1277 obj->v2 = (void *)alloc->mHal.drvState.lod[0].stride;