[Mesa-dev] [PATCH 03/19] glx/drisw: add support for DRI2rendererQueryExtension

Jon TURNEY jon.turney at dronecode.org.uk
Mon Aug 18 04:47:43 PDT 2014


On 14/08/2014 23:18, Emil Velikov wrote:
> The extension is used by GLX_MESA_query_renderer, which
> can be provided for by hardware and software drivers.
>
> v2: Use designated initializers.
> v3: Move drisw_query_renderer_*() to dri2_query_renderer.c

This breaks my build (see [1])

I guess something like the attached is needed.

Possibly dri2_query_renderer.c needs to be renamed, since it's contents 
now are used for more than dri[23].

[1] http://tinderbox.x.org/builds/2014-08-16-0006/logs/mesa-mesa/#build

-------------- next part --------------
From ee9b2d044ebb089bc3daf93fc6b71e167c47841f Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Sun, 17 Aug 2014 17:22:22 +0100
Subject: [PATCH] Fix build since 679c2ef "glx/drisw: add support for
 DRI2rendererQueryExtension", when only building drisw renderer.

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 src/glx/Makefile.am           | 6 +++---
 src/glx/dri2_query_renderer.c | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
index cdd898e..23cb794 100644
--- a/src/glx/Makefile.am
+++ b/src/glx/Makefile.am
@@ -96,7 +96,8 @@ endif
 if HAVE_DRICOMMON
 libglx_la_SOURCES += \
 	  xfont.c \
-	  dri_common.c
+	  dri_common.c \
+	  dri2_query_renderer.c
 endif
 
 if HAVE_DRI2
@@ -104,8 +105,7 @@ libglx_la_SOURCES += \
 	  dri_glx.c \
 	  XF86dri.c \
 	  dri2_glx.c \
-	  dri2.c \
-	  dri2_query_renderer.c
+	  dri2.c
 endif
 
 if HAVE_DRI3
diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri2_query_renderer.c
index 247ec1c..6ccd710 100644
--- a/src/glx/dri2_query_renderer.c
+++ b/src/glx/dri2_query_renderer.c
@@ -25,7 +25,9 @@
 
 #include "glxclient.h"
 #include "glx_error.h"
+#ifdef HAVE_LIBDRM
 #include "dri2.h"
+#endif
 #include "dri_interface.h"
 #include "dri2_priv.h"
 #if defined(HAVE_DRI3)
@@ -66,6 +68,7 @@ dri2_convert_glx_query_renderer_attribs(int attribute)
    return -1;
 }
 
+#ifdef HAVE_LIBDRM
 _X_HIDDEN int
 dri2_query_renderer_integer(struct glx_screen *base, int attribute,
                             unsigned int *value)
@@ -103,6 +106,7 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute,
 
    return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value);
 }
+#endif
 
 #if defined(HAVE_DRI3)
 _X_HIDDEN int
-- 
1.8.5.5



More information about the mesa-dev mailing list