From 78a6aa57a0155d72280dd91c05513c847bf76f3b Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Wed, 16 May 2007 14:10:29 -0400 Subject: Move GLX_MESA_allocate_memory related functions to new extension mechanism. --- include/GL/internal/dri_interface.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 7eb168a1b90..fcf82523d99 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -57,9 +57,10 @@ typedef struct __DRIframebufferRec __DRIframebuffer; typedef struct __DRIversionRec __DRIversion; typedef struct __DRIinterfaceMethodsRec __DRIinterfaceMethods; -typedef struct __DRIextensionRec __DRIextension; +typedef struct __DRIextensionRec __DRIextension; typedef struct __DRIcopySubBufferExtensionRec __DRIcopySubBufferExtension; typedef struct __DRIswapControlExtensionRec __DRIswapControlExtension; +typedef struct __DRIallocateExtensionRec __DRIallocateExtension; /*@}*/ @@ -95,6 +96,22 @@ struct __DRIswapControlExtensionRec { unsigned int (*getSwapInterval)(__DRIdrawable *drawable); }; +/** + * Used by drivers that implement the GLX_MESA_allocate_memory. + */ +#define __DRI_ALLOCATE "DRI_Allocate" +struct __DRIallocateExtensionRec { + __DRIextension base; + + void *(*allocateMemory)(__DRIscreen *screen, GLsizei size, + GLfloat readfreq, GLfloat writefreq, + GLfloat priority); + + void (*freeMemory)(__DRIscreen *screen, GLvoid *pointer); + + GLuint (*memoryOffset)(__DRIscreen *screen, const GLvoid *pointer); +}; + /** * \name Functions provided by the driver loader. */ @@ -340,21 +357,6 @@ struct __DRIscreenRec { */ int (*getMSC)(__DRIscreen *screen, int64_t *msc); - /** - * Functions associated with MESA_allocate_memory. - * - * \since Internal API version 20030815. - */ - /*@{*/ - void *(*allocateMemory)(__DRIscreen *screen, GLsizei size, - GLfloat readfreq, GLfloat writefreq, - GLfloat priority); - - void (*freeMemory)(__DRIscreen *screen, GLvoid *pointer); - - GLuint (*memoryOffset)(__DRIscreen *screen, const GLvoid *pointer); - /*@}*/ - /** * Method to create the private DRI context data and initialize the * context dependent methods. -- cgit v1.2.3