[Mesa-dev] [PATCH 03/19] glx/drisw: add support for DRI2rendererQueryExtension
Jon TURNEY
jon.turney at dronecode.org.uk
Wed Aug 20 11:32:28 PDT 2014
On 18/08/2014 13:08, Emil Velikov wrote:
> On 18/08/14 12:47, Jon TURNEY wrote:
>> 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])
>>
> Ouch, I've completely forgot about your recent-ish changes in here. Sorry for
> the breakage.
>
>> 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].
>>
> My initial plan was to move the functions to dri_common.c, although that
> caused 'make check' to explode so I've kept them here as per Ian's suggestion.
> Renaming the file makes sense imho.
> With a couple of small changes, I believe that you should be safe with
> dropping the above header and the HAVE_LIBDRM guards below.
>
> The small changes:
> - dri*_query_renderer_* into their respective dri*_priv.h
I had a go at writing the patch like that, which seems to work.
Revised patch attached.
> - Perhaps move a struct from dri2.h to dri2_priv.h
I don't know which struct you mean here. I didn't find one I needed to
move to make things build.
The dri2_convert_glx_query_renderer_attribs() helper function could
possibly stand to be given a more generic name.
-------------- next part --------------
From 1f06833a856b98b6c5248f0f001bf5b3a74ae010 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.
v2:
- Move dri*_query_renderer_* into their respective dri*_priv.h headers
- Drop then unnneeded include of dri2.h from dri2_query_renderer.c
- Rename dri2_query_renderer.c as dri_common_query_renderer.c, as it's contents
now are used for more than dri[23]
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
src/glx/Makefile.am | 6 +++---
src/glx/dri2.h | 16 ----------------
src/glx/dri2_priv.h | 8 ++++++++
src/glx/dri3_priv.h | 9 +++++++++
...dri2_query_renderer.c => dri_common_query_renderer.c} | 1 -
5 files changed, 20 insertions(+), 20 deletions(-)
rename src/glx/{dri2_query_renderer.c => dri_common_query_renderer.c} (99%)
diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
index cdd898e..4515312 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 \
+ dri_common_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.h b/src/glx/dri2.h
index d07b296..4be5bf8 100644
--- a/src/glx/dri2.h
+++ b/src/glx/dri2.h
@@ -88,20 +88,4 @@ DRI2CopyRegion(Display * dpy, XID drawable,
XserverRegion region,
CARD32 dest, CARD32 src);
-_X_HIDDEN int
-dri2_query_renderer_integer(struct glx_screen *base, int attribute,
- unsigned int *value);
-
-_X_HIDDEN int
-dri2_query_renderer_string(struct glx_screen *base, int attribute,
- const char **value);
-
-_X_HIDDEN int
-dri3_query_renderer_integer(struct glx_screen *base, int attribute,
- unsigned int *value);
-
-_X_HIDDEN int
-dri3_query_renderer_string(struct glx_screen *base, int attribute,
- const char **value);
-
#endif
diff --git a/src/glx/dri2_priv.h b/src/glx/dri2_priv.h
index c21eee5..b93d158 100644
--- a/src/glx/dri2_priv.h
+++ b/src/glx/dri2_priv.h
@@ -50,3 +50,11 @@ struct dri2_screen {
int show_fps_interval;
};
+
+_X_HIDDEN int
+dri2_query_renderer_integer(struct glx_screen *base, int attribute,
+ unsigned int *value);
+
+_X_HIDDEN int
+dri2_query_renderer_string(struct glx_screen *base, int attribute,
+ const char **value);
diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h
index c0e35ee..248fa28 100644
--- a/src/glx/dri3_priv.h
+++ b/src/glx/dri3_priv.h
@@ -195,3 +195,12 @@ struct dri3_drawable {
xcb_gcontext_t gc;
xcb_special_event_t *special_event;
};
+
+
+_X_HIDDEN int
+dri3_query_renderer_integer(struct glx_screen *base, int attribute,
+ unsigned int *value);
+
+_X_HIDDEN int
+dri3_query_renderer_string(struct glx_screen *base, int attribute,
+ const char **value);
diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri_common_query_renderer.c
similarity index 99%
rename from src/glx/dri2_query_renderer.c
rename to src/glx/dri_common_query_renderer.c
index 247ec1c..d598b12 100644
--- a/src/glx/dri2_query_renderer.c
+++ b/src/glx/dri_common_query_renderer.c
@@ -25,7 +25,6 @@
#include "glxclient.h"
#include "glx_error.h"
-#include "dri2.h"
#include "dri_interface.h"
#include "dri2_priv.h"
#if defined(HAVE_DRI3)
--
1.8.5.5
More information about the mesa-dev
mailing list