[Mesa-dev] [PATCH 03/19] glx/drisw: add support for DRI2rendererQueryExtension
Emil Velikov
emil.l.velikov at gmail.com
Mon Aug 18 05:08:23 PDT 2014
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.
> [1] http://tinderbox.x.org/builds/2014-08-16-0006/logs/mesa-mesa/#build
>
>
> 0001-Fix-build-since-679c2ef-glx-drisw-add-support-for-DR.patch
>
>
> 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
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
- Perhaps move a struct from dri2.h to dri2_priv.h
-Emil
> #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
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list