Lines Matching refs:DrvState
33 size_t DeriveYUVLayout(int yuv, Allocation::Hal::DrvState *state) {
85 alloc->mHal.drvState.lod[0].dimX = type->getDimX();
86 alloc->mHal.drvState.lod[0].dimY = type->getDimY();
87 alloc->mHal.drvState.lod[0].dimZ = type->getDimZ();
88 alloc->mHal.drvState.lod[0].mallocPtr = 0;
91 alloc->mHal.drvState.lod[0].dimX * type->getElementSizeBytes();
92 alloc->mHal.drvState.lod[0].stride = rsRound(stride, requiredAlignment);
93 alloc->mHal.drvState.lodCount = type->getLODCount();
94 alloc->mHal.drvState.faceCount = type->getDimFaces();
99 size_t o = alloc->mHal.drvState.lod[0].stride *
100 rsMax(alloc->mHal.drvState.lod[0].dimY, 1u) *
101 rsMax(alloc->mHal.drvState.lod[0].dimZ, 1u);
103 o += DeriveYUVLayout(alloc->mHal.state.yuv, &alloc->mHal.drvState);
105 for (uint32_t ct = 1; ct < alloc->mHal.drvState.lodCount; ct++) {
106 offsets[ct] = (size_t)alloc->mHal.drvState.lod[ct].mallocPtr;
108 } else if (alloc->mHal.drvState.lodCount > 1) {
109 uint32_t tx = alloc->mHal.drvState.lod[0].dimX;
110 uint32_t ty = alloc->mHal.drvState.lod[0].dimY;
111 uint32_t tz = alloc->mHal.drvState.lod[0].dimZ;
112 for (uint32_t lod = 1; lod < alloc->mHal.drvState.lodCount; lod++) {
113 alloc->mHal.drvState.lod[lod].dimX = tx;
114 alloc->mHal.drvState.lod[lod].dimY = ty;
115 alloc->mHal.drvState.lod[lod].dimZ = tz;
116 alloc->mHal.drvState.lod[lod].stride =
119 o += alloc->mHal.drvState.lod[lod].stride * rsMax(ty, 1u) * rsMax(tz, 1u);
126 alloc->mHal.drvState.faceOffset = o;
128 alloc->mHal.drvState.lod[0].mallocPtr = ptr;
129 for (uint32_t lod = 1; lod < alloc->mHal.drvState.lodCount; lod++) {
130 alloc->mHal.drvState.lod[lod].mallocPtr = ptr + offsets[lod];
133 size_t allocSize = alloc->mHal.drvState.faceOffset;
134 if (alloc->mHal.drvState.faceCount) {
150 uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr;
151 ptr += face * alloc->mHal.drvState.faceOffset;
152 ptr += zoff * alloc->mHal.drvState.lod[lod].dimY *
153 alloc->mHal.drvState.lod[lod].stride;
154 ptr += yoff * alloc->mHal.drvState.lod[lod].stride;
160 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX;
161 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY;
180 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX;
181 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY;
200 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX;
201 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY;
348 if (alloc->mHal.drvState.lod[0].mallocPtr) {
359 dst += alloc->mHal.drvState.lod[lod].stride;
382 dst += alloc->mHal.drvState.lod[lod].stride;
400 if (alloc->mHal.drvState.lod[0].mallocPtr) {
412 dst += alloc->mHal.drvState.lod[lod].stride;
441 if (alloc->mHal.drvState.lod[0].mallocPtr) {
453 src += alloc->mHal.drvState.lod[lod].stride;
470 if (alloc->mHal.drvState.lod[0].mallocPtr) {
484 src += alloc->mHal.drvState.lod[lod].stride;
491 return alloc->mHal.drvState.lod[0].mallocPtr;
578 uint32_t lodCount = rsMax(alloc->mHal.drvState.lodCount, (uint32_t)1);
580 alloc->mHal.drvState.lod[lod] = base->mHal.drvState.lod[lod + lodBias];
581 alloc->mHal.drvState.lod[lod].mallocPtr = GetOffsetPtr(
622 if (!alloc->mHal.drvState.lod[0].mallocPtr) {