Lines Matching refs:drv

103     DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;  in Update2DTexture()  local
105 rsAssert(drv->textureID); in Update2DTexture()
106 RSD_CALL_GL(glBindTexture, drv->glTarget, drv->textureID); in Update2DTexture()
112 RSD_CALL_GL(glTexSubImage2D, t, lod, xoff, yoff, w, h, drv->glFormat, drv->glType, ptr); in Update2DTexture()
119 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Upload2DTexture() local
121 RSD_CALL_GL(glBindTexture, drv->glTarget, drv->textureID); in Upload2DTexture()
140 RSD_CALL_GL(glTexImage2D, t, lod, drv->glFormat, in Upload2DTexture()
143 0, drv->glFormat, drv->glType, p); in Upload2DTexture()
148 drv->glFormat, drv->glType, p); in Upload2DTexture()
154 RSD_CALL_GL(glGenerateMipmap, drv->glTarget); in Upload2DTexture()
162 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in UploadToTexture() local
165 if (!drv->textureID) { in UploadToTexture()
166 RSD_CALL_GL(glGenTextures, 1, &drv->textureID); in UploadToTexture()
171 if (!drv->glType || !drv->glFormat) { in UploadToTexture()
181 if (!drv->textureID) { in UploadToTexture()
182 RSD_CALL_GL(glGenTextures, 1, &drv->textureID); in UploadToTexture()
200 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in AllocateRenderTarget() local
202 if (!drv->glFormat) { in AllocateRenderTarget()
206 if (!drv->renderTargetID) { in AllocateRenderTarget()
207 RSD_CALL_GL(glGenRenderbuffers, 1, &drv->renderTargetID); in AllocateRenderTarget()
209 if (!drv->renderTargetID) { in AllocateRenderTarget()
215 RSD_CALL_GL(glBindRenderbuffer, GL_RENDERBUFFER, drv->renderTargetID); in AllocateRenderTarget()
216 RSD_CALL_GL(glRenderbufferStorage, GL_RENDERBUFFER, drv->glFormat, in AllocateRenderTarget()
225 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in UploadToBufferObject() local
232 if (!drv->bufferID) { in UploadToBufferObject()
233 RSD_CALL_GL(glGenBuffers, 1, &drv->bufferID); in UploadToBufferObject()
235 if (!drv->bufferID) { in UploadToBufferObject()
237 drv->uploadDeferred = true; in UploadToBufferObject()
240 RSD_CALL_GL(glBindBuffer, drv->glTarget, drv->bufferID); in UploadToBufferObject()
241 RSD_CALL_GL(glBufferData, drv->glTarget, in UploadToBufferObject()
244 RSD_CALL_GL(glBindBuffer, drv->glTarget, 0); in UploadToBufferObject()
373 DrvAllocation *drv = (DrvAllocation *)calloc(1, sizeof(DrvAllocation)); in rsdAllocationInitStrided() local
374 if (!drv) { in rsdAllocationInitStrided()
377 alloc->mHal.drv = drv; in rsdAllocationInitStrided()
404 drv->useUserProvidedPtr = true; in rsdAllocationInitStrided()
424 drv->useUserProvidedPtr = false; in rsdAllocationInitStrided()
428 alloc->mHal.drv = nullptr; in rsdAllocationInitStrided()
429 free(drv); in rsdAllocationInitStrided()
434 drv->useUserProvidedPtr = true; in rsdAllocationInitStrided()
440 alloc->mHal.drv = nullptr; in rsdAllocationInitStrided()
441 free(drv); in rsdAllocationInitStrided()
451 drv->glTarget = GL_NONE; in rsdAllocationInitStrided()
454 drv->glTarget = GL_TEXTURE_CUBE_MAP; in rsdAllocationInitStrided()
456 drv->glTarget = GL_TEXTURE_2D; in rsdAllocationInitStrided()
460 drv->glTarget = GL_ARRAY_BUFFER; in rsdAllocationInitStrided()
465 drv->glType = rsdTypeToGLType(alloc->mHal.state.type->getElement()->getComponent().getType()); in rsdAllocationInitStrided()
466drv->glFormat = rsdKindToGLFormat(alloc->mHal.state.type->getElement()->getComponent().getKind()); in rsdAllocationInitStrided()
468 drv->glType = 0; in rsdAllocationInitStrided()
469 drv->glFormat = 0; in rsdAllocationInitStrided()
473 drv->uploadDeferred = true; in rsdAllocationInitStrided()
477 drv->readBackFBO = nullptr; in rsdAllocationInitStrided()
481 if ((alloc->mHal.state.userProvidedPtr != 0) && (drv->useUserProvidedPtr == false)) { in rsdAllocationInitStrided()
488 ALOGE("pointer for allocation.drv: %p", &alloc->mHal.drv); in rsdAllocationInitStrided()
523 DrvAllocation *drv = (DrvAllocation *)calloc(1, sizeof(DrvAllocation)); in rsdAllocationAdapterInit() local
524 if (!drv) { in rsdAllocationAdapterInit()
527 alloc->mHal.drv = drv; in rsdAllocationAdapterInit()
536 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationDestroy() local
540 if (drv->bufferID) { in rsdAllocationDestroy()
546 if (drv->textureID) { in rsdAllocationDestroy()
547 RSD_CALL_GL(glDeleteTextures, 1, &drv->textureID); in rsdAllocationDestroy()
548 drv->textureID = 0; in rsdAllocationDestroy()
550 if (drv->renderTargetID) { in rsdAllocationDestroy()
551 RSD_CALL_GL(glDeleteRenderbuffers, 1, &drv->renderTargetID); in rsdAllocationDestroy()
552 drv->renderTargetID = 0; in rsdAllocationDestroy()
558 if (!(drv->useUserProvidedPtr) && in rsdAllocationDestroy()
568 if (drv->readBackFBO != nullptr) { in rsdAllocationDestroy()
569 delete drv->readBackFBO; in rsdAllocationDestroy()
570 drv->readBackFBO = nullptr; in rsdAllocationDestroy()
575 ANativeWindow *nw = drv->wndSurface; in rsdAllocationDestroy()
578 AHardwareBuffer* ahwb = ANativeWindowBuffer_getHardwareBuffer(drv->wndBuffer); in rsdAllocationDestroy()
581 ANativeWindow_cancelBuffer(nw, drv->wndBuffer, fenceID); in rsdAllocationDestroy()
583 drv->wndSurface = nullptr; in rsdAllocationDestroy()
584 drv->wndBuffer = nullptr; in rsdAllocationDestroy()
590 free(drv); in rsdAllocationDestroy()
591 alloc->mHal.drv = nullptr; in rsdAllocationDestroy()
628 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdAllocationSyncFromFBO()
631 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationSyncFromFBO() local
632 if (!drv->textureID && !drv->renderTargetID) { in rsdAllocationSyncFromFBO()
635 if (drv->readBackFBO == nullptr) { in rsdAllocationSyncFromFBO()
636 drv->readBackFBO = new RsdFrameBufferObj(); in rsdAllocationSyncFromFBO()
637 drv->readBackFBO->setColorTarget(drv, 0); in rsdAllocationSyncFromFBO()
638 drv->readBackFBO->setDimensions(alloc->getType()->getDimX(), in rsdAllocationSyncFromFBO()
643 drv->readBackFBO->setActive(rsc); in rsdAllocationSyncFromFBO()
648 drv->glFormat, drv->glType, alloc->mHal.drvState.lod[0].mallocPtr); in rsdAllocationSyncFromFBO()
658 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationSyncAll() local
698 drv->uploadDeferred = false; in rsdAllocationSyncAll()
702 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationMarkDirty() local
703 drv->uploadDeferred = true; in rsdAllocationMarkDirty()
708 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in IoGetBuffer() local
711 int r = ANativeWindow_dequeueBuffer(nw, &drv->wndBuffer, &fenceID); in IoGetBuffer()
719 AHardwareBuffer* ahwb = ANativeWindowBuffer_getHardwareBuffer(drv->wndBuffer); in IoGetBuffer()
727 … alloc->mHal.drvState.lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes; in IoGetBuffer()
736 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationSetSurface() local
739 if (drv->wndSurface) { in rsdAllocationSetSurface()
740 ANativeWindow *old = drv->wndSurface; in rsdAllocationSetSurface()
741 AHardwareBuffer* ahwb = ANativeWindowBuffer_getHardwareBuffer(drv->wndBuffer); in rsdAllocationSetSurface()
749 r = ANativeWindow_cancelBuffer(old, drv->wndBuffer, fenceID); in rsdAllocationSetSurface()
755 drv->wndSurface = nullptr; in rsdAllocationSetSurface()
756 drv->wndBuffer = nullptr; in rsdAllocationSetSurface()
778 drv->wndSurface = nw; in rsdAllocationSetSurface()
787 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationIoSend() local
788 ANativeWindow *nw = drv->wndSurface; in rsdAllocationIoSend()
791 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdAllocationIoSend()
798 AHardwareBuffer* ahwb = ANativeWindowBuffer_getHardwareBuffer(drv->wndBuffer); in rsdAllocationIoSend()
806 r = ANativeWindow_queueBuffer(nw, drv->wndBuffer, fenceID); in rsdAllocationIoSend()
811 drv->wndBuffer = nullptr; in rsdAllocationIoSend()
831 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationData1D() local
845 drv->uploadDeferred = true; in rsdAllocationData1D()
851 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationData2D() local
865 drv->uploadDeferred = true; in rsdAllocationData2D()
904 drv->uploadDeferred = true; in rsdAllocationData2D()
915 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationData3D() local
931 drv->uploadDeferred = true; in rsdAllocationData3D()
945 drv->uploadDeferred = true; in rsdAllocationData3D()
1115 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationElementData() local
1128 drv->uploadDeferred = true; in rsdAllocationElementData()
1134 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rsdAllocationElementRead() local