Lines Matching refs:lod

89                       uint32_t lod, RsAllocationCubemapFace face) {  in GetOffsetPtr()  argument
90 uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in GetOffsetPtr()
92 ptr += zoff * alloc->mHal.drvState.lod[lod].dimY * alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr()
93 ptr += yoff * alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr()
100 uint32_t xoff, uint32_t yoff, uint32_t lod, in Update2DTexture() argument
112 RSD_CALL_GL(glTexSubImage2D, t, lod, xoff, yoff, w, h, drv->glFormat, drv->glType, ptr); in Update2DTexture()
131 for (uint32_t lod = 0; lod < alloc->mHal.state.type->getLODCount(); lod++) { in Upload2DTexture() local
132 const uint8_t *p = GetOffsetPtr(alloc, 0, 0, 0, lod, (RsAllocationCubemapFace)face); in Upload2DTexture()
140 RSD_CALL_GL(glTexImage2D, t, lod, drv->glFormat, in Upload2DTexture()
141 alloc->mHal.state.type->getLODDimX(lod), in Upload2DTexture()
142 alloc->mHal.state.type->getLODDimY(lod), in Upload2DTexture()
145 RSD_CALL_GL(glTexSubImage2D, t, lod, 0, 0, in Upload2DTexture()
146 alloc->mHal.state.type->getLODDimX(lod), in Upload2DTexture()
147 alloc->mHal.state.type->getLODDimY(lod), in Upload2DTexture()
175 if (!alloc->mHal.drvState.lod[0].mallocPtr) { in UploadToTexture()
189 if (alloc->mHal.drvState.lod[0].mallocPtr) { in UploadToTexture()
190 free(alloc->mHal.drvState.lod[0].mallocPtr); in UploadToTexture()
191 alloc->mHal.drvState.lod[0].mallocPtr = nullptr; in UploadToTexture()
217 alloc->mHal.drvState.lod[0].dimX, alloc->mHal.drvState.lod[0].dimY); in AllocateRenderTarget()
243 alloc->mHal.drvState.lod[0].mallocPtr, GL_DYNAMIC_DRAW); in UploadToBufferObject()
263 state->lod[1].dimX = state->lod[0].dimX / 2; in DeriveYUVLayout()
264 state->lod[1].dimY = state->lod[0].dimY / 2; in DeriveYUVLayout()
265 state->lod[2].dimX = state->lod[0].dimX / 2; in DeriveYUVLayout()
266 state->lod[2].dimY = state->lod[0].dimY / 2; in DeriveYUVLayout()
273 state->lod[2].stride = rsRound(state->lod[0].stride >> 1, 16); in DeriveYUVLayout()
274 state->lod[2].mallocPtr = ((uint8_t *)state->lod[0].mallocPtr) + in DeriveYUVLayout()
275 (state->lod[0].stride * state->lod[0].dimY); in DeriveYUVLayout()
276 uvSize += state->lod[2].stride * state->lod[2].dimY; in DeriveYUVLayout()
278 state->lod[1].stride = state->lod[2].stride; in DeriveYUVLayout()
279 state->lod[1].mallocPtr = ((uint8_t *)state->lod[2].mallocPtr) + in DeriveYUVLayout()
280 (state->lod[2].stride * state->lod[2].dimY); in DeriveYUVLayout()
281 uvSize += state->lod[1].stride * state->lod[2].dimY; in DeriveYUVLayout()
285 state->lod[1].stride = state->lod[0].stride; in DeriveYUVLayout()
286 state->lod[2].stride = state->lod[0].stride; in DeriveYUVLayout()
287 state->lod[2].mallocPtr = ((uint8_t *)state->lod[0].mallocPtr) + in DeriveYUVLayout()
288 (state->lod[0].stride * state->lod[0].dimY); in DeriveYUVLayout()
289 state->lod[1].mallocPtr = ((uint8_t *)state->lod[2].mallocPtr) + 1; in DeriveYUVLayout()
290 uvSize += state->lod[1].stride * state->lod[1].dimY; in DeriveYUVLayout()
301 alloc->mHal.drvState.lod[0].dimX = type->getDimX(); in AllocationBuildPointerTable()
302 alloc->mHal.drvState.lod[0].dimY = type->getDimY(); in AllocationBuildPointerTable()
303 alloc->mHal.drvState.lod[0].dimZ = type->getDimZ(); in AllocationBuildPointerTable()
304 alloc->mHal.drvState.lod[0].mallocPtr = 0; in AllocationBuildPointerTable()
306 size_t stride = alloc->mHal.drvState.lod[0].dimX * type->getElementSizeBytes(); in AllocationBuildPointerTable()
307 alloc->mHal.drvState.lod[0].stride = rsRound(stride, requiredAlignment); in AllocationBuildPointerTable()
314 size_t o = alloc->mHal.drvState.lod[0].stride * rsMax(alloc->mHal.drvState.lod[0].dimY, 1u) * in AllocationBuildPointerTable()
315 rsMax(alloc->mHal.drvState.lod[0].dimZ, 1u); in AllocationBuildPointerTable()
320 offsets[ct] = (size_t)alloc->mHal.drvState.lod[ct].mallocPtr; in AllocationBuildPointerTable()
323 uint32_t tx = alloc->mHal.drvState.lod[0].dimX; in AllocationBuildPointerTable()
324 uint32_t ty = alloc->mHal.drvState.lod[0].dimY; in AllocationBuildPointerTable()
325 uint32_t tz = alloc->mHal.drvState.lod[0].dimZ; in AllocationBuildPointerTable()
326 for (uint32_t lod=1; lod < alloc->mHal.drvState.lodCount; lod++) { in AllocationBuildPointerTable() local
327 alloc->mHal.drvState.lod[lod].dimX = tx; in AllocationBuildPointerTable()
328 alloc->mHal.drvState.lod[lod].dimY = ty; in AllocationBuildPointerTable()
329 alloc->mHal.drvState.lod[lod].dimZ = tz; in AllocationBuildPointerTable()
330 alloc->mHal.drvState.lod[lod].stride = in AllocationBuildPointerTable()
332 offsets[lod] = o; in AllocationBuildPointerTable()
333 o += alloc->mHal.drvState.lod[lod].stride * rsMax(ty, 1u) * rsMax(tz, 1u); in AllocationBuildPointerTable()
342 alloc->mHal.drvState.lod[0].mallocPtr = ptr; in AllocationBuildPointerTable()
343 for (uint32_t lod=1; lod < alloc->mHal.drvState.lodCount; lod++) { in AllocationBuildPointerTable() local
344 alloc->mHal.drvState.lod[lod].mallocPtr = ptr + offsets[lod]; in AllocationBuildPointerTable()
514 for (uint32_t lod=0; lod < lodCount; lod++) { in rsdAllocationAdapterOffset() local
515 alloc->mHal.drvState.lod[lod] = base->mHal.drvState.lod[lod + lodBias]; in rsdAllocationAdapterOffset()
516 alloc->mHal.drvState.lod[lod].mallocPtr = GetOffsetPtr(alloc, in rsdAllocationAdapterOffset()
556 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationDestroy()
561 free(alloc->mHal.drvState.lod[0].mallocPtr); in rsdAllocationDestroy()
563 alloc->mHal.drvState.lod[0].mallocPtr = nullptr; in rsdAllocationDestroy()
596 const uint32_t oldDimX = alloc->mHal.drvState.lod[0].dimX; in rsdAllocationResize()
604 void * oldPtr = alloc->mHal.drvState.lod[0].mallocPtr; in rsdAllocationResize()
617 memset(((uint8_t *)alloc->mHal.drvState.lod[0].mallocPtr) + stride * oldDimX, in rsdAllocationResize()
646 RSD_CALL_GL(glReadPixels, 0, 0, alloc->mHal.drvState.lod[0].dimX, in rsdAllocationSyncFromFBO()
647 alloc->mHal.drvState.lod[0].dimY, in rsdAllocationSyncFromFBO()
648 drv->glFormat, drv->glType, alloc->mHal.drvState.lod[0].mallocPtr); in rsdAllocationSyncFromFBO()
726 alloc->mHal.drvState.lod[0].mallocPtr = dst; in IoGetBuffer()
727 … alloc->mHal.drvState.lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes; in IoGetBuffer()
728 rsAssert((alloc->mHal.drvState.lod[0].stride & 0xf) == 0); in IoGetBuffer()
760 int32_t r = ANativeWindow_setBuffersGeometry(nw, alloc->mHal.drvState.lod[0].dimX, in rsdAllocationSetSurface()
761 alloc->mHal.drvState.lod[0].dimY, in rsdAllocationSetSurface()
829 uint32_t xoff, uint32_t lod, size_t count, in rsdAllocationData1D() argument
849 uint32_t xoff, uint32_t yoff, uint32_t lod, RsAllocationCubemapFace face, in rsdAllocationData2D() argument
859 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationData2D()
861 uint8_t *dst = GetOffsetPtr(alloc, xoff, yoff, 0, lod, face); in rsdAllocationData2D()
876 dst += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationData2D()
880 int lod = 1; in rsdAllocationData2D() local
886 lod = 2; in rsdAllocationData2D()
890 while (lod < maxLod) { in rsdAllocationData2D()
891 uint8_t *dst = GetOffsetPtr(alloc, xoff, yoff, 0, lod, face); in rsdAllocationData2D()
898 dst += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationData2D()
900 lod++; in rsdAllocationData2D()
906 Update2DTexture(rsc, alloc, data, xoff, yoff, lod, face, w, h); in rsdAllocationData2D()
912 uint32_t lod, in rsdAllocationData3D() argument
923 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationData3D()
926 uint8_t *dst = GetOffsetPtr(alloc, xoff, yoff, z, lod, in rsdAllocationData3D()
942 dst += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationData3D()
950 uint32_t xoff, uint32_t lod, size_t count, in rsdAllocationRead1D() argument
962 … uint32_t xoff, uint32_t yoff, uint32_t lod, RsAllocationCubemapFace face, in rsdAllocationRead2D() argument
970 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationRead2D()
972 const uint8_t *src = GetOffsetPtr(alloc, xoff, yoff, 0, lod, face); in rsdAllocationRead2D()
982 src += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationRead2D()
992 uint32_t lod, in rsdAllocationRead3D() argument
1000 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationRead3D()
1003 const uint8_t *src = GetOffsetPtr(alloc, xoff, yoff, z, lod, in rsdAllocationRead3D()
1014 src += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationRead3D()
1022 return alloc->mHal.drvState.lod[0].mallocPtr; in rsdAllocationLock1D()
1144 static void mip565(const Allocation *alloc, int lod, RsAllocationCubemapFace face) { in mip565() argument
1145 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX; in mip565()
1146 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY; in mip565()
1149 uint16_t *oPtr = (uint16_t *)GetOffsetPtr(alloc, 0, y, 0, lod + 1, face); in mip565()
1150 const uint16_t *i1 = (uint16_t *)GetOffsetPtr(alloc, 0, 0, y*2, lod, face); in mip565()
1151 const uint16_t *i2 = (uint16_t *)GetOffsetPtr(alloc, 0, 0, y*2+1, lod, face); in mip565()
1162 static void mip8888(const Allocation *alloc, int lod, RsAllocationCubemapFace face) { in mip8888() argument
1163 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX; in mip8888()
1164 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY; in mip8888()
1167 uint32_t *oPtr = (uint32_t *)GetOffsetPtr(alloc, 0, y, 0, lod + 1, face); in mip8888()
1168 const uint32_t *i1 = (uint32_t *)GetOffsetPtr(alloc, 0, y*2, 0, lod, face); in mip8888()
1169 const uint32_t *i2 = (uint32_t *)GetOffsetPtr(alloc, 0, y*2+1, 0, lod, face); in mip8888()
1180 static void mip8(const Allocation *alloc, int lod, RsAllocationCubemapFace face) { in mip8() argument
1181 uint32_t w = alloc->mHal.drvState.lod[lod + 1].dimX; in mip8()
1182 uint32_t h = alloc->mHal.drvState.lod[lod + 1].dimY; in mip8()
1185 uint8_t *oPtr = GetOffsetPtr(alloc, 0, y, 0, lod + 1, face); in mip8()
1186 const uint8_t *i1 = GetOffsetPtr(alloc, 0, y*2, 0, lod, face); in mip8()
1187 const uint8_t *i2 = GetOffsetPtr(alloc, 0, y*2+1, 0, lod, face); in mip8()
1199 if(!alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationGenerateMipmaps()
1204 for (uint32_t lod=0; lod < (alloc->getType()->getLODCount() -1); lod++) { in rsdAllocationGenerateMipmaps() local
1207 mip8888(alloc, lod, (RsAllocationCubemapFace)face); in rsdAllocationGenerateMipmaps()
1210 mip565(alloc, lod, (RsAllocationCubemapFace)face); in rsdAllocationGenerateMipmaps()
1213 mip8(alloc, lod, (RsAllocationCubemapFace)face); in rsdAllocationGenerateMipmaps()