Lines Matching refs:lod
44 state->lod[1].dimX = state->lod[0].dimX / 2; in DeriveYUVLayout()
45 state->lod[1].dimY = state->lod[0].dimY / 2; in DeriveYUVLayout()
46 state->lod[2].dimX = state->lod[0].dimX / 2; in DeriveYUVLayout()
47 state->lod[2].dimY = state->lod[0].dimY / 2; in DeriveYUVLayout()
54 state->lod[2].stride = rsRound(state->lod[0].stride >> 1, 16); in DeriveYUVLayout()
55 state->lod[2].mallocPtr = ((uint8_t *)state->lod[0].mallocPtr) + in DeriveYUVLayout()
56 (state->lod[0].stride * state->lod[0].dimY); in DeriveYUVLayout()
57 uvSize += state->lod[2].stride * state->lod[2].dimY; in DeriveYUVLayout()
59 state->lod[1].stride = state->lod[2].stride; in DeriveYUVLayout()
60 state->lod[1].mallocPtr = ((uint8_t *)state->lod[2].mallocPtr) + in DeriveYUVLayout()
61 (state->lod[2].stride * state->lod[2].dimY); in DeriveYUVLayout()
62 uvSize += state->lod[1].stride * state->lod[2].dimY; in DeriveYUVLayout()
66 state->lod[1].stride = state->lod[0].stride; in DeriveYUVLayout()
67 state->lod[2].stride = state->lod[0].stride; in DeriveYUVLayout()
68 state->lod[2].mallocPtr = ((uint8_t *)state->lod[0].mallocPtr) + in DeriveYUVLayout()
69 (state->lod[0].stride * state->lod[0].dimY); in DeriveYUVLayout()
70 state->lod[1].mallocPtr = ((uint8_t *)state->lod[2].mallocPtr) + 1; in DeriveYUVLayout()
71 uvSize += state->lod[1].stride * state->lod[1].dimY; in DeriveYUVLayout()
85 alloc->mHal.drvState.lod[0].dimX = type->getDimX(); in AllocationBuildPointerTable()
86 alloc->mHal.drvState.lod[0].dimY = type->getDimY(); in AllocationBuildPointerTable()
87 alloc->mHal.drvState.lod[0].dimZ = type->getDimZ(); in AllocationBuildPointerTable()
88 alloc->mHal.drvState.lod[0].mallocPtr = 0; in AllocationBuildPointerTable()
91 alloc->mHal.drvState.lod[0].dimX * type->getElementSizeBytes(); in AllocationBuildPointerTable()
92 alloc->mHal.drvState.lod[0].stride = rsRound(stride, requiredAlignment); in AllocationBuildPointerTable()
99 size_t o = alloc->mHal.drvState.lod[0].stride * in AllocationBuildPointerTable()
100 rsMax(alloc->mHal.drvState.lod[0].dimY, 1u) * in AllocationBuildPointerTable()
101 rsMax(alloc->mHal.drvState.lod[0].dimZ, 1u); in AllocationBuildPointerTable()
106 offsets[ct] = (size_t)alloc->mHal.drvState.lod[ct].mallocPtr; in AllocationBuildPointerTable()
109 uint32_t tx = alloc->mHal.drvState.lod[0].dimX; in AllocationBuildPointerTable()
110 uint32_t ty = alloc->mHal.drvState.lod[0].dimY; in AllocationBuildPointerTable()
111 uint32_t tz = alloc->mHal.drvState.lod[0].dimZ; in AllocationBuildPointerTable()
112 for (uint32_t lod = 1; lod < alloc->mHal.drvState.lodCount; lod++) { in AllocationBuildPointerTable() local
113 alloc->mHal.drvState.lod[lod].dimX = tx; in AllocationBuildPointerTable()
114 alloc->mHal.drvState.lod[lod].dimY = ty; in AllocationBuildPointerTable()
115 alloc->mHal.drvState.lod[lod].dimZ = tz; in AllocationBuildPointerTable()
116 alloc->mHal.drvState.lod[lod].stride = in AllocationBuildPointerTable()
118 offsets[lod] = o; in AllocationBuildPointerTable()
119 o += alloc->mHal.drvState.lod[lod].stride * rsMax(ty, 1u) * rsMax(tz, 1u); in AllocationBuildPointerTable()
128 alloc->mHal.drvState.lod[0].mallocPtr = ptr; in AllocationBuildPointerTable()
129 for (uint32_t lod = 1; lod < alloc->mHal.drvState.lodCount; lod++) { in AllocationBuildPointerTable() local
130 alloc->mHal.drvState.lod[lod].mallocPtr = ptr + offsets[lod]; in AllocationBuildPointerTable()
148 uint32_t zoff, uint32_t lod, in GetOffsetPtr() argument
150 uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in GetOffsetPtr()
152 ptr += zoff * alloc->mHal.drvState.lod[lod].dimY * in GetOffsetPtr()
153 alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr()
154 ptr += yoff * alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr()
159 void mip565(const Allocation *alloc, int lod, RsAllocationCubemapFace face) { in mip565() argument
160 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX; in mip565()
161 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY; in mip565()
164 uint16_t *oPtr = (uint16_t *)GetOffsetPtr(alloc, 0, y, 0, lod + 1, face); in mip565()
166 (uint16_t *)GetOffsetPtr(alloc, 0, 0, y * 2, lod, face); in mip565()
168 (uint16_t *)GetOffsetPtr(alloc, 0, 0, y * 2 + 1, lod, face); in mip565()
179 void mip8888(const Allocation *alloc, int lod, RsAllocationCubemapFace face) { in mip8888() argument
180 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX; in mip8888()
181 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY; in mip8888()
184 uint32_t *oPtr = (uint32_t *)GetOffsetPtr(alloc, 0, y, 0, lod + 1, face); in mip8888()
186 (uint32_t *)GetOffsetPtr(alloc, 0, y * 2, 0, lod, face); in mip8888()
188 (uint32_t *)GetOffsetPtr(alloc, 0, y * 2 + 1, 0, lod, face); in mip8888()
199 void mip8(const Allocation *alloc, int lod, RsAllocationCubemapFace face) { in mip8() argument
200 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX; in mip8()
201 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY; in mip8()
204 uint8_t *oPtr = GetOffsetPtr(alloc, 0, y, 0, lod + 1, face); in mip8()
205 const uint8_t *i1 = GetOffsetPtr(alloc, 0, y * 2, 0, lod, face); in mip8()
206 const uint8_t *i2 = GetOffsetPtr(alloc, 0, y * 2 + 1, 0, lod, face); in mip8()
321 uint32_t xoff, uint32_t lod, size_t count, in rsovAllocationData1D() argument
339 uint32_t xoff, uint32_t yoff, uint32_t lod, in rsovAllocationData2D() argument
348 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsovAllocationData2D()
350 uint8_t *dst = GetOffsetPtr(alloc, xoff, yoff, 0, lod, face); in rsovAllocationData2D()
359 dst += alloc->mHal.drvState.lod[lod].stride; in rsovAllocationData2D()
364 int lod = 1; in rsovAllocationData2D() local
370 lod = 2; in rsovAllocationData2D()
374 while (lod < maxLod) { in rsovAllocationData2D()
375 uint8_t *dst = GetOffsetPtr(alloc, xoff, yoff, 0, lod, face); in rsovAllocationData2D()
382 dst += alloc->mHal.drvState.lod[lod].stride; in rsovAllocationData2D()
384 lod++; in rsovAllocationData2D()
392 uint32_t lod, uint32_t w, uint32_t h, uint32_t d, in rsovAllocationData3D() argument
400 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsovAllocationData3D()
403 uint8_t *dst = GetOffsetPtr(alloc, xoff, yoff, z, lod, in rsovAllocationData3D()
412 dst += alloc->mHal.drvState.lod[lod].stride; in rsovAllocationData3D()
419 uint32_t xoff, uint32_t lod, size_t count, void *data, in rsovAllocationRead1D() argument
432 uint32_t xoff, uint32_t yoff, uint32_t lod, in rsovAllocationRead2D() argument
441 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsovAllocationRead2D()
443 const uint8_t *src = GetOffsetPtr(alloc, xoff, yoff, 0, lod, face); in rsovAllocationRead2D()
453 src += alloc->mHal.drvState.lod[lod].stride; in rsovAllocationRead2D()
462 uint32_t lod, uint32_t w, uint32_t h, uint32_t d, in rsovAllocationRead3D() argument
470 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsovAllocationRead3D()
473 const uint8_t *src = GetOffsetPtr(alloc, xoff, yoff, z, lod, in rsovAllocationRead3D()
484 src += alloc->mHal.drvState.lod[lod].stride; in rsovAllocationRead3D()
491 return alloc->mHal.drvState.lod[0].mallocPtr; in rsovAllocationLock1D()
579 for (uint32_t lod = 0; lod < lodCount; lod++) { in rsovAllocationAdapterOffset() local
580 alloc->mHal.drvState.lod[lod] = base->mHal.drvState.lod[lod + lodBias]; in rsovAllocationAdapterOffset()
581 alloc->mHal.drvState.lod[lod].mallocPtr = GetOffsetPtr( in rsovAllocationAdapterOffset()
622 if (!alloc->mHal.drvState.lod[0].mallocPtr) { in rsovAllocationGenerateMipmaps()
627 for (uint32_t lod = 0; lod < (alloc->getType()->getLODCount() - 1); lod++) { in rsovAllocationGenerateMipmaps() local
630 mip8888(alloc, lod, (RsAllocationCubemapFace)face); in rsovAllocationGenerateMipmaps()
633 mip565(alloc, lod, (RsAllocationCubemapFace)face); in rsovAllocationGenerateMipmaps()
636 mip8(alloc, lod, (RsAllocationCubemapFace)face); in rsovAllocationGenerateMipmaps()