radeon: Unify the style of function pointer calls in structs
authorBoyan Ding <boyan.j.ding@gmail.com>
Wed, 25 Nov 2015 05:27:07 +0000 (13:27 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 13 Jan 2017 16:24:32 +0000 (16:24 +0000)
Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
[Emil Velikov: handle the all cases]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/drivers/dri/radeon/radeon_common.c
src/mesa/drivers/dri/radeon/radeon_common_context.c
src/mesa/drivers/dri/radeon/radeon_queryobj.c

index fde89214ed213942cf8641623d538609cd12b9c9..ee4d5f80418df68d08236cc2e93437832c0bfc93 100644 (file)
@@ -426,7 +426,7 @@ static void radeon_print_state_atom(radeonContextPtr radeon, struct radeon_state
        if (!radeon_is_debug_enabled(RADEON_STATE, RADEON_VERBOSE) )
                return;
 
-       dwords = (*state->check) (&radeon->glCtx, state);
+       dwords = state->check(&radeon->glCtx, state);
 
        fprintf(stderr, "  emit %s %d/%d\n", state->name, dwords, state->cmd_size);
 
@@ -491,13 +491,13 @@ static inline void radeon_emit_atom(radeonContextPtr radeon, struct radeon_state
        BATCH_LOCALS(radeon);
        int dwords;
 
-       dwords = (*atom->check) (&radeon->glCtx, atom);
+       dwords = atom->check(&radeon->glCtx, atom);
        if (dwords) {
 
                radeon_print_state_atom(radeon, atom);
 
                if (atom->emit) {
-                       (*atom->emit)(&radeon->glCtx, atom);
+                       atom->emit(&radeon->glCtx, atom);
                } else {
                        BEGIN_BATCH(dwords);
                        OUT_BATCH_TABLE(atom->cmd, dwords);
@@ -591,7 +591,7 @@ flush_front:
                         */
                        radeon->front_buffer_dirty = GL_FALSE;
 
-                       (*screen->dri2.loader->flushFrontBuffer)(drawable, drawable->loaderPrivate);
+                       screen->dri2.loader->flushFrontBuffer(drawable, drawable->loaderPrivate);
                }
        }
 }
index 4660d98c9a2ee73570b216e957422a7988b4a161..d981ca24e56063e0b092f3d6af4fc7e7ecfedef7 100644 (file)
@@ -418,12 +418,12 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
                        }
                }
 
-               buffers = (*screen->dri2.loader->getBuffersWithFormat)(drawable,
-                                                               &drawable->w,
-                                                               &drawable->h,
-                                                               attachments, i / 2,
-                                                               &count,
-                                                               drawable->loaderPrivate);
+               buffers = screen->dri2.loader->getBuffersWithFormat(drawable,
+                                                                   &drawable->w,
+                                                                   &drawable->h,
+                                                                   attachments, i / 2,
+                                                                   &count,
+                                                                   drawable->loaderPrivate);
        } else if (screen->dri2.loader) {
                i = 0;
                if (draw->color_rb[0])
@@ -437,12 +437,12 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
                                attachments[i++] = __DRI_BUFFER_STENCIL;
                }
 
-               buffers = (*screen->dri2.loader->getBuffers)(drawable,
-                                                                &drawable->w,
-                                                                &drawable->h,
-                                                                attachments, i,
-                                                                &count,
-                                                                drawable->loaderPrivate);
+               buffers = screen->dri2.loader->getBuffers(drawable,
+                                                         &drawable->w,
+                                                         &drawable->h,
+                                                         attachments, i,
+                                                         &count,
+                                                         drawable->loaderPrivate);
        }
 
        if (buffers == NULL)
index cd0075ad3a9be2316b2c8c86122bc7f907f4b9f0..baf7081994c78f2d8f0ecf8beb877fe9e806fe29 100644 (file)
@@ -206,7 +206,7 @@ void radeon_emit_queryobj(struct gl_context *ctx, struct radeon_state_atom *atom
        BATCH_LOCALS(radeon);
        int dwords;
 
-       dwords = (*atom->check) (ctx, atom);
+       dwords = atom->check(ctx, atom);
 
        BEGIN_BATCH(dwords);
        OUT_BATCH_TABLE(atom->cmd, dwords);