diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2008-05-11 14:43:40 +0300 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-05-20 16:03:44 -0400 |
commit | 280bf89bd4a6bb7977abb00b88d59234d2c80844 (patch) | |
tree | fb6360ad4b54f1cfe49000f787ba150b06d9eb09 /include/GL | |
parent | c95e66120be049ee51ff84868b1da3379b312fab (diff) |
Add DRI driver that uses the mesa swrast module.
Diffstat (limited to 'include/GL')
-rw-r--r-- | include/GL/internal/dri_interface.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 1bfb5efb2c..033d7a4ae4 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -67,6 +67,7 @@ typedef struct __DRImediaStreamCounterExtensionRec __DRImediaStreamCounterExtens typedef struct __DRItexOffsetExtensionRec __DRItexOffsetExtension; typedef struct __DRItexBufferExtensionRec __DRItexBufferExtension; typedef struct __DRIlegacyExtensionRec __DRIlegacyExtension; +typedef struct __DRIswrastExtensionRec __DRIswrastExtension; /*@}*/ @@ -256,6 +257,7 @@ typedef struct __DRIgetDrawableInfoExtensionRec __DRIgetDrawableInfoExtension; typedef struct __DRIsystemTimeExtensionRec __DRIsystemTimeExtension; typedef struct __DRIdamageExtensionRec __DRIdamageExtension; typedef struct __DRIloaderExtensionRec __DRIloaderExtension; +typedef struct __DRIswrastLoaderExtensionRec __DRIswrastLoaderExtension; /** @@ -357,6 +359,40 @@ struct __DRIloaderExtensionRec { int num_rects, void *loaderPrivate); }; +#define __DRI_SWRAST_IMAGE_OP_DRAW 1 +#define __DRI_SWRAST_IMAGE_OP_CLEAR 2 +#define __DRI_SWRAST_IMAGE_OP_SWAP 3 + +/** + * SWRast Loader extension. + */ +#define __DRI_SWRAST_LOADER "DRI_SWRastLoader" +#define __DRI_SWRAST_LOADER_VERSION 1 +struct __DRIswrastLoaderExtensionRec { + __DRIextension base; + + /* + * Drawable position and size + */ + void (*getDrawableInfo)(__DRIdrawable *drawable, + int *x, int *y, int *width, int *height, + void *loaderPrivate); + + /** + * Put image to drawable + */ + void (*putImage)(__DRIdrawable *drawable, int op, + int x, int y, int width, int height, char *data, + void *loaderPrivate); + + /** + * Get image from drawable + */ + void (*getImage)(__DRIdrawable *drawable, + int x, int y, int width, int height, char *data, + void *loaderPrivate); +}; + /** * The remaining extensions describe driver extensions, immediately * available interfaces provided by the driver. To start using the @@ -569,4 +605,25 @@ struct __DRIlegacyExtensionRec { void *loaderPrivate); }; +/** + * This extension provides alternative screen, drawable and context + * constructors for swrast DRI functionality. This is used in + * conjunction with the core extension. + */ +#define __DRI_SWRAST "DRI_SWRast" +#define __DRI_SWRAST_VERSION 1 + +struct __DRIswrastExtensionRec { + __DRIextension base; + + __DRIscreen *(*createNewScreen)(int screen, + const __DRIextension **extensions, + const __DRIconfig ***driver_configs, + void *loaderPrivate); + + __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen, + const __DRIconfig *config, + void *loaderPrivate); +}; + #endif |