dri: drop drisw_util.h
authorGeorge Sapountzis <gsapountzis@gmail.com>
Thu, 3 Nov 2011 11:57:41 +0000 (13:57 +0200)
committerGeorge Sapountzis <gsapountzis@gmail.com>
Fri, 4 Nov 2011 21:33:04 +0000 (23:33 +0200)
src/gallium/state_trackers/dri/common/dri_context.h
src/gallium/state_trackers/dri/common/dri_screen.h
src/gallium/state_trackers/dri/common/dri_wrapper.h [deleted file]
src/gallium/state_trackers/dri/drm/dri2_buffer.h
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/common/drisw_util.c
src/mesa/drivers/dri/common/drisw_util.h [deleted file]
src/mesa/drivers/dri/swrast/swrast_priv.h

index 58bc6139691284dad9b65a8d31b8e653c0bd6689..5fc81194dddb99192f637d515f28ad6e4906d19d 100644 (file)
@@ -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;
index c7985e18f0218ca2de724849c9a7cc477804fbed..8c961955ac9ed35aa5e7181c65b3b98e5556b5ee 100644 (file)
@@ -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 (file)
index 141ba02..0000000
+++ /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
index 1cd8dbbda2292727584c202242f7f711dc22a540..e8e474ddb76bd9972a8e46c2475e7dd0d9b518b8 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DRI2_BUFFER_H
 #define DRI2_BUFFER_H
 
-#include "dri_wrapper.h"
+#include "dri_util.h"
 
 struct pipe_surface;
 
index f71b7be47e3f777597ad11f2e37a75f615ef532a..bebb021f615b01c8bc3bb26a77d2e50801d41f89 100644 (file)
  * \author Brian Paul <brian@precisioninsight.com>
  */
 
+/**
+ * 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_
 
 #include "main/mtypes.h"
 #include "xmlconfig.h"
 
-
 /**
  * Extensions.
  */
 extern const __DRIcoreExtension driCoreExtension;
+extern const __DRIswrastExtension driSWRastExtension;
 extern const __DRIdri2Extension driDRI2Extension;
 extern const __DRI2configQueryExtension dri2ConfigQueryExtension;
 
index 1bdb6d8939ed5f5b9ca4a3428ffe6801d4c77ecc..b720750eac9a419c672020793c2acf7c050f23d6 100644 (file)
@@ -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 (file)
index 89917bb..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- * Copyright 2010 George Sapountzis <gsapountzis@gmail.com>
- *
- * 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 <GL/gl.h>
-#include <GL/internal/dri_interface.h>
-#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 */
index 50e6a83d578d61e575be479281840488fb153fc0..b57012aefdfa30c1a7958d22f7a4492f0aeafba0 100644 (file)
@@ -30,7 +30,7 @@
 #include <GL/gl.h>
 #include <GL/internal/dri_interface.h>
 #include "main/mtypes.h"
-#include "drisw_util.h"
+#include "dri_util.h"
 
 
 /**