• Home
  • Raw
  • Download

Lines Matching refs:lod

81                       uint32_t xoff, uint32_t yoff, uint32_t lod,  in GetOffsetPtr()  argument
84 uint8_t *ptr = (uint8_t *)drv->lod[lod].mallocPtr; in GetOffsetPtr()
86 ptr += yoff * drv->lod[lod].stride; in GetOffsetPtr()
93 uint32_t xoff, uint32_t yoff, uint32_t lod, in Update2DTexture() argument
104 RSD_CALL_GL(glTexSubImage2D, t, lod, xoff, yoff, w, h, drv->glFormat, drv->glType, ptr); in Update2DTexture()
121 for (uint32_t lod = 0; lod < alloc->mHal.state.type->getLODCount(); lod++) { in Upload2DTexture() local
122 const uint8_t *p = GetOffsetPtr(alloc, 0, 0, lod, (RsAllocationCubemapFace)face); in Upload2DTexture()
130 RSD_CALL_GL(glTexImage2D, t, lod, drv->glFormat, in Upload2DTexture()
131 alloc->mHal.state.type->getLODDimX(lod), in Upload2DTexture()
132 alloc->mHal.state.type->getLODDimY(lod), in Upload2DTexture()
135 RSD_CALL_GL(glTexSubImage2D, t, lod, 0, 0, in Upload2DTexture()
136 alloc->mHal.state.type->getLODDimX(lod), in Upload2DTexture()
137 alloc->mHal.state.type->getLODDimY(lod), in Upload2DTexture()
163 if (!drv->lod[0].mallocPtr) { in UploadToTexture()
180 drv->lod[0].mallocPtr = NULL; in UploadToTexture()
237 drv->lod[0].dimX = type->getDimX(); in AllocationBuildPointerTable()
238 drv->lod[0].dimY = type->getDimY(); in AllocationBuildPointerTable()
239 drv->lod[0].mallocPtr = 0; in AllocationBuildPointerTable()
240 drv->lod[0].stride = drv->lod[0].dimX * type->getElementSizeBytes(); in AllocationBuildPointerTable()
247 size_t o = drv->lod[0].stride * rsMax(drv->lod[0].dimY, 1u) * rsMax(drv->lod[0].dimZ, 1u); in AllocationBuildPointerTable()
249 uint32_t tx = drv->lod[0].dimX; in AllocationBuildPointerTable()
250 uint32_t ty = drv->lod[0].dimY; in AllocationBuildPointerTable()
251 uint32_t tz = drv->lod[0].dimZ; in AllocationBuildPointerTable()
252 for (uint32_t lod=1; lod < drv->lodCount; lod++) { in AllocationBuildPointerTable() local
253 drv->lod[lod].dimX = tx; in AllocationBuildPointerTable()
254 drv->lod[lod].dimY = ty; in AllocationBuildPointerTable()
255 drv->lod[lod].dimZ = tz; in AllocationBuildPointerTable()
256 drv->lod[lod].stride = tx * type->getElementSizeBytes(); in AllocationBuildPointerTable()
257 offsets[lod] = o; in AllocationBuildPointerTable()
258 o += drv->lod[lod].stride * rsMax(ty, 1u) * rsMax(tz, 1u); in AllocationBuildPointerTable()
266 drv->lod[0].mallocPtr = ptr; in AllocationBuildPointerTable()
267 for (uint32_t lod=1; lod < drv->lodCount; lod++) { in AllocationBuildPointerTable() local
268 drv->lod[lod].mallocPtr = ptr + offsets[lod]; in AllocationBuildPointerTable()
270 alloc->mHal.drvState.strideLOD0 = drv->lod[0].stride; in AllocationBuildPointerTable()
371 void * oldPtr = drv->lod[0].mallocPtr; in rsdAllocationResize()
414 RSD_CALL_GL(glReadPixels, 0, 0, drv->lod[0].dimX, drv->lod[0].dimY, in rsdAllocationSyncFromFBO()
415 drv->glFormat, drv->glType, drv->lod[0].mallocPtr); in rsdAllocationSyncFromFBO()
485 drv->lod[0].mallocPtr = dst; in IoGetBuffer()
487 drv->lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes; in IoGetBuffer()
575 uint32_t xoff, uint32_t lod, uint32_t count, in rsdAllocationData1D() argument
593 uint32_t xoff, uint32_t yoff, uint32_t lod, RsAllocationCubemapFace face, in rsdAllocationData2D() argument
600 if (drv->lod[0].mallocPtr) { in rsdAllocationData2D()
602 uint8_t *dst = GetOffsetPtr(alloc, xoff, yoff, lod, face); in rsdAllocationData2D()
611 dst += drv->lod[lod].stride; in rsdAllocationData2D()
615 Update2DTexture(rsc, alloc, data, xoff, yoff, lod, face, w, h); in rsdAllocationData2D()
621 uint32_t lod, RsAllocationCubemapFace face, in rsdAllocationData3D() argument
627 uint32_t xoff, uint32_t lod, uint32_t count, in rsdAllocationRead1D() argument
637 uint32_t xoff, uint32_t yoff, uint32_t lod, RsAllocationCubemapFace face, in rsdAllocationRead2D() argument
644 if (drv->lod[0].mallocPtr) { in rsdAllocationRead2D()
646 const uint8_t *src = GetOffsetPtr(alloc, xoff, yoff, lod, face); in rsdAllocationRead2D()
651 src += drv->lod[lod].stride; in rsdAllocationRead2D()
660 uint32_t lod, RsAllocationCubemapFace face, in rsdAllocationRead3D() argument
668 return drv->lod[0].mallocPtr; in rsdAllocationLock1D()
769 static void mip565(const Allocation *alloc, int lod, RsAllocationCubemapFace face) { in mip565() argument
771 uint32_t w = drv->lod[lod + 1].dimX; in mip565()
772 uint32_t h = drv->lod[lod + 1].dimY; in mip565()
775 uint16_t *oPtr = (uint16_t *)GetOffsetPtr(alloc, 0, y, lod + 1, face); in mip565()
776 const uint16_t *i1 = (uint16_t *)GetOffsetPtr(alloc, 0, y*2, lod, face); in mip565()
777 const uint16_t *i2 = (uint16_t *)GetOffsetPtr(alloc, 0, y*2+1, lod, face); in mip565()
788 static void mip8888(const Allocation *alloc, int lod, RsAllocationCubemapFace face) { in mip8888() argument
790 uint32_t w = drv->lod[lod + 1].dimX; in mip8888()
791 uint32_t h = drv->lod[lod + 1].dimY; in mip8888()
794 uint32_t *oPtr = (uint32_t *)GetOffsetPtr(alloc, 0, y, lod + 1, face); in mip8888()
795 const uint32_t *i1 = (uint32_t *)GetOffsetPtr(alloc, 0, y*2, lod, face); in mip8888()
796 const uint32_t *i2 = (uint32_t *)GetOffsetPtr(alloc, 0, y*2+1, lod, face); in mip8888()
807 static void mip8(const Allocation *alloc, int lod, RsAllocationCubemapFace face) { in mip8() argument
809 uint32_t w = drv->lod[lod + 1].dimX; in mip8()
810 uint32_t h = drv->lod[lod + 1].dimY; in mip8()
813 uint8_t *oPtr = GetOffsetPtr(alloc, 0, y, lod + 1, face); in mip8()
814 const uint8_t *i1 = GetOffsetPtr(alloc, 0, y*2, lod, face); in mip8()
815 const uint8_t *i2 = GetOffsetPtr(alloc, 0, y*2+1, lod, face); in mip8()
828 if(!drv->lod[0].mallocPtr) { in rsdAllocationGenerateMipmaps()
833 for (uint32_t lod=0; lod < (alloc->getType()->getLODCount() -1); lod++) { in rsdAllocationGenerateMipmaps() local
836 mip8888(alloc, lod, (RsAllocationCubemapFace)face); in rsdAllocationGenerateMipmaps()
839 mip565(alloc, lod, (RsAllocationCubemapFace)face); in rsdAllocationGenerateMipmaps()
842 mip8(alloc, lod, (RsAllocationCubemapFace)face); in rsdAllocationGenerateMipmaps()