if (!share && share_list != EGL_NO_CONTEXT)
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_CONTEXT);
- context = drv->CreateContext(disp, conf, share, attrib_list);
+ context = disp->Driver->CreateContext(disp, conf, share, attrib_list);
ret = (context) ? _eglLinkContext(context) : EGL_NO_CONTEXT;
RETURN_EGL_EVAL(disp, ret);
_EGL_CHECK_CONTEXT(disp, context, EGL_FALSE, drv);
_eglUnlinkContext(context);
- ret = drv->DestroyContext(disp, context);
+ ret = disp->Driver->DestroyContext(disp, context);
RETURN_EGL_EVAL(disp, ret);
}
_EGLContext *context = _eglLookupContext(ctx, disp);
_EGLSurface *draw_surf = _eglLookupSurface(draw, disp);
_EGLSurface *read_surf = _eglLookupSurface(read, disp);
- const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_CONTEXT_KHR, context, EGL_FALSE);
if (!disp)
RETURN_EGL_ERROR(disp, EGL_BAD_DISPLAY, EGL_FALSE);
- drv = disp->Driver;
/* display is allowed to be uninitialized under certain condition */
if (!disp->Initialized) {
ctx != EGL_NO_CONTEXT)
RETURN_EGL_ERROR(disp, EGL_BAD_DISPLAY, EGL_FALSE);
}
- if (!drv)
+ if (!disp->Driver)
RETURN_EGL_SUCCESS(disp, EGL_TRUE);
if (!context && ctx != EGL_NO_CONTEXT)
if (read_surf && read_surf->Lost)
RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_FALSE);
- ret = drv->MakeCurrent(disp, draw_surf, read_surf, context);
+ ret = disp->Driver->MakeCurrent(disp, draw_surf, read_surf, context);
RETURN_EGL_EVAL(disp, ret);
}
if (_eglNativeSurfaceAlreadyUsed(disp, native_window))
RETURN_EGL_ERROR(disp, EGL_BAD_ALLOC, EGL_NO_SURFACE);
- surf = drv->CreateWindowSurface(disp, conf, native_window, attrib_list);
+ surf = disp->Driver->CreateWindowSurface(disp, conf, native_window, attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
RETURN_EGL_EVAL(disp, ret);
if (_eglNativeSurfaceAlreadyUsed(disp, native_pixmap))
RETURN_EGL_ERROR(disp, EGL_BAD_ALLOC, EGL_NO_SURFACE);
- surf = drv->CreatePixmapSurface(disp, conf, native_pixmap, attrib_list);
+ surf = disp->Driver->CreatePixmapSurface(disp, conf, native_pixmap, attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
RETURN_EGL_EVAL(disp, ret);
if ((conf->SurfaceType & EGL_PBUFFER_BIT) == 0)
RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SURFACE);
- surf = drv->CreatePbufferSurface(disp, conf, attrib_list);
+ surf = disp->Driver->CreatePbufferSurface(disp, conf, attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
RETURN_EGL_EVAL(disp, ret);
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
_eglUnlinkSurface(surf);
- ret = drv->DestroySurface(disp, surf);
+ ret = disp->Driver->DestroySurface(disp, surf);
RETURN_EGL_EVAL(disp, ret);
}
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
- if (drv->QuerySurface)
- ret = drv->QuerySurface(disp, surf, attribute, value);
+ if (disp->Driver->QuerySurface)
+ ret = disp->Driver->QuerySurface(disp, surf, attribute, value);
else
ret = _eglQuerySurface(disp, surf, attribute, value);
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
- ret = drv->BindTexImage(disp, surf, buffer);
+ ret = disp->Driver->BindTexImage(disp, surf, buffer);
RETURN_EGL_EVAL(disp, ret);
}
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
- ret = drv->ReleaseTexImage(disp, surf, buffer);
+ ret = disp->Driver->ReleaseTexImage(disp, surf, buffer);
RETURN_EGL_EVAL(disp, ret);
}
surf->Config->MaxSwapInterval);
if (surf->SwapInterval != interval) {
- if (drv->SwapInterval)
- ret = drv->SwapInterval(disp, surf, interval);
+ if (disp->Driver->SwapInterval)
+ ret = disp->Driver->SwapInterval(disp, surf, interval);
else
ret = _eglSwapInterval(disp, surf, interval);
}
if (surf->Lost)
RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_FALSE);
- ret = drv->SwapBuffers(disp, surf);
+ ret = disp->Driver->SwapBuffers(disp, surf);
/* EGL_KHR_partial_update
* Frame boundary successfully reached,
if ((n_rects > 0 && rects == NULL) || n_rects < 0)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->SwapBuffersWithDamageEXT(disp, surf, rects, n_rects);
+ ret = disp->Driver->SwapBuffersWithDamageEXT(disp, surf, rects, n_rects);
/* EGL_KHR_partial_update
* Frame boundary successfully reached,
RETURN_EGL_ERROR(disp, EGL_BAD_ACCESS, EGL_FALSE);
_eglSetDamageRegionKHRClampRects(surf, rects, n_rects);
- ret = drv->SetDamageRegion(disp, surf, rects, n_rects);
+ ret = disp->Driver->SetDamageRegion(disp, surf, rects, n_rects);
if (ret)
surf->SetDamageRegionCalled = EGL_TRUE;
native_pixmap_ptr = (void*) target;
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
- ret = drv->CopyBuffers(disp, surf, native_pixmap_ptr);
+ ret = disp->Driver->CopyBuffers(disp, surf, native_pixmap_ptr);
RETURN_EGL_EVAL(disp, ret);
}
if (ctx != EGL_NO_CONTEXT && target == EGL_LINUX_DMA_BUF_EXT)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
- img = drv->CreateImageKHR(disp, context, target, buffer, attr_list);
+ img = disp->Driver->CreateImageKHR(disp, context, target, buffer, attr_list);
ret = (img) ? _eglLinkImage(img) : EGL_NO_IMAGE_KHR;
RETURN_EGL_EVAL(disp, ret);
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
_eglUnlinkImage(img);
- ret = drv->DestroyImageKHR(disp, img);
+ ret = disp->Driver->DestroyImageKHR(disp, img);
RETURN_EGL_EVAL(disp, ret);
}
RETURN_EGL_ERROR(disp, invalid_type_error, EGL_NO_SYNC_KHR);
}
- sync = drv->CreateSyncKHR(disp, type, attrib_list);
+ sync = disp->Driver->CreateSyncKHR(disp, type, attrib_list);
ret = (sync) ? _eglLinkSync(sync) : EGL_NO_SYNC_KHR;
RETURN_EGL_EVAL(disp, ret);
disp->Extensions.ANDROID_native_fence_sync);
_eglUnlinkSync(s);
- ret = drv->DestroySyncKHR(disp, s);
+ ret = disp->Driver->DestroySyncKHR(disp, s);
RETURN_EGL_EVAL(disp, ret);
}
if (s->Type == EGL_SYNC_REUSABLE_KHR)
_eglUnlockDisplay(dpy);
- ret = drv->ClientWaitSyncKHR(disp, s, flags, timeout);
+ ret = disp->Driver->ClientWaitSyncKHR(disp, s, flags, timeout);
/*
* 'disp' is already unlocked for reusable sync type,
if (flags != 0)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->WaitSyncKHR(disp, s);
+ ret = disp->Driver->WaitSyncKHR(disp, s);
RETURN_EGL_EVAL(disp, ret);
}
_EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
assert(disp->Extensions.KHR_reusable_sync);
- ret = drv->SignalSyncKHR(disp, s, mode);
+ ret = disp->Driver->SignalSyncKHR(disp, s, mode);
RETURN_EGL_EVAL(disp, ret);
}
_EGL_CHECK_SYNC(disp, s, EGL_NO_NATIVE_FENCE_FD_ANDROID, drv);
assert(disp->Extensions.ANDROID_native_fence_sync);
- ret = drv->DupNativeFenceFDANDROID(disp, s);
+ ret = disp->Driver->DupNativeFenceFDANDROID(disp, s);
RETURN_EGL_EVAL(disp, ret);
}
surf != ctx->DrawSurface)
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
- ret = drv->SwapBuffersRegionNOK(disp, surf, numRects, rects);
+ ret = disp->Driver->SwapBuffersRegionNOK(disp, surf, numRects, rects);
RETURN_EGL_EVAL(disp, ret);
}
if (!disp->Extensions.MESA_drm_image)
RETURN_EGL_EVAL(disp, EGL_NO_IMAGE_KHR);
- img = drv->CreateDRMImageMESA(disp, attr_list);
+ img = disp->Driver->CreateDRMImageMESA(disp, attr_list);
ret = (img) ? _eglLinkImage(img) : EGL_NO_IMAGE_KHR;
RETURN_EGL_EVAL(disp, ret);
if (!img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->ExportDRMImageMESA(disp, img, name, handle, stride);
+ ret = disp->Driver->ExportDRMImageMESA(disp, img, name, handle, stride);
RETURN_EGL_EVAL(disp, ret);
}
if (!display)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->BindWaylandDisplayWL(disp, display);
+ ret = disp->Driver->BindWaylandDisplayWL(disp, display);
RETURN_EGL_EVAL(disp, ret);
}
if (!display)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->UnbindWaylandDisplayWL(disp, display);
+ ret = disp->Driver->UnbindWaylandDisplayWL(disp, display);
RETURN_EGL_EVAL(disp, ret);
}
if (!buffer)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->QueryWaylandBufferWL(disp, buffer, attribute, value);
+ ret = disp->Driver->QueryWaylandBufferWL(disp, buffer, attribute, value);
RETURN_EGL_EVAL(disp, ret);
}
if (!img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, NULL);
- ret = drv->CreateWaylandBufferFromImageWL(disp, img);
+ ret = disp->Driver->CreateWaylandBufferFromImageWL(disp, img);
RETURN_EGL_EVAL(disp, ret);
}
if (!disp->Extensions.NV_post_sub_buffer)
RETURN_EGL_EVAL(disp, EGL_FALSE);
- ret = drv->PostSubBufferNV(disp, surf, x, y, width, height);
+ ret = disp->Driver->PostSubBufferNV(disp, surf, x, y, width, height);
RETURN_EGL_EVAL(disp, ret);
}
if (!ust || !msc || !sbc)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->GetSyncValuesCHROMIUM(disp, surf, ust, msc, sbc);
+ ret = disp->Driver->GetSyncValuesCHROMIUM(disp, surf, ust, msc, sbc);
RETURN_EGL_EVAL(disp, ret);
}
if (!img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->ExportDMABUFImageQueryMESA(disp, img, fourcc, nplanes, modifiers);
+ ret = disp->Driver->ExportDMABUFImageQueryMESA(disp, img, fourcc, nplanes, modifiers);
RETURN_EGL_EVAL(disp, ret);
}
if (!img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->ExportDMABUFImageMESA(disp, img, fds, strides, offsets);
+ ret = disp->Driver->ExportDMABUFImageMESA(disp, img, fds, strides, offsets);
RETURN_EGL_EVAL(disp, ret);
}
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
- ret = drv->QueryDmaBufFormatsEXT(disp, max_formats, formats, num_formats);
+ ret = disp->Driver->QueryDmaBufFormatsEXT(disp, max_formats, formats, num_formats);
RETURN_EGL_EVAL(disp, ret);
}
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
- ret = drv->QueryDmaBufModifiersEXT(disp, format, max_modifiers, modifiers,
+ ret = disp->Driver->QueryDmaBufModifiersEXT(disp, format, max_modifiers, modifiers,
external_only, num_modifiers);
RETURN_EGL_EVAL(disp, ret);
disp->BlobCacheSet = set;
disp->BlobCacheGet = get;
- drv->SetBlobCacheFuncsANDROID(disp, set, get);
+ disp->Driver->SetBlobCacheFuncsANDROID(disp, set, get);
_eglUnlockDisplay(disp);
}
assert(disp->Extensions.MESA_query_driver);
- ret = drv->QueryDriverConfig(disp);
+ ret = disp->Driver->QueryDriverConfig(disp);
RETURN_EGL_EVAL(disp, ret);
}
assert(disp->Extensions.MESA_query_driver);
- ret = drv->QueryDriverName(disp);
+ ret = disp->Driver->QueryDriverName(disp);
RETURN_EGL_EVAL(disp, ret);
}
if (ret != MESA_GLINTEROP_SUCCESS)
return ret;
- if (drv->GLInteropQueryDeviceInfo)
- ret = drv->GLInteropQueryDeviceInfo(disp, ctx, out);
+ if (disp->Driver->GLInteropQueryDeviceInfo)
+ ret = disp->Driver->GLInteropQueryDeviceInfo(disp, ctx, out);
else
ret = MESA_GLINTEROP_UNSUPPORTED;
if (ret != MESA_GLINTEROP_SUCCESS)
return ret;
- if (drv->GLInteropExportObject)
- ret = drv->GLInteropExportObject(disp, ctx, in, out);
+ if (disp->Driver->GLInteropExportObject)
+ ret = disp->Driver->GLInteropExportObject(disp, ctx, in, out);
else
ret = MESA_GLINTEROP_UNSUPPORTED;