Mesa (master): glx/drisw: explicitly assign struct components for glx_*_vtable

Emil Velikov evelikov at kemper.freedesktop.org
Mon Apr 28 18:12:56 UTC 2014


Module: Mesa
Branch: master
Commit: b125c92aa9837c80d1b7e26554d0b66b4db3f2e1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b125c92aa9837c80d1b7e26554d0b66b4db3f2e1

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Tue Feb 18 19:52:26 2014 +0000

glx/drisw: explicitly assign struct components for glx_*_vtable

... to improve readability of code.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

---

 src/glx/drisw_glx.c |   24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index a77be4e..751626b 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -365,15 +365,15 @@ drisw_release_tex_image(Display * dpy, GLXDrawable drawable, int buffer)
 }
 
 static const struct glx_context_vtable drisw_context_vtable = {
-   drisw_destroy_context,
-   drisw_bind_context,
-   drisw_unbind_context,
-   NULL,
-   NULL,
-   DRI_glXUseXFont,
-   drisw_bind_tex_image,
-   drisw_release_tex_image,
-   NULL, /* get_proc_address */
+   .destroy             = drisw_destroy_context,
+   .bind                = drisw_bind_context,
+   .unbind              = drisw_unbind_context,
+   .wait_gl             = NULL,
+   .wait_x              = NULL,
+   .use_x_font          = DRI_glXUseXFont,
+   .bind_tex_image      = drisw_bind_tex_image,
+   .release_tex_image   = drisw_release_tex_image,
+   .get_proc_address    = NULL,
 };
 
 static struct glx_context *
@@ -635,8 +635,10 @@ driOpenSwrast(void)
 }
 
 static const struct glx_screen_vtable drisw_screen_vtable = {
-   drisw_create_context,
-   drisw_create_context_attribs
+   .create_context         = drisw_create_context,
+   .create_context_attribs = drisw_create_context_attribs,
+   .query_renderer_integer = NULL,
+   .query_renderer_string  = NULL,
 };
 
 static void




More information about the mesa-commit mailing list