From 78c076e6548f0bb44758d89ec434bcfddd902939 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Thu, 3 Nov 2011 13:57:41 +0200 Subject: dri: drop drisw_util.h --- .../state_trackers/dri/common/dri_context.h | 2 +- src/gallium/state_trackers/dri/common/dri_screen.h | 2 +- .../state_trackers/dri/common/dri_wrapper.h | 10 -- src/gallium/state_trackers/dri/drm/dri2_buffer.h | 2 +- src/mesa/drivers/dri/common/dri_util.h | 8 +- src/mesa/drivers/dri/common/drisw_util.c | 2 +- src/mesa/drivers/dri/common/drisw_util.h | 138 --------------------- src/mesa/drivers/dri/swrast/swrast_priv.h | 2 +- 8 files changed, 12 insertions(+), 154 deletions(-) delete mode 100644 src/gallium/state_trackers/dri/common/dri_wrapper.h delete mode 100644 src/mesa/drivers/dri/common/drisw_util.h diff --git a/src/gallium/state_trackers/dri/common/dri_context.h b/src/gallium/state_trackers/dri/common/dri_context.h index 58bc6139691..5fc81194ddd 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.h +++ b/src/gallium/state_trackers/dri/common/dri_context.h @@ -32,8 +32,8 @@ #ifndef DRI_CONTEXT_H #define DRI_CONTEXT_H +#include "dri_util.h" #include "pipe/p_compiler.h" -#include "dri_wrapper.h" #include "postprocess/filters.h" struct pipe_context; diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h b/src/gallium/state_trackers/dri/common/dri_screen.h index c7985e18f02..8c961955ac9 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.h +++ b/src/gallium/state_trackers/dri/common/dri_screen.h @@ -32,7 +32,7 @@ #ifndef DRI_SCREEN_H #define DRI_SCREEN_H -#include "dri_wrapper.h" +#include "dri_util.h" #include "xmlconfig.h" #include "pipe/p_compiler.h" diff --git a/src/gallium/state_trackers/dri/common/dri_wrapper.h b/src/gallium/state_trackers/dri/common/dri_wrapper.h deleted file mode 100644 index 141ba02706a..00000000000 --- a/src/gallium/state_trackers/dri/common/dri_wrapper.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DRI_WRAPPER_H -#define DRI_WRAPPER_H - -#ifndef __NOT_HAVE_DRM_H -#include "dri_util.h" -#else -#include "drisw_util.h" -#endif - -#endif diff --git a/src/gallium/state_trackers/dri/drm/dri2_buffer.h b/src/gallium/state_trackers/dri/drm/dri2_buffer.h index 1cd8dbbda22..e8e474ddb76 100644 --- a/src/gallium/state_trackers/dri/drm/dri2_buffer.h +++ b/src/gallium/state_trackers/dri/drm/dri2_buffer.h @@ -1,7 +1,7 @@ #ifndef DRI2_BUFFER_H #define DRI2_BUFFER_H -#include "dri_wrapper.h" +#include "dri_util.h" struct pipe_surface; diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index f71b7be47e3..bebb021f615 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -44,6 +44,12 @@ * \author Brian Paul */ +/** + * The following structs are shared between DRISW and DRI2, the DRISW structs + * are essentially base classes of the DRI2 structs. DRISW needs to compile on + * platforms without DRM, so keep the structs opaque to DRM. + */ + #ifndef _DRI_UTIL_H_ #define _DRI_UTIL_H_ @@ -52,11 +58,11 @@ #include "main/mtypes.h" #include "xmlconfig.h" - /** * Extensions. */ extern const __DRIcoreExtension driCoreExtension; +extern const __DRIswrastExtension driSWRastExtension; extern const __DRIdri2Extension driDRI2Extension; extern const __DRI2configQueryExtension dri2ConfigQueryExtension; diff --git a/src/mesa/drivers/dri/common/drisw_util.c b/src/mesa/drivers/dri/common/drisw_util.c index 1bdb6d8939e..b720750eac9 100644 --- a/src/mesa/drivers/dri/common/drisw_util.c +++ b/src/mesa/drivers/dri/common/drisw_util.c @@ -27,7 +27,7 @@ * DRISW utility functions, i.e. dri_util.c stripped from drm-specific bits. */ -#include "drisw_util.h" +#include "dri_util.h" #include "utils.h" diff --git a/src/mesa/drivers/dri/common/drisw_util.h b/src/mesa/drivers/dri/common/drisw_util.h deleted file mode 100644 index 89917bbbe78..00000000000 --- a/src/mesa/drivers/dri/common/drisw_util.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2010 George Sapountzis - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * @file - * Binding of the DRI interface (dri_interface.h) for DRISW. - * - * The DRISW structs are 'base classes' of the corresponding DRI1 / DRI2 (DRM) - * structs. The bindings for SW and DRM can be unified by making the DRM structs - * 'sub-classes' of the SW structs, either proper or with field re-ordering. - * - * The code can also be unified but that requires cluttering the common code - * with ifdef's and guarding with (__DRIscreen::fd >= 0) for DRM. - */ - -#ifndef _DRISW_UTIL_H -#define _DRISW_UTIL_H - -#include -#include -#include "main/mtypes.h" - - -/** - * Extensions - */ -extern const __DRIcoreExtension driCoreExtension; -extern const __DRIswrastExtension driSWRastExtension; - - -/** - * Driver callback functions - */ -struct __DriverAPIRec { - const __DRIconfig **(*InitScreen) (__DRIscreen * priv); - - void (*DestroyScreen)(__DRIscreen *driScrnPriv); - - GLboolean (*CreateContext)(gl_api api, - const struct gl_config *glVis, - __DRIcontext *driContextPriv, - void *sharedContextPrivate); - - void (*DestroyContext)(__DRIcontext *driContextPriv); - - GLboolean (*CreateBuffer)(__DRIscreen *driScrnPriv, - __DRIdrawable *driDrawPriv, - const struct gl_config *glVis, - GLboolean pixmapBuffer); - - void (*DestroyBuffer)(__DRIdrawable *driDrawPriv); - - void (*SwapBuffers)(__DRIdrawable *driDrawPriv); - - GLboolean (*MakeCurrent)(__DRIcontext *driContextPriv, - __DRIdrawable *driDrawPriv, - __DRIdrawable *driReadPriv); - - GLboolean (*UnbindContext)(__DRIcontext *driContextPriv); - - __DRIbuffer *(*AllocateBuffer) (__DRIscreen *screenPrivate, - unsigned int attachment, - unsigned int format, - int width, int height); - - void (*ReleaseBuffer) (__DRIscreen *screenPrivate, __DRIbuffer *buffer); -}; - -extern const struct __DriverAPIRec driDriverAPI; - - -/** - * Data types - */ -struct __DRIscreenRec { - int myNum; - - int fd; - - void *driverPrivate; - - const __DRIextension **extensions; - - const __DRIswrastLoaderExtension *swrast_loader; -}; - -struct __DRIcontextRec { - - void *driverPrivate; - - void *loaderPrivate; - - __DRIdrawable *driDrawablePriv; - - __DRIdrawable *driReadablePriv; - - __DRIscreen *driScreenPriv; -}; - -struct __DRIdrawableRec { - - void *driverPrivate; - - void *loaderPrivate; - - __DRIcontext *driContextPriv; - - __DRIscreen *driScreenPriv; - - int refcount; - - /* gallium */ - unsigned int lastStamp; - - int w, h; -}; - -#endif /* _DRISW_UTIL_H */ diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h index 50e6a83d578..b57012aefdf 100644 --- a/src/mesa/drivers/dri/swrast/swrast_priv.h +++ b/src/mesa/drivers/dri/swrast/swrast_priv.h @@ -30,7 +30,7 @@ #include #include #include "main/mtypes.h" -#include "drisw_util.h" +#include "dri_util.h" /** -- cgit v1.2.3