summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Engestrom <eric.engestrom@intel.com>2018-11-22 19:47:28 +0000
committerEric Engestrom <eric.engestrom@intel.com>2019-08-04 11:26:20 +0100
commite7e3fd5c03fcae2c72d142bfc5ea67b7b78d49bc (patch)
tree16b0f88f87e2f119efa2dee8b1229ee155669a46
parent9668d7f5393dcc95f3d447a7dfb1c28265a2c9fd (diff)
glx: drop unnecessary pointer deref for function calls
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--src/glx/dri3_glx.c8
-rw-r--r--src/glx/dri_common.c4
-rw-r--r--src/glx/g_glxglvnddispatchfuncs.c78
-rw-r--r--src/glx/glxcmds.c2
4 files changed, 46 insertions, 46 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 796fc26d9dd..a5cf0e3bf32 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -211,9 +211,9 @@ dri3_bind_context(struct glx_context *context, struct glx_context *old,
return GLXBadContext;
if (dri_draw)
- (*psc->f->invalidate)(dri_draw);
+ psc->f->invalidate(dri_draw);
if (dri_read && dri_read != dri_draw)
- (*psc->f->invalidate)(dri_read);
+ psc->f->invalidate(dri_read);
return Success;
}
@@ -502,7 +502,7 @@ dri3_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate)
loader_dri3_flush(draw, __DRI2_FLUSH_DRAWABLE, __DRI2_THROTTLE_FLUSHFRONT);
- (*psc->f->invalidate)(driDrawable);
+ psc->f->invalidate(driDrawable);
loader_dri3_wait_gl(draw);
}
@@ -682,7 +682,7 @@ dri3_bind_tex_image(Display * dpy,
if (pdraw != NULL) {
psc = (struct dri3_screen *) base->psc;
- (*psc->f->invalidate)(pdraw->loader_drawable.dri_drawable);
+ psc->f->invalidate(pdraw->loader_drawable.dri_drawable);
XSync(dpy, false);
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index 2db29fd6abb..d7279d7d1fb 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -397,7 +397,7 @@ driReleaseDrawables(struct glx_context *gc)
if (pdraw->drawable == pdraw->xDrawable) {
pdraw->refcount --;
if (pdraw->refcount == 0) {
- (*pdraw->destroyDrawable)(pdraw);
+ pdraw->destroyDrawable(pdraw);
__glxHashDelete(priv->drawHash, gc->currentDrawable);
}
}
@@ -408,7 +408,7 @@ driReleaseDrawables(struct glx_context *gc)
if (pdraw->drawable == pdraw->xDrawable) {
pdraw->refcount --;
if (pdraw->refcount == 0) {
- (*pdraw->destroyDrawable)(pdraw);
+ pdraw->destroyDrawable(pdraw);
__glxHashDelete(priv->drawHash, gc->currentReadable);
}
}
diff --git a/src/glx/g_glxglvnddispatchfuncs.c b/src/glx/g_glxglvnddispatchfuncs.c
index e6f4e6e1f50..0f02ed2d321 100644
--- a/src/glx/g_glxglvnddispatchfuncs.c
+++ b/src/glx/g_glxglvnddispatchfuncs.c
@@ -118,7 +118,7 @@ static void dispatch_BindTexImageEXT(Display *dpy, GLXDrawable drawable,
if (pBindTexImageEXT == NULL)
return;
- (*pBindTexImageEXT)(dpy, drawable, buffer, attrib_list);
+ pBindTexImageEXT(dpy, drawable, buffer, attrib_list);
}
@@ -139,7 +139,7 @@ static GLXFBConfigSGIX *dispatch_ChooseFBConfigSGIX(Display *dpy, int screen,
if (pChooseFBConfigSGIX == NULL)
return NULL;
- ret = (*pChooseFBConfigSGIX)(dpy, screen, attrib_list, nelements);
+ ret = pChooseFBConfigSGIX(dpy, screen, attrib_list, nelements);
if (AddFBConfigsMapping(dpy, ret, nelements, dd)) {
free(ret);
return NULL;
@@ -168,7 +168,7 @@ static GLXContext dispatch_CreateContextAttribsARB(Display *dpy,
if (pCreateContextAttribsARB == NULL)
return None;
- ret = (*pCreateContextAttribsARB)(dpy, config, share_list, direct, attrib_list);
+ ret = pCreateContextAttribsARB(dpy, config, share_list, direct, attrib_list);
if (AddContextMapping(dpy, ret, dd)) {
/* XXX: Call glXDestroyContext which lives in libglvnd. If we're not
* allowed to call it from here, should we extend __glXDispatchTableIndices ?
@@ -199,7 +199,7 @@ static GLXContext dispatch_CreateContextWithConfigSGIX(Display *dpy,
if (pCreateContextWithConfigSGIX == NULL)
return None;
- ret = (*pCreateContextWithConfigSGIX)(dpy, config, render_type, share_list, direct);
+ ret = pCreateContextWithConfigSGIX(dpy, config, render_type, share_list, direct);
if (AddContextMapping(dpy, ret, dd)) {
/* XXX: Call glXDestroyContext which lives in libglvnd. If we're not
* allowed to call it from here, should we extend __glXDispatchTableIndices ?
@@ -230,13 +230,13 @@ static GLXPbuffer dispatch_CreateGLXPbufferSGIX(Display *dpy,
if (pCreateGLXPbufferSGIX == NULL)
return None;
- ret = (*pCreateGLXPbufferSGIX)(dpy, config, width, height, attrib_list);
+ ret = pCreateGLXPbufferSGIX(dpy, config, width, height, attrib_list);
if (AddDrawableMapping(dpy, ret, dd)) {
PFNGLXDESTROYGLXPBUFFERSGIXPROC pDestroyGLXPbufferSGIX;
__FETCH_FUNCTION_PTR(DestroyGLXPbufferSGIX);
if (pDestroyGLXPbufferSGIX)
- (*pDestroyGLXPbufferSGIX)(dpy, ret);
+ pDestroyGLXPbufferSGIX(dpy, ret);
return None;
}
@@ -262,7 +262,7 @@ static GLXPixmap dispatch_CreateGLXPixmapWithConfigSGIX(Display *dpy,
if (pCreateGLXPixmapWithConfigSGIX == NULL)
return None;
- ret = (*pCreateGLXPixmapWithConfigSGIX)(dpy, config, pixmap);
+ ret = pCreateGLXPixmapWithConfigSGIX(dpy, config, pixmap);
if (AddDrawableMapping(dpy, ret, dd)) {
/* XXX: Call glXDestroyGLXPixmap which lives in libglvnd. If we're not
* allowed to call it from here, should we extend __glXDispatchTableIndices ?
@@ -288,7 +288,7 @@ static void dispatch_DestroyGLXPbufferSGIX(Display *dpy, GLXPbuffer pbuf)
if (pDestroyGLXPbufferSGIX == NULL)
return;
- (*pDestroyGLXPbufferSGIX)(dpy, pbuf);
+ pDestroyGLXPbufferSGIX(dpy, pbuf);
}
@@ -306,7 +306,7 @@ static GLXContextID dispatch_GetContextIDEXT(const GLXContext ctx)
if (pGetContextIDEXT == NULL)
return None;
- return (*pGetContextIDEXT)(ctx);
+ return pGetContextIDEXT(ctx);
}
@@ -327,7 +327,7 @@ static Display *dispatch_GetCurrentDisplayEXT(void)
if (pGetCurrentDisplayEXT == NULL)
return NULL;
- return (*pGetCurrentDisplayEXT)();
+ return pGetCurrentDisplayEXT();
}
@@ -361,7 +361,7 @@ static int dispatch_GetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config,
if (pGetFBConfigAttribSGIX == NULL)
return GLX_NO_EXTENSION;
- return (*pGetFBConfigAttribSGIX)(dpy, config, attribute, value_return);
+ return pGetFBConfigAttribSGIX(dpy, config, attribute, value_return);
}
@@ -381,7 +381,7 @@ static GLXFBConfigSGIX dispatch_GetFBConfigFromVisualSGIX(Display *dpy,
if (pGetFBConfigFromVisualSGIX == NULL)
return NULL;
- ret = (*pGetFBConfigFromVisualSGIX)(dpy, vis);
+ ret = pGetFBConfigFromVisualSGIX(dpy, vis);
if (AddFBConfigMapping(dpy, ret, dd))
/* XXX: dealloc ret ? */
return NULL;
@@ -405,7 +405,7 @@ static void dispatch_GetSelectedEventSGIX(Display *dpy, GLXDrawable drawable,
if (pGetSelectedEventSGIX == NULL)
return;
- (*pGetSelectedEventSGIX)(dpy, drawable, mask);
+ pGetSelectedEventSGIX(dpy, drawable, mask);
}
@@ -426,7 +426,7 @@ static int dispatch_GetVideoSyncSGI(unsigned int *count)
if (pGetVideoSyncSGI == NULL)
return GLX_NO_EXTENSION;
- return (*pGetVideoSyncSGI)(count);
+ return pGetVideoSyncSGI(count);
}
@@ -445,7 +445,7 @@ static XVisualInfo *dispatch_GetVisualFromFBConfigSGIX(Display *dpy,
if (pGetVisualFromFBConfigSGIX == NULL)
return NULL;
- return (*pGetVisualFromFBConfigSGIX)(dpy, config);
+ return pGetVisualFromFBConfigSGIX(dpy, config);
}
@@ -464,7 +464,7 @@ static int dispatch_QueryContextInfoEXT(Display *dpy, GLXContext ctx,
if (pQueryContextInfoEXT == NULL)
return GLX_NO_EXTENSION;
- return (*pQueryContextInfoEXT)(dpy, ctx, attribute, value);
+ return pQueryContextInfoEXT(dpy, ctx, attribute, value);
}
@@ -483,7 +483,7 @@ static void dispatch_QueryGLXPbufferSGIX(Display *dpy, GLXPbuffer pbuf,
if (pQueryGLXPbufferSGIX == NULL)
return;
- (*pQueryGLXPbufferSGIX)(dpy, pbuf, attribute, value);
+ pQueryGLXPbufferSGIX(dpy, pbuf, attribute, value);
}
@@ -502,7 +502,7 @@ static void dispatch_ReleaseTexImageEXT(Display *dpy, GLXDrawable drawable,
if (pReleaseTexImageEXT == NULL)
return;
- (*pReleaseTexImageEXT)(dpy, drawable, buffer);
+ pReleaseTexImageEXT(dpy, drawable, buffer);
}
@@ -521,7 +521,7 @@ static void dispatch_SelectEventSGIX(Display *dpy, GLXDrawable drawable,
if (pSelectEventSGIX == NULL)
return;
- (*pSelectEventSGIX)(dpy, drawable, mask);
+ pSelectEventSGIX(dpy, drawable, mask);
}
@@ -542,7 +542,7 @@ static int dispatch_SwapIntervalSGI(int interval)
if (pSwapIntervalSGI == NULL)
return GLX_NO_EXTENSION;
- return (*pSwapIntervalSGI)(interval);
+ return pSwapIntervalSGI(interval);
}
@@ -564,7 +564,7 @@ static int dispatch_WaitVideoSyncSGI(int divisor, int remainder,
if (pWaitVideoSyncSGI == NULL)
return GLX_NO_EXTENSION;
- return (*pWaitVideoSyncSGI)(divisor, remainder, count);
+ return pWaitVideoSyncSGI(divisor, remainder, count);
}
@@ -583,7 +583,7 @@ static void dispatch_BindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable,
if (pBindSwapBarrierSGIX == NULL)
return;
- (*pBindSwapBarrierSGIX)(dpy, drawable, barrier);
+ pBindSwapBarrierSGIX(dpy, drawable, barrier);
}
@@ -602,7 +602,7 @@ static void dispatch_CopySubBufferMESA(Display *dpy, GLXDrawable drawable,
if (pCopySubBufferMESA == NULL)
return;
- (*pCopySubBufferMESA)(dpy, drawable, x, y, width, height);
+ pCopySubBufferMESA(dpy, drawable, x, y, width, height);
}
@@ -623,7 +623,7 @@ static GLXPixmap dispatch_CreateGLXPixmapMESA(Display *dpy,
if (pCreateGLXPixmapMESA == NULL)
return None;
- ret = (*pCreateGLXPixmapMESA)(dpy, visinfo, pixmap, cmap);
+ ret = pCreateGLXPixmapMESA(dpy, visinfo, pixmap, cmap);
if (AddDrawableMapping(dpy, ret, dd)) {
/* XXX: Call glXDestroyGLXPixmap which lives in libglvnd. If we're not
* allowed to call it from here, should we extend __glXDispatchTableIndices ?
@@ -650,7 +650,7 @@ static GLboolean dispatch_GetMscRateOML(Display *dpy, GLXDrawable drawable,
if (pGetMscRateOML == NULL)
return GL_FALSE;
- return (*pGetMscRateOML)(dpy, drawable, numerator, denominator);
+ return pGetMscRateOML(dpy, drawable, numerator, denominator);
}
@@ -669,7 +669,7 @@ static const char *dispatch_GetScreenDriver(Display *dpy, int scrNum)
if (pGetScreenDriver == NULL)
return NULL;
- return (*pGetScreenDriver)(dpy, scrNum);
+ return pGetScreenDriver(dpy, scrNum);
}
@@ -690,7 +690,7 @@ static int dispatch_GetSwapIntervalMESA(void)
if (pGetSwapIntervalMESA == NULL)
return 0;
- return (*pGetSwapIntervalMESA)();
+ return pGetSwapIntervalMESA();
}
@@ -709,7 +709,7 @@ static Bool dispatch_GetSyncValuesOML(Display *dpy, GLXDrawable drawable,
if (pGetSyncValuesOML == NULL)
return False;
- return (*pGetSyncValuesOML)(dpy, drawable, ust, msc, sbc);
+ return pGetSyncValuesOML(dpy, drawable, ust, msc, sbc);
}
@@ -728,7 +728,7 @@ static void dispatch_JoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable,
if (pJoinSwapGroupSGIX == NULL)
return;
- (*pJoinSwapGroupSGIX)(dpy, drawable, member);
+ pJoinSwapGroupSGIX(dpy, drawable, member);
}
@@ -750,7 +750,7 @@ static Bool dispatch_QueryCurrentRendererIntegerMESA(int attribute,
if (pQueryCurrentRendererIntegerMESA == NULL)
return False;
- return (*pQueryCurrentRendererIntegerMESA)(attribute, value);
+ return pQueryCurrentRendererIntegerMESA(attribute, value);
}
@@ -771,7 +771,7 @@ static const char *dispatch_QueryCurrentRendererStringMESA(int attribute)
if (pQueryCurrentRendererStringMESA == NULL)
return NULL;
- return (*pQueryCurrentRendererStringMESA)(attribute);
+ return pQueryCurrentRendererStringMESA(attribute);
}
@@ -790,7 +790,7 @@ static Bool dispatch_QueryMaxSwapBarriersSGIX(Display *dpy, int screen,
if (pQueryMaxSwapBarriersSGIX == NULL)
return False;
- return (*pQueryMaxSwapBarriersSGIX)(dpy, screen, max);
+ return pQueryMaxSwapBarriersSGIX(dpy, screen, max);
}
@@ -810,7 +810,7 @@ static Bool dispatch_QueryRendererIntegerMESA(Display *dpy, int screen,
if (pQueryRendererIntegerMESA == NULL)
return False;
- return (*pQueryRendererIntegerMESA)(dpy, screen, renderer, attribute, value);
+ return pQueryRendererIntegerMESA(dpy, screen, renderer, attribute, value);
}
@@ -829,7 +829,7 @@ static const char *dispatch_QueryRendererStringMESA(Display *dpy, int screen,
if (pQueryRendererStringMESA == NULL)
return NULL;
- return (*pQueryRendererStringMESA)(dpy, screen, renderer, attribute);
+ return pQueryRendererStringMESA(dpy, screen, renderer, attribute);
}
@@ -847,7 +847,7 @@ static Bool dispatch_ReleaseBuffersMESA(Display *dpy, GLXDrawable d)
if (pReleaseBuffersMESA == NULL)
return False;
- return (*pReleaseBuffersMESA)(dpy, d);
+ return pReleaseBuffersMESA(dpy, d);
}
@@ -867,7 +867,7 @@ static int64_t dispatch_SwapBuffersMscOML(Display *dpy, GLXDrawable drawable,
if (pSwapBuffersMscOML == NULL)
return 0;
- return (*pSwapBuffersMscOML)(dpy, drawable, target_msc, divisor, remainder);
+ return pSwapBuffersMscOML(dpy, drawable, target_msc, divisor, remainder);
}
@@ -888,7 +888,7 @@ static int dispatch_SwapIntervalMESA(unsigned int interval)
if (pSwapIntervalMESA == NULL)
return 0;
- return (*pSwapIntervalMESA)(interval);
+ return pSwapIntervalMESA(interval);
}
@@ -909,7 +909,7 @@ static Bool dispatch_WaitForMscOML(Display *dpy, GLXDrawable drawable,
if (pWaitForMscOML == NULL)
return False;
- return (*pWaitForMscOML)(dpy, drawable, target_msc, divisor, remainder, ust, msc, sbc);
+ return pWaitForMscOML(dpy, drawable, target_msc, divisor, remainder, ust, msc, sbc);
}
@@ -929,7 +929,7 @@ static Bool dispatch_WaitForSbcOML(Display *dpy, GLXDrawable drawable,
if (pWaitForSbcOML == NULL)
return False;
- return (*pWaitForSbcOML)(dpy, drawable, target_sbc, ust, msc, sbc);
+ return pWaitForSbcOML(dpy, drawable, target_sbc, ust, msc, sbc);
}
#undef __FETCH_FUNCTION_PTR
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index bde461b43a3..e3f4bc3acac 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -854,7 +854,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
if (pdraw != NULL) {
Bool flush = gc != &dummyContext && drawable == gc->currentDrawable;
- (*pdraw->psc->driScreen->swapBuffers)(pdraw, 0, 0, 0, flush);
+ pdraw->psc->driScreen->swapBuffers(pdraw, 0, 0, 0, flush);
return;
}
}