dri_interface: add missing #include
[mesa.git] / include / GL / internal / dri_interface.h
index 6f9c2c8b8cfb8cdbdc2573b02c5a4e55156df341..26b4bb129084fbe06ac9686558727ba2c563182d 100644 (file)
@@ -48,6 +48,8 @@ typedef unsigned int drm_drawable_t;
 typedef struct drm_clip_rect drm_clip_rect_t;
 #endif
 
+#include <GL/gl.h>
+
 #include <stdint.h>
 
 /**
@@ -589,7 +591,7 @@ struct __DRIdamageExtensionRec {
  * SWRast Loader extension.
  */
 #define __DRI_SWRAST_LOADER "DRI_SWRastLoader"
-#define __DRI_SWRAST_LOADER_VERSION 4
+#define __DRI_SWRAST_LOADER_VERSION 5
 struct __DRIswrastLoaderExtensionRec {
     __DRIextension base;
 
@@ -649,6 +651,23 @@ struct __DRIswrastLoaderExtensionRec {
     void (*getImageShm)(__DRIdrawable *readable,
                         int x, int y, int width, int height,
                         int shmid, void *loaderPrivate);
+
+   /**
+     * Put shm image to drawable (v2)
+     *
+     * The original version fixes srcx/y to 0, and expected
+     * the offset to be adjusted. This version allows src x,y
+     * to not be included in the offset. This is needed to
+     * avoid certain overflow checks in the X server, that
+     * result in lost rendering.
+     *
+     * \since 5
+     */
+    void (*putImageShm2)(__DRIdrawable *drawable, int op,
+                         int x, int y,
+                         int width, int height, int stride,
+                         int shmid, char *shmaddr, unsigned offset,
+                         void *loaderPrivate);
 };
 
 /**
@@ -1327,6 +1346,7 @@ struct __DRIdri2ExtensionRec {
 #define __DRI_IMAGE_FOURCC_NV16                0x3631564e
 #define __DRI_IMAGE_FOURCC_YUYV                0x56595559
 #define __DRI_IMAGE_FOURCC_UYVY                0x59565955
+#define __DRI_IMAGE_FOURCC_AYUV                0x56555941
 
 #define __DRI_IMAGE_FOURCC_YVU410      0x39555659
 #define __DRI_IMAGE_FOURCC_YVU411      0x31315659
@@ -1334,6 +1354,10 @@ struct __DRIdri2ExtensionRec {
 #define __DRI_IMAGE_FOURCC_YVU422      0x36315659
 #define __DRI_IMAGE_FOURCC_YVU444      0x34325659
 
+#define __DRI_IMAGE_FOURCC_P010                0x30313050
+#define __DRI_IMAGE_FOURCC_P012                0x32313050
+#define __DRI_IMAGE_FOURCC_P016                0x36313050
+
 /**
  * Queryable on images created by createImageFromNames.
  *
@@ -1353,6 +1377,7 @@ struct __DRIdri2ExtensionRec {
 #define __DRI_IMAGE_COMPONENTS_Y_UV    0x3004
 #define __DRI_IMAGE_COMPONENTS_Y_XUXV  0x3005
 #define __DRI_IMAGE_COMPONENTS_Y_UXVX  0x3008
+#define __DRI_IMAGE_COMPONENTS_AYUV    0x3009
 #define __DRI_IMAGE_COMPONENTS_R       0x3006
 #define __DRI_IMAGE_COMPONENTS_RG      0x3007