mesa: remove Driver.ResizeBuffers
[mesa.git] / src / mesa / drivers / dri / common / dri_util.h
index 92edccbb02e925db18e8571712cecd0ed37f221f..6987f555e6623c6b4bd9a486f99713ce846a1743 100644 (file)
@@ -57,6 +57,7 @@
 #include <GL/internal/dri_interface.h>
 #include "main/mtypes.h"
 #include "xmlconfig.h"
+#include <stdbool.h>
 
 /**
  * Extensions.
@@ -65,7 +66,7 @@ extern const __DRIcoreExtension driCoreExtension;
 extern const __DRIswrastExtension driSWRastExtension;
 extern const __DRIdri2Extension driDRI2Extension;
 extern const __DRI2configQueryExtension dri2ConfigQueryExtension;
-
+extern const __DRIcopySubBufferExtension driCopySubBufferExtension;
 /**
  * Driver callback functions.
  *
@@ -87,6 +88,7 @@ struct __DriverAPIRec {
                               unsigned major_version,
                               unsigned minor_version,
                               uint32_t flags,
+                               bool notify_reset,
                               unsigned *error,
                                void *sharedContextPrivate);
 
@@ -113,15 +115,24 @@ struct __DriverAPIRec {
                                     int width, int height);
 
     void (*ReleaseBuffer) (__DRIscreen *screenPrivate, __DRIbuffer *buffer);
+
+    void (*CopySubBuffer)(__DRIdrawable *driDrawPriv, int x, int y,
+                          int w, int h);
 };
 
 extern const struct __DriverAPIRec driDriverAPI;
-
+extern const struct __DriverAPIRec *globalDriverAPI;
 
 /**
  * Per-screen private driver information.
  */
 struct __DRIscreenRec {
+    /**
+     * Driver-specific entrypoints provided by the driver's
+     * __DRIDriverVtableExtensionRec.
+     */
+    const struct __DriverAPIRec *driver;
+
     /**
      * Current screen's number
      */
@@ -137,11 +148,6 @@ struct __DRIscreenRec {
      */
     int fd;
 
-    /**
-     * DRM (kernel module) version information.
-     */
-    __DRIversion drm_version;
-
     /**
      * Device-dependent private information (not stored in the SAREA).
      * 
@@ -163,11 +169,15 @@ struct __DRIscreenRec {
     struct {
        /* Flag to indicate that this is a DRI2 screen.  Many of the above
         * fields will not be valid or initializaed in that case. */
-       __DRIdri2LoaderExtension *loader;
-       __DRIimageLookupExtension *image;
-       __DRIuseInvalidateExtension *useInvalidate;
+       const __DRIdri2LoaderExtension *loader;
+       const __DRIimageLookupExtension *image;
+       const __DRIuseInvalidateExtension *useInvalidate;
     } dri2;
 
+    struct {
+        const __DRIimageLoaderExtension *loader;
+    } image;
+
     driOptionCache optionInfo;
     driOptionCache optionCache;
 
@@ -265,10 +275,21 @@ struct __DRIdrawableRec {
     } dri2;
 };
 
+extern uint32_t
+driGLFormatToImageFormat(mesa_format format);
+
+extern mesa_format
+driImageFormatToGLFormat(uint32_t image_format);
+
 extern void
 dri2InvalidateDrawable(__DRIdrawable *drawable);
 
 extern void
 driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv);
 
+extern void
+driContextSetFlags(struct gl_context *ctx, uint32_t flags);
+
+extern const __DRIimageDriverExtension driImageDriverExtension;
+
 #endif /* _DRI_UTIL_H_ */