Lines Matching defs:drv

107     DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
109 rsAssert(drv->textureID);
110 RSD_CALL_GL(glBindTexture, drv->glTarget, drv->textureID);
116 RSD_CALL_GL(glTexSubImage2D, t, lod, xoff, yoff, w, h, drv->glFormat, drv->glType, ptr);
123 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
125 RSD_CALL_GL(glBindTexture, drv->glTarget, drv->textureID);
144 RSD_CALL_GL(glTexImage2D, t, lod, drv->glFormat,
147 0, drv->glFormat, drv->glType, p);
152 drv->glFormat, drv->glType, p);
158 RSD_CALL_GL(glGenerateMipmap, drv->glTarget);
166 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
169 if (!drv->textureID) {
170 RSD_CALL_GL(glGenTextures, 1, &drv->textureID);
175 if (!drv->glType || !drv->glFormat) {
185 if (!drv->textureID) {
186 RSD_CALL_GL(glGenTextures, 1, &drv->textureID);
204 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
206 if (!drv->glFormat) {
210 if (!drv->renderTargetID) {
211 RSD_CALL_GL(glGenRenderbuffers, 1, &drv->renderTargetID);
213 if (!drv->renderTargetID) {
219 RSD_CALL_GL(glBindRenderbuffer, GL_RENDERBUFFER, drv->renderTargetID);
220 RSD_CALL_GL(glRenderbufferStorage, GL_RENDERBUFFER, drv->glFormat,
229 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
236 if (!drv->bufferID) {
237 RSD_CALL_GL(glGenBuffers, 1, &drv->bufferID);
239 if (!drv->bufferID) {
241 drv->uploadDeferred = true;
244 RSD_CALL_GL(glBindBuffer, drv->glTarget, drv->bufferID);
245 RSD_CALL_GL(glBufferData, drv->glTarget,
248 RSD_CALL_GL(glBindBuffer, drv->glTarget, 0);
379 DrvAllocation *drv = (DrvAllocation *)calloc(1, sizeof(DrvAllocation));
380 if (!drv) {
383 alloc->mHal.drv = drv;
410 drv->useUserProvidedPtr = true;
430 drv->useUserProvidedPtr = false;
434 alloc->mHal.drv = nullptr;
435 free(drv);
440 drv->useUserProvidedPtr = true;
446 alloc->mHal.drv = nullptr;
447 free(drv);
458 drv->glTarget = GL_NONE;
461 drv->glTarget = GL_TEXTURE_CUBE_MAP;
463 drv->glTarget = GL_TEXTURE_2D;
467 drv->glTarget = GL_ARRAY_BUFFER;
473 drv->glType = rsdTypeToGLType(alloc->mHal.state.type->getElement()->getComponent().getType());
474 drv->glFormat = rsdKindToGLFormat(alloc->mHal.state.type->getElement()->getComponent().getKind());
476 drv->glType = 0;
477 drv->glFormat = 0;
481 drv->uploadDeferred = true;
485 drv->readBackFBO = nullptr;
488 if ((alloc->mHal.state.userProvidedPtr != 0) && (drv->useUserProvidedPtr == false)) {
495 ALOGE("pointer for allocation.drv: %p", &alloc->mHal.drv);
530 DrvAllocation *drv = (DrvAllocation *)calloc(1, sizeof(DrvAllocation));
531 if (!drv) {
534 alloc->mHal.drv = drv;
543 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
547 if (drv->bufferID) {
553 if (drv->textureID) {
554 RSD_CALL_GL(glDeleteTextures, 1, &drv->textureID);
555 drv->textureID = 0;
557 if (drv->renderTargetID) {
558 RSD_CALL_GL(glDeleteRenderbuffers, 1, &drv->renderTargetID);
559 drv->renderTargetID = 0;
565 if (!(drv->useUserProvidedPtr) &&
574 if (drv->readBackFBO != nullptr) {
575 delete drv->readBackFBO;
576 drv->readBackFBO = nullptr;
582 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
583 ANativeWindow *nw = drv->wndSurface;
586 mapper.unlock(drv->wndBuffer->handle);
587 int32_t r = nw->cancelBuffer(nw, drv->wndBuffer, -1);
589 drv->wndSurface = nullptr;
597 free(drv);
598 alloc->mHal.drv = nullptr;
635 RsdHal *dc = (RsdHal *)rsc->mHal.drv;
638 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
639 if (!drv->textureID && !drv->renderTargetID) {
642 if (drv->readBackFBO == nullptr) {
643 drv->readBackFBO = new RsdFrameBufferObj();
644 drv->readBackFBO->setColorTarget(drv, 0);
645 drv->readBackFBO->setDimensions(alloc->getType()->getDimX(),
650 drv->readBackFBO->setActive(rsc);
655 drv->glFormat, drv->glType, alloc->mHal.drvState.lod[0].mallocPtr);
665 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
705 drv->uploadDeferred = false;
709 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
710 drv->uploadDeferred = true;
715 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
717 int32_t r = native_window_dequeue_buffer_and_wait(nw, &drv->wndBuffer);
725 Rect bounds(drv->wndBuffer->width, drv->wndBuffer->height);
728 mapper.lock(drv->wndBuffer->handle,
732 alloc->mHal.drvState.lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes;
741 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
742 ANativeWindow *old = drv->wndSurface;
750 drv->wnd = nw;
755 if (drv->wndSurface) {
756 ANativeWindow *old = drv->wndSurface;
758 mapper.unlock(drv->wndBuffer->handle);
759 old->cancelBuffer(old, drv->wndBuffer, -1);
760 drv->wndSurface = nullptr;
814 drv->wndSurface = nw;
831 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
832 ANativeWindow *nw = drv->wndSurface;
834 RsdHal *dc = (RsdHal *)rsc->mHal.drv;
841 mapper.unlock(drv->wndBuffer->handle);
842 int32_t r = nw->queueBuffer(nw, drv->wndBuffer, -1);
859 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
861 drv->surfaceTexture->updateTexImage();
873 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
887 drv->uploadDeferred = true;
893 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
907 drv->uploadDeferred = true;
946 drv->uploadDeferred = true;
957 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
973 drv->uploadDeferred = true;
987 drv->uploadDeferred = true;
1157 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
1170 drv->uploadDeferred = true;
1176 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
1276 obj->v1 = alloc->mHal.drv;