Home | History | Annotate | Download | only in driver

Lines Matching refs: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)) {
470 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
473 if (drv->bufferID) {
479 if (drv->textureID) {
480 RSD_CALL_GL(glDeleteTextures, 1, &drv->textureID);
481 drv->textureID = 0;
483 if (drv->renderTargetID) {
484 RSD_CALL_GL(glDeleteRenderbuffers, 1, &drv->renderTargetID);
485 drv->renderTargetID = 0;
491 if (!(drv->useUserProvidedPtr) &&
500 if (drv->readBackFBO != NULL) {
501 delete drv->readBackFBO;
502 drv->readBackFBO = NULL;
508 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
509 ANativeWindow *nw = drv->wndSurface;
512 mapper.unlock(drv->wndBuffer->handle);
513 int32_t r = nw->queueBuffer(nw, drv->wndBuffer, -1);
518 free(drv);
519 alloc->mHal.drv = NULL;
556 RsdHal *dc = (RsdHal *)rsc->mHal.drv;
559 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
560 if (!drv->textureID && !drv->renderTargetID) {
563 if (drv->readBackFBO == NULL) {
564 drv->readBackFBO = new RsdFrameBufferObj();
565 drv->readBackFBO->setColorTarget(drv, 0);
566 drv->readBackFBO->setDimensions(alloc->getType()->getDimX(),
571 drv->readBackFBO->setActive(rsc);
576 drv->glFormat, drv->glType, alloc->mHal.drvState.lod[0].mallocPtr);
586 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
620 drv->uploadDeferred = false;
624 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
625 drv->uploadDeferred = true;
630 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
632 int32_t r = native_window_dequeue_buffer_and_wait(nw, &drv->wndBuffer);
640 Rect bounds(drv->wndBuffer->width, drv->wndBuffer->height);
643 mapper.lock(drv->wndBuffer->handle,
647 alloc->mHal.drvState.lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes;
656 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
657 ANativeWindow *old = drv->wndSurface;
665 drv->wnd = nw;
670 if (drv->wndSurface) {
671 ANativeWindow *old = drv->wndSurface;
673 mapper.unlock(drv->wndBuffer->handle);
674 old->cancelBuffer(old, drv->wndBuffer, -1);
675 drv->wndSurface = NULL;
725 drv->wndSurface = nw;
742 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
743 ANativeWindow *nw = drv->wndSurface;
745 RsdHal *dc = (RsdHal *)rsc->mHal.drv;
752 mapper.unlock(drv->wndBuffer->handle);
753 int32_t r = nw->queueBuffer(nw, drv->wndBuffer, -1);
770 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
772 drv->surfaceTexture->updateTexImage();
781 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
795 drv->uploadDeferred = true;
801 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
815 drv->uploadDeferred = true;
852 drv->uploadDeferred = true;
863 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
879 drv->uploadDeferred = true;
893 drv->uploadDeferred = true;
1063 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
1077 drv->uploadDeferred = true;
1083 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
1097 drv->uploadDeferred = true;