egl: drop unused _EGLDriver from {Create,Destroy}Context()
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
This commit is contained in:

committed by
Marge Bot

parent
435ad51416
commit
f27a32a792
@@ -1466,7 +1466,7 @@ dri2_fill_context_attribs(struct dri2_egl_context *dri2_ctx,
|
||||
* Called via eglCreateContext(), drv->CreateContext().
|
||||
*/
|
||||
static _EGLContext *
|
||||
dri2_create_context(const _EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
dri2_create_context(_EGLDisplay *disp, _EGLConfig *conf,
|
||||
_EGLContext *share_list, const EGLint *attrib_list)
|
||||
{
|
||||
struct dri2_egl_context *dri2_ctx;
|
||||
@@ -1481,8 +1481,6 @@ dri2_create_context(const _EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
unsigned num_attribs = NUM_ATTRIBS;
|
||||
uint32_t ctx_attribs[NUM_ATTRIBS];
|
||||
|
||||
(void) drv;
|
||||
|
||||
dri2_ctx = malloc(sizeof *dri2_ctx);
|
||||
if (!dri2_ctx) {
|
||||
_eglError(EGL_BAD_ALLOC, "eglCreateContext");
|
||||
@@ -1641,7 +1639,7 @@ dri2_create_context(const _EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
* Called via eglDestroyContext(), drv->DestroyContext().
|
||||
*/
|
||||
static EGLBoolean
|
||||
dri2_destroy_context(const _EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
|
||||
dri2_destroy_context(_EGLDisplay *disp, _EGLContext *ctx)
|
||||
{
|
||||
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
@@ -1866,7 +1864,7 @@ dri2_make_current(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
|
||||
dri2_destroy_surface(drv, disp, old_rsurf);
|
||||
|
||||
if (old_ctx) {
|
||||
dri2_destroy_context(drv, disp, old_ctx);
|
||||
dri2_destroy_context(disp, old_ctx);
|
||||
dri2_display_release(old_disp);
|
||||
}
|
||||
|
||||
|
@@ -237,7 +237,7 @@ haiku_terminate(_EGLDisplay *disp)
|
||||
|
||||
extern "C"
|
||||
_EGLContext*
|
||||
haiku_create_context(const _EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
haiku_create_context(_EGLDisplay *disp, _EGLConfig *conf,
|
||||
_EGLContext *share_list, const EGLint *attrib_list)
|
||||
{
|
||||
CALLED();
|
||||
@@ -263,7 +263,7 @@ cleanup:
|
||||
|
||||
extern "C"
|
||||
EGLBoolean
|
||||
haiku_destroy_context(const _EGLDriver* drv, _EGLDisplay *disp, _EGLContext* ctx)
|
||||
haiku_destroy_context(_EGLDisplay *disp, _EGLContext* ctx)
|
||||
{
|
||||
struct haiku_egl_context* context = haiku_egl_context(ctx);
|
||||
|
||||
|
@@ -802,7 +802,7 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list,
|
||||
if (!share && share_list != EGL_NO_CONTEXT)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_CONTEXT);
|
||||
|
||||
context = drv->CreateContext(drv, disp, conf, share, attrib_list);
|
||||
context = drv->CreateContext(disp, conf, share, attrib_list);
|
||||
ret = (context) ? _eglLinkContext(context) : EGL_NO_CONTEXT;
|
||||
|
||||
RETURN_EGL_EVAL(disp, ret);
|
||||
@@ -821,7 +821,7 @@ eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
|
||||
|
||||
_EGL_CHECK_CONTEXT(disp, context, EGL_FALSE, drv);
|
||||
_eglUnlinkContext(context);
|
||||
ret = drv->DestroyContext(drv, disp, context);
|
||||
ret = drv->DestroyContext(disp, context);
|
||||
|
||||
RETURN_EGL_EVAL(disp, ret);
|
||||
}
|
||||
|
@@ -304,7 +304,7 @@ _eglReleaseDisplayResources(_EGLDisplay *display)
|
||||
list = list->Next;
|
||||
|
||||
_eglUnlinkContext(ctx);
|
||||
drv->DestroyContext(drv, display, ctx);
|
||||
drv->DestroyContext(display, ctx);
|
||||
}
|
||||
assert(!display->ResourceLists[_EGL_RESOURCE_CONTEXT]);
|
||||
|
||||
|
@@ -91,11 +91,9 @@ struct _egl_driver
|
||||
char *(*QueryDriverConfig)(_EGLDisplay *disp);
|
||||
|
||||
/* context funcs */
|
||||
_EGLContext *(*CreateContext)(const _EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *config, _EGLContext *share_list,
|
||||
const EGLint *attrib_list);
|
||||
EGLBoolean (*DestroyContext)(const _EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLContext *ctx);
|
||||
_EGLContext *(*CreateContext)(_EGLDisplay *disp, _EGLConfig *config,
|
||||
_EGLContext *share_list, const EGLint *attrib_list);
|
||||
EGLBoolean (*DestroyContext)(_EGLDisplay *disp, _EGLContext *ctx);
|
||||
/* this is the only function (other than Initialize) that may be called
|
||||
* with an uninitialized display
|
||||
*/
|
||||
|
Reference in New Issue
Block a user