68
74
typedef struct __DRIextensionRec __DRIextension;
69
75
typedef struct __DRIcopySubBufferExtensionRec __DRIcopySubBufferExtension;
70
76
typedef struct __DRIswapControlExtensionRec __DRIswapControlExtension;
71
typedef struct __DRIallocateExtensionRec __DRIallocateExtension;
72
77
typedef struct __DRIframeTrackingExtensionRec __DRIframeTrackingExtension;
73
78
typedef struct __DRImediaStreamCounterExtensionRec __DRImediaStreamCounterExtension;
74
79
typedef struct __DRItexOffsetExtensionRec __DRItexOffsetExtension;
147
* Used by drivers that implement the GLX_MESA_allocate_memory.
149
#define __DRI_ALLOCATE "DRI_Allocate"
150
#define __DRI_ALLOCATE_VERSION 1
151
struct __DRIallocateExtensionRec {
154
void *(*allocateMemory)(__DRIscreen *screen, GLsizei size,
155
GLfloat readfreq, GLfloat writefreq,
158
void (*freeMemory)(__DRIscreen *screen, GLvoid *pointer);
160
GLuint (*memoryOffset)(__DRIscreen *screen, const GLvoid *pointer);
164
152
* Used by drivers that implement the GLX_MESA_swap_frame_usage extension.
166
154
#define __DRI_FRAME_TRACKING "DRI_FrameTracking"
410
398
* Put image to drawable
412
400
void (*putImage)(__DRIdrawable *drawable, int op,
413
int x, int y, int width, int height, char *data,
414
void *loaderPrivate);
401
int x, int y, int width, int height,
402
char *data, void *loaderPrivate);
417
* Get image from drawable
405
* Get image from readable
419
void (*getImage)(__DRIdrawable *drawable,
420
int x, int y, int width, int height, char *data,
421
void *loaderPrivate);
407
void (*getImage)(__DRIdrawable *readable,
408
int x, int y, int width, int height,
409
char *data, void *loaderPrivate);
413
* Invalidate loader extension. The presence of this extension
414
* indicates to the DRI driver that the loader will call invalidate in
415
* the __DRI2_FLUSH extension, whenever the needs to query for new
416
* buffers. This means that the DRI driver can drop the polling in
419
* The extension doesn't provide any functionality, it's only use to
420
* indicate to the driver that it can use the new semantics. A DRI
421
* driver can use this to switch between the different semantics or
422
* just refuse to initialize if this extension isn't present.
424
#define __DRI_USE_INVALIDATE "DRI_UseInvalidate"
425
#define __DRI_USE_INVALIDATE_VERSION 1
427
typedef struct __DRIuseInvalidateExtensionRec __DRIuseInvalidateExtension;
428
struct __DRIuseInvalidateExtensionRec {
730
738
* constructors for DRI2.
732
740
#define __DRI_DRI2 "DRI_DRI2"
733
#define __DRI_DRI2_VERSION 1
741
#define __DRI_DRI2_VERSION 2
743
#define __DRI_API_OPENGL 0
744
#define __DRI_API_GLES 1
745
#define __DRI_API_GLES2 2
735
747
struct __DRIdri2ExtensionRec {
736
748
__DRIextension base;
769
789
#define __DRI_IMAGE_FORMAT_XRGB8888 0x1002
770
790
#define __DRI_IMAGE_FORMAT_ARGB8888 0x1003
792
#define __DRI_IMAGE_USE_SHARE 0x0001
793
#define __DRI_IMAGE_USE_SCANOUT 0x0002
796
* queryImage attributes
799
#define __DRI_IMAGE_ATTRIB_STRIDE 0x2000
800
#define __DRI_IMAGE_ATTRIB_HANDLE 0x2001
801
#define __DRI_IMAGE_ATTRIB_NAME 0x2002
772
803
typedef struct __DRIimageRec __DRIimage;
773
804
typedef struct __DRIimageExtensionRec __DRIimageExtension;
774
805
struct __DRIimageExtensionRec {
784
815
void *loaderPrivate);
786
817
void (*destroyImage)(__DRIimage *image);
819
__DRIimage *(*createImage)(__DRIscreen *screen,
820
int width, int height, int format,
822
void *loaderPrivate);
824
GLboolean (*queryImage)(__DRIimage *image, int attrib, int *value);
790
829
* This extension must be implemented by the loader and passed to the
791
830
* driver at screen creation time. The EGLImage entry points in the
806
845
void *loaderPrivate);
849
* This extension allows for common DRI2 options
851
#define __DRI2_CONFIG_QUERY "DRI_CONFIG_QUERY"
852
#define __DRI2_CONFIG_QUERY_VERSION 1
854
typedef struct __DRI2configQueryExtensionRec __DRI2configQueryExtension;
855
struct __DRI2configQueryExtensionRec {
858
int (*configQueryb)(__DRIscreen *screen, const char *var, GLboolean *val);
859
int (*configQueryi)(__DRIscreen *screen, const char *var, GLint *val);
860
int (*configQueryf)(__DRIscreen *screen, const char *var, GLfloat *val);