• Home
  • Raw
  • Download

Lines Matching refs:mHal

90     uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr;  in GetOffsetPtr()
91 ptr += face * alloc->mHal.drvState.faceOffset; 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()
94 ptr += xoff * alloc->mHal.state.elementSizeBytes; in GetOffsetPtr()
103 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Update2DTexture()
109 if (alloc->mHal.state.hasFaces) { in Update2DTexture()
119 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Upload2DTexture()
125 if (alloc->mHal.state.hasFaces) { in Upload2DTexture()
131 for (uint32_t lod = 0; lod < alloc->mHal.state.type->getLODCount(); lod++) { in Upload2DTexture()
135 if (alloc->mHal.state.hasFaces) { in Upload2DTexture()
141 alloc->mHal.state.type->getLODDimX(lod), in Upload2DTexture()
142 alloc->mHal.state.type->getLODDimY(lod), in Upload2DTexture()
146 alloc->mHal.state.type->getLODDimX(lod), in Upload2DTexture()
147 alloc->mHal.state.type->getLODDimY(lod), in Upload2DTexture()
153 if (alloc->mHal.state.mipmapControl == RS_ALLOCATION_MIPMAP_ON_SYNC_TO_TEXTURE) { in Upload2DTexture()
162 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in UploadToTexture()
164 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_INPUT) { in UploadToTexture()
175 if (!alloc->mHal.drvState.lod[0].mallocPtr) { in UploadToTexture()
188 if (!(alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_SCRIPT)) { 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()
200 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in AllocateRenderTarget()
217 alloc->mHal.drvState.lod[0].dimX, alloc->mHal.drvState.lod[0].dimY); in AllocateRenderTarget()
225 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in UploadToBufferObject()
227 rsAssert(!alloc->mHal.state.type->getDimY()); in UploadToBufferObject()
228 rsAssert(!alloc->mHal.state.type->getDimZ()); in UploadToBufferObject()
242 alloc->mHal.state.type->getPackedSizeBytes(), in UploadToBufferObject()
243 alloc->mHal.drvState.lod[0].mallocPtr, GL_DYNAMIC_DRAW); in UploadToBufferObject()
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()
308 alloc->mHal.drvState.lodCount = type->getLODCount(); in AllocationBuildPointerTable()
309 alloc->mHal.drvState.faceCount = type->getDimFaces(); 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()
316 if (alloc->mHal.state.yuv) { in AllocationBuildPointerTable()
317 o += DeriveYUVLayout(alloc->mHal.state.yuv, &alloc->mHal.drvState); in AllocationBuildPointerTable()
319 for (uint32_t ct = 1; ct < alloc->mHal.drvState.lodCount; ct++) { in AllocationBuildPointerTable()
320 offsets[ct] = (size_t)alloc->mHal.drvState.lod[ct].mallocPtr; in AllocationBuildPointerTable()
322 } else if(alloc->mHal.drvState.lodCount > 1) { 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()
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()
333 o += alloc->mHal.drvState.lod[lod].stride * rsMax(ty, 1u) * rsMax(tz, 1u); in AllocationBuildPointerTable()
340 alloc->mHal.drvState.faceOffset = o; 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()
344 alloc->mHal.drvState.lod[lod].mallocPtr = ptr + offsets[lod]; in AllocationBuildPointerTable()
347 size_t allocSize = alloc->mHal.drvState.faceOffset; in AllocationBuildPointerTable()
348 if(alloc->mHal.drvState.faceCount) { in AllocationBuildPointerTable()
377 alloc->mHal.drv = drv; in rsdAllocationInitStrided()
388 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_OUTPUT) { in rsdAllocationInitStrided()
390 } else if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_INPUT) { in rsdAllocationInitStrided()
394 …} else if (alloc->mHal.state.usageFlags == (RS_ALLOCATION_USAGE_INCREMENTAL_SUPPORT | RS_ALLOCATIO… in rsdAllocationInitStrided()
395 if (alloc->mHal.state.userProvidedPtr == nullptr) { in rsdAllocationInitStrided()
405 ptr = (uint8_t*)alloc->mHal.state.userProvidedPtr; in rsdAllocationInitStrided()
407 } else if (alloc->mHal.state.userProvidedPtr != nullptr) { in rsdAllocationInitStrided()
410 … if (!(alloc->mHal.state.usageFlags == (RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED) || in rsdAllocationInitStrided()
411 …alloc->mHal.state.usageFlags == (RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_SHARED | RS_ALLO… in rsdAllocationInitStrided()
428 alloc->mHal.drv = nullptr; in rsdAllocationInitStrided()
435 ptr = (uint8_t*)alloc->mHal.state.userProvidedPtr; in rsdAllocationInitStrided()
440 alloc->mHal.drv = nullptr; in rsdAllocationInitStrided()
452 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE) { in rsdAllocationInitStrided()
453 if (alloc->mHal.state.hasFaces) { in rsdAllocationInitStrided()
459 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_VERTEX) { in rsdAllocationInitStrided()
465 drv->glType = rsdTypeToGLType(alloc->mHal.state.type->getElement()->getComponent().getType()); in rsdAllocationInitStrided()
466 … drv->glFormat = rsdKindToGLFormat(alloc->mHal.state.type->getElement()->getComponent().getKind()); in rsdAllocationInitStrided()
472 if (alloc->mHal.state.usageFlags & ~RS_ALLOCATION_USAGE_SCRIPT) { in rsdAllocationInitStrided()
481 if ((alloc->mHal.state.userProvidedPtr != 0) && (drv->useUserProvidedPtr == false)) { in rsdAllocationInitStrided()
482 …ITIVE_X, alloc->getType()->getDimX(), alloc->getType()->getDimY(), alloc->mHal.state.userProvidedP… in rsdAllocationInitStrided()
488 ALOGE("pointer for allocation.drv: %p", &alloc->mHal.drv); in rsdAllocationInitStrided()
503 const Allocation *base = alloc->mHal.state.baseAlloc; in rsdAllocationAdapterOffset()
504 const Type *type = alloc->mHal.state.type; in rsdAllocationAdapterOffset()
512 const int lodBias = alloc->mHal.state.originLOD; in rsdAllocationAdapterOffset()
513 uint32_t lodCount = rsMax(alloc->mHal.drvState.lodCount, (uint32_t)1); in rsdAllocationAdapterOffset()
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()
517 … alloc->mHal.state.originX, alloc->mHal.state.originY, alloc->mHal.state.originZ, in rsdAllocationAdapterOffset()
518 lodBias, (RsAllocationCubemapFace)alloc->mHal.state.originFace); in rsdAllocationAdapterOffset()
527 alloc->mHal.drv = drv; in rsdAllocationAdapterInit()
536 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationDestroy()
538 if (alloc->mHal.state.baseAlloc == nullptr) { in rsdAllocationDestroy()
556 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationDestroy()
559 !(alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_INPUT) && in rsdAllocationDestroy()
560 !(alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_OUTPUT)) { in rsdAllocationDestroy()
561 free(alloc->mHal.drvState.lod[0].mallocPtr); in rsdAllocationDestroy()
563 alloc->mHal.drvState.lod[0].mallocPtr = nullptr; in rsdAllocationDestroy()
573 if ((alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_OUTPUT) && in rsdAllocationDestroy()
574 (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_SCRIPT)) { in rsdAllocationDestroy()
591 alloc->mHal.drv = nullptr; in rsdAllocationDestroy()
596 const uint32_t oldDimX = alloc->mHal.drvState.lod[0].dimX; in rsdAllocationResize()
600 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_SHARED) { in rsdAllocationResize()
604 void * oldPtr = alloc->mHal.drvState.lod[0].mallocPtr; in rsdAllocationResize()
616 size_t stride = alloc->mHal.state.elementSizeBytes; in rsdAllocationResize()
617 memset(((uint8_t *)alloc->mHal.drvState.lod[0].mallocPtr) + stride * oldDimX, in rsdAllocationResize()
628 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdAllocationSyncFromFBO()
631 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationSyncFromFBO()
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()
658 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationSyncAll()
676 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE) { in rsdAllocationSyncAll()
679 if ((alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET) && in rsdAllocationSyncAll()
680 !(alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_OUTPUT)) { in rsdAllocationSyncAll()
684 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_VERTEX) { in rsdAllocationSyncAll()
688 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_SHARED) { in rsdAllocationSyncAll()
702 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationMarkDirty()
708 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in IoGetBuffer()
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()
736 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationSetSurface()
760 int32_t r = ANativeWindow_setBuffersGeometry(nw, alloc->mHal.drvState.lod[0].dimX, in rsdAllocationSetSurface()
761 alloc->mHal.drvState.lod[0].dimY, in rsdAllocationSetSurface()
768 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_SCRIPT) { in rsdAllocationSetSurface()
787 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationIoSend()
790 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET) { in rsdAllocationIoSend()
791 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdAllocationIoSend()
797 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_SCRIPT) { in rsdAllocationIoSend()
822 if (alloc->mHal.state.yuv) { in rsdAllocationIoReceive()
823 DeriveYUVLayout(alloc->mHal.state.yuv, &alloc->mHal.drvState); in rsdAllocationIoReceive()
831 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationData1D()
833 const size_t eSize = alloc->mHal.state.type->getElementSizeBytes(); in rsdAllocationData1D()
839 if (alloc->mHal.state.hasReferences) { in rsdAllocationData1D()
851 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationData2D()
853 size_t eSize = alloc->mHal.state.elementSizeBytes; in rsdAllocationData2D()
859 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationData2D()
870 if (alloc->mHal.state.hasReferences) { in rsdAllocationData2D()
876 dst += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationData2D()
878 if (alloc->mHal.state.yuv) { in rsdAllocationData2D()
882 if (alloc->mHal.state.yuv == RS_YUV_YV12) { in rsdAllocationData2D()
885 } else if (alloc->mHal.state.yuv == RS_YUV_NV21) { in rsdAllocationData2D()
898 dst += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationData2D()
915 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationData3D()
917 uint32_t eSize = alloc->mHal.state.elementSizeBytes; in rsdAllocationData3D()
923 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationData3D()
936 if (alloc->mHal.state.hasReferences) { in rsdAllocationData3D()
942 dst += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationData3D()
952 const size_t eSize = alloc->mHal.state.type->getElementSizeBytes(); in rsdAllocationRead1D()
964 size_t eSize = alloc->mHal.state.elementSizeBytes; in rsdAllocationRead2D()
970 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationRead2D()
982 src += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationRead2D()
994 uint32_t eSize = alloc->mHal.state.elementSizeBytes; in rsdAllocationRead3D()
1000 if (alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationRead3D()
1014 src += alloc->mHal.drvState.lod[lod].stride; in rsdAllocationRead3D()
1022 return alloc->mHal.drvState.lod[0].mallocPtr; in rsdAllocationLock1D()
1115 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationElementData()
1119 const Element * e = alloc->mHal.state.type->getElement()->getField(cIdx); in rsdAllocationElementData()
1120 ptr += alloc->mHal.state.type->getElement()->getFieldOffsetBytes(cIdx); in rsdAllocationElementData()
1122 if (alloc->mHal.state.hasReferences) { in rsdAllocationElementData()
1134 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationElementRead()
1138 const Element * e = alloc->mHal.state.type->getElement()->getField(cIdx); in rsdAllocationElementRead()
1139 ptr += alloc->mHal.state.type->getElement()->getFieldOffsetBytes(cIdx); in rsdAllocationElementRead()
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()
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()
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()
1199 if(!alloc->mHal.drvState.lod[0].mallocPtr) { in rsdAllocationGenerateMipmaps()