From: Adam Jackson Date: Tue, 14 Nov 2017 20:13:01 +0000 (-0500) Subject: glx: Simplify some dummy vtable interactions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bcb15bee52aff0faae37d4b933f462735ccb918b;p=mesa.git glx: Simplify some dummy vtable interactions The dummy vtable has these slots as NULL already, no need to check for the dummy context explicitly. Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov --- diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index c707d0cedf3..bc93d625106 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -528,7 +528,7 @@ glXWaitGL(void) { struct glx_context *gc = __glXGetCurrentContext(); - if (gc != &dummyContext && gc->vtable->wait_gl) + if (gc->vtable->wait_gl) gc->vtable->wait_gl(gc); } @@ -541,7 +541,7 @@ glXWaitX(void) { struct glx_context *gc = __glXGetCurrentContext(); - if (gc != &dummyContext && gc->vtable->wait_x) + if (gc->vtable->wait_x) gc->vtable->wait_x(gc); } @@ -550,7 +550,7 @@ glXUseXFont(Font font, int first, int count, int listBase) { struct glx_context *gc = __glXGetCurrentContext(); - if (gc != &dummyContext && gc->vtable->use_x_font) + if (gc->vtable->use_x_font) gc->vtable->use_x_font(gc, font, first, count, listBase); } @@ -2431,7 +2431,7 @@ __glXBindTexImageEXT(Display * dpy, { struct glx_context *gc = __glXGetCurrentContext(); - if (gc == &dummyContext || gc->vtable->bind_tex_image == NULL) + if (gc->vtable->bind_tex_image == NULL) return; gc->vtable->bind_tex_image(dpy, drawable, buffer, attrib_list); @@ -2442,7 +2442,7 @@ __glXReleaseTexImageEXT(Display * dpy, GLXDrawable drawable, int buffer) { struct glx_context *gc = __glXGetCurrentContext(); - if (gc == &dummyContext || gc->vtable->release_tex_image == NULL) + if (gc->vtable->release_tex_image == NULL) return; gc->vtable->release_tex_image(dpy, drawable, buffer);