Lines Matching defs:drv

108     DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
110 rsAssert(drv->textureID);
111 RSD_CALL_GL(glBindTexture, drv->glTarget, drv->textureID);
117 RSD_CALL_GL(glTexSubImage2D, t, lod, xoff, yoff, w, h, drv->glFormat, drv->glType, ptr);
124 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
126 RSD_CALL_GL(glBindTexture, drv->glTarget, drv->textureID);
145 RSD_CALL_GL(glTexImage2D, t, lod, drv->glFormat,
148 0, drv->glFormat, drv->glType, p);
153 drv->glFormat, drv->glType, p);
159 RSD_CALL_GL(glGenerateMipmap, drv->glTarget);
167 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
170 if (!drv->textureID) {
171 RSD_CALL_GL(glGenTextures, 1, &drv->textureID);
176 if (!drv->glType || !drv->glFormat) {
186 if (!drv->textureID) {
187 RSD_CALL_GL(glGenTextures, 1, &drv->textureID);
205 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
207 if (!drv->glFormat) {
211 if (!drv->renderTargetID) {
212 RSD_CALL_GL(glGenRenderbuffers, 1, &drv->renderTargetID);
214 if (!drv->renderTargetID) {
220 RSD_CALL_GL(glBindRenderbuffer, GL_RENDERBUFFER, drv->renderTargetID);
221 RSD_CALL_GL(glRenderbufferStorage, GL_RENDERBUFFER, drv->glFormat,
230 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
237 if (!drv->bufferID) {
238 RSD_CALL_GL(glGenBuffers, 1, &drv->bufferID);
240 if (!drv->bufferID) {
242 drv->uploadDeferred = true;
245 RSD_CALL_GL(glBindBuffer, drv->glTarget, drv->bufferID);
246 RSD_CALL_GL(glBufferData, drv->glTarget,
249 RSD_CALL_GL(glBindBuffer, drv->glTarget, 0);
372 DrvAllocation *drv = (DrvAllocation *)calloc(1, sizeof(DrvAllocation));
373 if (!drv) {
376 alloc->mHal.drv = drv;
404 drv->useUserProvidedPtr = false;
408 alloc->mHal.drv = NULL;
409 free(drv);
414 drv->useUserProvidedPtr = true;
420 alloc->mHal.drv = NULL;
421 free(drv);
432 drv->glTarget = GL_NONE;
435 drv->glTarget = GL_TEXTURE_CUBE_MAP;
437 drv->glTarget = GL_TEXTURE_2D;
441 drv->glTarget = GL_ARRAY_BUFFER;
447 drv->glType = rsdTypeToGLType(alloc->mHal.state.type->getElement()->getComponent().getType());
448 drv->glFormat = rsdKindToGLFormat(alloc->mHal.state.type->getElement()->getComponent().getKind());
450 drv->glType = 0;
451 drv->glFormat = 0;
455 drv->uploadDeferred = true;
459 drv->readBackFBO = NULL;
462 if ((alloc->mHal.state.userProvidedPtr != 0) && (drv->useUserProvidedPtr == false)) {
469 ALOGE("pointer for allocation.drv: %p", &alloc->mHal.drv);
477 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
480 if (drv->bufferID) {
486 if (drv->textureID) {
487 RSD_CALL_GL(glDeleteTextures, 1, &drv->textureID);
488 drv->textureID = 0;
490 if (drv->renderTargetID) {
491 RSD_CALL_GL(glDeleteRenderbuffers, 1, &drv->renderTargetID);
492 drv->renderTargetID = 0;
498 if (!(drv->useUserProvidedPtr) &&
507 if (drv->readBackFBO != NULL) {
508 delete drv->readBackFBO;
509 drv->readBackFBO = NULL;
515 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
516 ANativeWindow *nw = drv->wndSurface;
519 mapper.unlock(drv->wndBuffer->handle);
520 int32_t r = nw->queueBuffer(nw, drv->wndBuffer, -1);
522 drv->wndSurface = NULL;
529 free(drv);
530 alloc->mHal.drv = NULL;
567 RsdHal *dc = (RsdHal *)rsc->mHal.drv;
570 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
571 if (!drv->textureID && !drv->renderTargetID) {
574 if (drv->readBackFBO == NULL) {
575 drv->readBackFBO = new RsdFrameBufferObj();
576 drv->readBackFBO->setColorTarget(drv, 0);
577 drv->readBackFBO->setDimensions(alloc->getType()->getDimX(),
582 drv->readBackFBO->setActive(rsc);
587 drv->glFormat, drv->glType, alloc->mHal.drvState.lod[0].mallocPtr);
597 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
637 drv->uploadDeferred = false;
641 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
642 drv->uploadDeferred = true;
647 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
649 int32_t r = native_window_dequeue_buffer_and_wait(nw, &drv->wndBuffer);
657 Rect bounds(drv->wndBuffer->width, drv->wndBuffer->height);
660 mapper.lock(drv->wndBuffer->handle,
664 alloc->mHal.drvState.lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes;
673 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
674 ANativeWindow *old = drv->wndSurface;
682 drv->wnd = nw;
687 if (drv->wndSurface) {
688 ANativeWindow *old = drv->wndSurface;
690 mapper.unlock(drv->wndBuffer->handle);
691 old->cancelBuffer(old, drv->wndBuffer, -1);
692 drv->wndSurface = NULL;
742 drv->wndSurface = nw;
759 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
760 ANativeWindow *nw = drv->wndSurface;
762 RsdHal *dc = (RsdHal *)rsc->mHal.drv;
769 mapper.unlock(drv->wndBuffer->handle);
770 int32_t r = nw->queueBuffer(nw, drv->wndBuffer, -1);
787 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
789 drv->surfaceTexture->updateTexImage();
798 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
812 drv->uploadDeferred = true;
818 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
832 drv->uploadDeferred = true;
869 drv->uploadDeferred = true;
880 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
896 drv->uploadDeferred = true;
910 drv->uploadDeferred = true;
1080 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
1094 drv->uploadDeferred = true;
1100 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
1114 drv->uploadDeferred = true;
1207 obj->v1 = alloc->mHal.drv;