diff options
author | Marek Olšák <marek.olsak@amd.com> | 2022-11-15 17:53:39 -0500 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-11-27 02:52:41 +0000 |
commit | 8cb8a3c03dc0b25d9f8b8ab639754888541ddc07 (patch) | |
tree | 5ed3a9afe74e0ac25468205ed205498c38b96f8f /src | |
parent | fbf93ef82145978858779e95385364b53e2385a4 (diff) |
glx,dri: simplify indirect function call syntax
just remove () and * and the space
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19741>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/frontends/dri/dri2.c | 8 | ||||
-rw-r--r-- | src/glx/dri2_glx.c | 24 | ||||
-rw-r--r-- | src/glx/dri3_glx.c | 16 | ||||
-rw-r--r-- | src/glx/dri_common.c | 2 | ||||
-rw-r--r-- | src/glx/drisw_glx.c | 4 | ||||
-rw-r--r-- | src/glx/glx_pbuffer.c | 4 | ||||
-rw-r--r-- | src/glx/glxcmds.c | 12 | ||||
-rw-r--r-- | src/glx/glxext.c | 16 |
8 files changed, 43 insertions, 43 deletions
diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index 2e5adf390d0..fe55d4abf86 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -287,10 +287,10 @@ dri_image_drawable_get_buffers(struct dri_drawable *drawable, } } - return (*sPriv->image.loader->getBuffers) (dPriv, image_format, - (uint32_t *) &drawable->base.stamp, - dPriv->loaderPrivate, buffer_mask, - images); + return sPriv->image.loader->getBuffers(dPriv, image_format, + (uint32_t *)&drawable->base.stamp, + dPriv->loaderPrivate, buffer_mask, + images); } static __DRIbuffer * diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 1ce47832c62..577129de940 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -105,7 +105,7 @@ dri2_destroy_context(struct glx_context *context) free((char *) context->extensions); - (*psc->core->destroyContext) (context->driContext); + psc->core->destroyContext(context->driContext); free(context); } @@ -133,7 +133,7 @@ dri2_bind_context(struct glx_context *context, struct glx_context *old, else if (read != None) return GLXBadDrawable; - if (!(*psc->core->bindContext) (context->driContext, dri_draw, dri_read)) + if (!psc->core->bindContext(context->driContext, dri_draw, dri_read)) return GLXBadContext; return Success; @@ -144,7 +144,7 @@ dri2_unbind_context(struct glx_context *context, struct glx_context *new) { struct dri2_screen *psc = (struct dri2_screen *) context->psc; - (*psc->core->unbindContext) (context->driContext); + psc->core->unbindContext(context->driContext); } static struct glx_context * @@ -236,7 +236,7 @@ dri2_create_context_attribs(struct glx_screen *base, pcp->renderType = dca.render_type; pcp->driContext = - (*psc->dri2->createContextAttribs) (psc->driScreen, + psc->dri2->createContextAttribs(psc->driScreen, dca.api, config ? config->driConfig : NULL, shared, @@ -267,7 +267,7 @@ dri2DestroyDrawable(__GLXDRIdrawable *base) struct dri2_display *pdp = (struct dri2_display *)dpyPriv->dri2Display; __glxHashDelete(pdp->dri2Hash, pdraw->base.xDrawable); - (*psc->core->destroyDrawable) (pdraw->driDrawable); + psc->core->destroyDrawable(pdraw->driDrawable); /* If it's a GLX 1.3 drawables, we can destroy the DRI2 drawable * now, as the application explicitly asked to destroy the GLX @@ -313,7 +313,7 @@ dri2CreateDrawable(struct glx_screen *base, XID xDrawable, pdp = (struct dri2_display *)dpyPriv->dri2Display; /* Create a new drawable */ pdraw->driDrawable = - (*psc->dri2->createNewDrawable) (psc->driScreen, + psc->dri2->createNewDrawable(psc->driScreen, config->driConfig, pdraw); if (!pdraw->driDrawable) { @@ -323,7 +323,7 @@ dri2CreateDrawable(struct glx_screen *base, XID xDrawable, } if (__glxHashInsert(pdp->dri2Hash, xDrawable, pdraw)) { - (*psc->core->destroyDrawable) (pdraw->driDrawable); + psc->core->destroyDrawable(pdraw->driDrawable); DRI2DestroyDrawable(psc->base.dpy, xDrawable); free(pdraw); return None; @@ -534,7 +534,7 @@ dri2_copy_drawable(struct dri2_drawable *priv, int dest, int src) xrect.height = priv->height; if (psc->f) - (*psc->f->flush) (priv->driDrawable); + psc->f->flush(priv->driDrawable); region = XFixesCreateRegion(psc->base.dpy, &xrect, 1); DRI2CopyRegion(psc->base.dpy, priv->base.xDrawable, region, dest, src); @@ -605,7 +605,7 @@ dri2DestroyScreen(struct glx_screen *base) struct dri2_screen *psc = (struct dri2_screen *) base; /* Free the direct rendering per screen data */ - (*psc->core->destroyScreen) (psc->driScreen); + psc->core->destroyScreen(psc->driScreen); driDestroyConfigs(psc->driver_configs); free(psc->driverName); close(psc->fd); @@ -890,13 +890,13 @@ dri2_bind_tex_image(__GLXDRIdrawable *base, if (psc->texBuffer->base.version >= 2 && psc->texBuffer->setTexBuffer2 != NULL) { - (*psc->texBuffer->setTexBuffer2) (gc->driContext, + psc->texBuffer->setTexBuffer2(gc->driContext, pdraw->base.textureTarget, pdraw->base.textureFormat, pdraw->driDrawable); } else { - (*psc->texBuffer->setTexBuffer) (gc->driContext, + psc->texBuffer->setTexBuffer(gc->driContext, pdraw->base.textureTarget, pdraw->driDrawable); } @@ -915,7 +915,7 @@ dri2_release_tex_image(__GLXDRIdrawable *base, int buffer) if (psc->texBuffer->base.version >= 3 && psc->texBuffer->releaseTexBuffer != NULL) { - (*psc->texBuffer->releaseTexBuffer) (gc->driContext, + psc->texBuffer->releaseTexBuffer(gc->driContext, pdraw->base.textureTarget, pdraw->driDrawable); } diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index e8996dd5e27..71b02d9c3e2 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -176,7 +176,7 @@ dri3_destroy_context(struct glx_context *context) free((char *) context->extensions); - (*psc->core->destroyContext) (context->driContext); + psc->core->destroyContext(context->driContext); free(context); } @@ -204,7 +204,7 @@ dri3_bind_context(struct glx_context *context, struct glx_context *old, else if (read != None) return GLXBadDrawable; - if (!(*psc->core->bindContext) (context->driContext, dri_draw, dri_read)) + if (!psc->core->bindContext(context->driContext, dri_draw, dri_read)) return GLXBadContext; if (dri_draw) @@ -220,7 +220,7 @@ dri3_unbind_context(struct glx_context *context, struct glx_context *new) { struct dri3_screen *psc = (struct dri3_screen *) context->psc; - (*psc->core->unbindContext) (context->driContext); + psc->core->unbindContext(context->driContext); } static struct glx_context * @@ -309,7 +309,7 @@ dri3_create_context_attribs(struct glx_screen *base, pcp->renderType = dca.render_type; pcp->driContext = - (*psc->image_driver->createContextAttribs) (psc->driScreen, + psc->image_driver->createContextAttribs(psc->driScreen, dca.api, config ? config->driConfig : NULL, @@ -618,12 +618,12 @@ dri3_destroy_screen(struct glx_screen *base) if (psc->is_different_gpu) { if (psc->driScreenDisplayGPU) { loader_dri3_close_screen(psc->driScreenDisplayGPU); - (*psc->core->destroyScreen) (psc->driScreenDisplayGPU); + psc->core->destroyScreen(psc->driScreenDisplayGPU); } close(psc->fd_display_gpu); } loader_dri3_close_screen(psc->driScreen); - (*psc->core->destroyScreen) (psc->driScreen); + psc->core->destroyScreen(psc->driScreen); driDestroyConfigs(psc->driver_configs); close(psc->fd); free(psc); @@ -678,7 +678,7 @@ dri3_bind_tex_image(__GLXDRIdrawable *base, XSync(gc->currentDpy, false); - (*psc->texBuffer->setTexBuffer2) (gc->driContext, + psc->texBuffer->setTexBuffer2(gc->driContext, pdraw->base.textureTarget, pdraw->base.textureFormat, pdraw->loader_drawable.dri_drawable); @@ -697,7 +697,7 @@ dri3_release_tex_image(__GLXDRIdrawable *base, int buffer) if (psc->texBuffer->base.version >= 3 && psc->texBuffer->releaseTexBuffer != NULL) - (*psc->texBuffer->releaseTexBuffer) (gc->driContext, + psc->texBuffer->releaseTexBuffer(gc->driContext, pdraw->base.textureTarget, pdraw->loader_drawable.dri_drawable); } diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 94e264cc07f..1b17f80be01 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -413,7 +413,7 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable) } if (__glxHashInsert(priv->drawHash, glxDrawable, pdraw)) { - (*pdraw->destroyDrawable) (pdraw); + pdraw->destroyDrawable(pdraw); return NULL; } pdraw->refcount = 1; diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index e90f4efbab4..393ea7174e1 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -719,14 +719,14 @@ driswCreateDrawable(struct glx_screen *base, XID xDrawable, /* Create a new drawable */ if (kopper) { pdp->driDrawable = - (*kopper->createNewDrawable) (psc->driScreen, config->driConfig, pdp, !(type & GLX_WINDOW_BIT)); + kopper->createNewDrawable(psc->driScreen, config->driConfig, pdp, !(type & GLX_WINDOW_BIT)); pdp->swapInterval = dri_get_initial_swap_interval(psc->driScreen, psc->config); psc->kopper->setSwapInterval(pdp->driDrawable, pdp->swapInterval); } else pdp->driDrawable = - (*swrast->createNewDrawable) (psc->driScreen, config->driConfig, pdp); + swrast->createNewDrawable(psc->driScreen, config->driConfig, pdp); if (!pdp->driDrawable) { XDestroyDrawable(pdp, psc->base.dpy, xDrawable); diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index 412f4103458..b74fed99efe 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -196,7 +196,7 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config, } if (__glxHashInsert(priv->drawHash, glxdrawable, pdraw)) { - (*pdraw->destroyDrawable) (pdraw); + pdraw->destroyDrawable(pdraw); return GL_FALSE; } @@ -217,7 +217,7 @@ DestroyDRIDrawable(Display *dpy, GLXDrawable drawable) __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable); if (priv != NULL && pdraw != NULL) { - (*pdraw->destroyDrawable) (pdraw); + pdraw->destroyDrawable(pdraw); __glxHashDelete(priv->drawHash, drawable); } #endif diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index f03a50834f4..087fff65b2c 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -764,7 +764,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap) } if (__glxHashInsert(priv->drawHash, xid, pdraw)) { - (*pdraw->destroyDrawable) (pdraw); + pdraw->destroyDrawable(pdraw); xid = None; break; } @@ -821,7 +821,7 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap) __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, glxpixmap); if (priv != NULL && pdraw != NULL) { - (*pdraw->destroyDrawable) (pdraw); + pdraw->destroyDrawable(pdraw); __glxHashDelete(priv->drawHash, glxpixmap); } } @@ -2225,7 +2225,7 @@ glXSwapBuffersMscOML(Display *dpy, GLXDrawable drawable, #ifdef GLX_DIRECT_RENDERING if (psc->driScreen && psc->driScreen->swapBuffers) - return (*psc->driScreen->swapBuffers)(pdraw, target_msc, divisor, + return psc->driScreen->swapBuffers(pdraw, target_msc, divisor, remainder, False); #endif @@ -2364,7 +2364,7 @@ glXCopySubBufferMESA(Display * dpy, GLXDrawable drawable, if (pdraw != NULL) { struct glx_screen *psc = pdraw->psc; if (psc->driScreen->copySubBuffer != NULL) { - (*psc->driScreen->copySubBuffer) (pdraw, x, y, width, height, True); + psc->driScreen->copySubBuffer(pdraw, x, y, width, height, True); } return; @@ -2431,7 +2431,7 @@ glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, if (pdraw != NULL) { struct glx_screen *psc = pdraw->psc; if (psc->driScreen->bindTexImage != NULL) - (*psc->driScreen->bindTexImage) (pdraw, buffer, attrib_list); + psc->driScreen->bindTexImage(pdraw, buffer, attrib_list); return; } @@ -2489,7 +2489,7 @@ glXReleaseTexImageEXT(Display * dpy, GLXDrawable drawable, int buffer) if (pdraw != NULL) { struct glx_screen *psc = pdraw->psc; if (psc->driScreen->releaseTexImage != NULL) - (*psc->driScreen->releaseTexImage) (pdraw, buffer); + psc->driScreen->releaseTexImage(pdraw, buffer); return; } diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 4d59ec28bf7..85ca2d54ab5 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -303,22 +303,22 @@ glx_display_free(struct glx_display *priv) /* Free the direct rendering per display data */ if (priv->driswDisplay) - (*priv->driswDisplay->destroyDisplay) (priv->driswDisplay); + priv->driswDisplay->destroyDisplay(priv->driswDisplay); priv->driswDisplay = NULL; #if defined (GLX_USE_DRM) if (priv->dri2Display) - (*priv->dri2Display->destroyDisplay) (priv->dri2Display); + priv->dri2Display->destroyDisplay(priv->dri2Display); priv->dri2Display = NULL; if (priv->dri3Display) - (*priv->dri3Display->destroyDisplay) (priv->dri3Display); + priv->dri3Display->destroyDisplay(priv->dri3Display); priv->dri3Display = NULL; #endif /* GLX_USE_DRM */ #if defined(GLX_USE_WINDOWSGL) if (priv->windowsdriDisplay) - (*priv->windowsdriDisplay->destroyDisplay) (priv->windowsdriDisplay); + priv->windowsdriDisplay->destroyDisplay(priv->windowsdriDisplay); priv->windowsdriDisplay = NULL; #endif /* GLX_USE_WINDOWSGL */ @@ -836,19 +836,19 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv) #if defined(GLX_USE_DRM) #if defined(HAVE_DRI3) if (priv->dri3Display) - psc = (*priv->dri3Display->createScreen) (i, priv); + psc = priv->dri3Display->createScreen(i, priv); #endif /* HAVE_DRI3 */ if (psc == NULL && priv->dri2Display) - psc = (*priv->dri2Display->createScreen) (i, priv); + psc = priv->dri2Display->createScreen(i, priv); #endif /* GLX_USE_DRM */ #ifdef GLX_USE_WINDOWSGL if (psc == NULL && priv->windowsdriDisplay) - psc = (*priv->windowsdriDisplay->createScreen) (i, priv); + psc = priv->windowsdriDisplay->createScreen(i, priv); #endif if (psc == NULL && priv->driswDisplay) - psc = (*priv->driswDisplay->createScreen) (i, priv); + psc = priv->driswDisplay->createScreen(i, priv); #endif /* GLX_DIRECT_RENDERING && !GLX_USE_APPLEGL */ #if defined(GLX_USE_APPLEGL) |