[Mesa-dev] [PATCH 10/14] mesa_glinterop: s/struct_version/version/

Emil Velikov emil.l.velikov at gmail.com
Tue May 24 14:32:52 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

OCD polish for consistency with other mesa interfaces.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 include/GL/mesa_glinterop.h           | 6 +++---
 src/gallium/state_trackers/dri/dri2.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h
index f637409..a187a12 100644
--- a/include/GL/mesa_glinterop.h
+++ b/include/GL/mesa_glinterop.h
@@ -95,7 +95,7 @@ enum {
 typedef struct _mesa_glinterop_device_info {
    /* The caller should set this to the version of the struct they support */
    /* NOTE: Do not use the MESA_GLINTEROP_DEVICE_INFO_VERSION macro */
-   uint32_t struct_version;
+   uint32_t version;
 
    /* PCI location */
    uint32_t pci_segment_group;
@@ -127,7 +127,7 @@ typedef struct _mesa_glinterop_device_info {
 typedef struct _mesa_glinterop_export_in {
    /* The caller should set this to the version of the struct they support */
    /* NOTE: Do not use the MESA_GLINTEROP_EXPORT_IN_VERSION macro */
-   uint32_t struct_version;
+   uint32_t version;
 
    /* One of the following:
     * - GL_TEXTURE_BUFFER
@@ -187,7 +187,7 @@ typedef struct _mesa_glinterop_export_in {
 typedef struct _mesa_glinterop_export_out {
    /* The caller should set this to the version of the struct they support */
    /* NOTE: Do not use the MESA_GLINTEROP_EXPORT_OUT_VERSION macro */
-   uint32_t struct_version;
+   uint32_t version;
 
    /* The DMABUF handle. It must be closed by the caller using the POSIX
     * close() function when it's not needed anymore. Mesa is not responsible
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 7f0db35..bcca2f2 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1468,7 +1468,7 @@ dri2_interop_query_device_info(__DRIcontext *_ctx,
 {
    struct pipe_screen *screen = dri_context(_ctx)->st->pipe->screen;
 
-   if (!out->struct_version)
+   if (!out->version)
       return MESA_GLINTEROP_INVALID_VALUE;
 
    out->pci_segment_group = screen->get_param(screen, PIPE_CAP_PCI_GROUP);
@@ -1497,7 +1497,7 @@ dri2_interop_export_object(__DRIcontext *_ctx,
    unsigned target, usage;
    boolean success;
 
-   if (!in->struct_version || !out->struct_version)
+   if (!in->version || !out->version)
       return MESA_GLINTEROP_INVALID_VALUE;
 
    /* Validate the target. */
-- 
2.8.2



More information about the mesa-dev mailing list