aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c28
-rw-r--r--src/mesa/drivers/x11/glxapi.c35
-rw-r--r--src/mesa/drivers/x11/glxapi.h8
-rw-r--r--src/mesa/drivers/x11/realglx.c6
4 files changed, 73 insertions, 4 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index e7d98dd2a3d..bc194968040 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1,4 +1,4 @@
-/* $Id: fakeglx.c,v 1.66 2002/06/16 03:56:11 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.67 2002/08/22 21:10:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -2492,6 +2492,28 @@ Fake_glXSet3DfxModeMESA( int mode )
+/*** AGP memory allocation ***/
+static void *
+Fake_glXAllocateMemoryNV( GLsizei size,
+ GLfloat readFrequency,
+ GLfloat writeFrequency,
+ GLfloat priority )
+{
+ (void) size;
+ (void) readFrequency;
+ (void) writeFrequency;
+ (void) priority;
+ return NULL;
+}
+
+
+static void
+Fake_glXFreeMemoryNV( GLvoid *pointer )
+{
+ (void) pointer;
+}
+
+
extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void);
struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
@@ -2630,5 +2652,9 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
/*** GLX_MESA_set_3dfx_mode ***/
glx.Set3DfxModeMESA = Fake_glXSet3DfxModeMESA;
+ /*** GLX AGP memory allocation ***/
+ glx.AllocateMemoryNV = Fake_glXAllocateMemoryNV;
+ glx.FreeMemoryNV = Fake_glXFreeMemoryNV;
+
return &glx;
}
diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c
index c35d2878165..7b36d419641 100644
--- a/src/mesa/drivers/x11/glxapi.c
+++ b/src/mesa/drivers/x11/glxapi.c
@@ -1,4 +1,4 @@
-/* $Id: glxapi.c,v 1.29 2002/03/15 18:33:12 brianp Exp $ */
+/* $Id: glxapi.c,v 1.30 2002/08/22 21:10:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -988,6 +988,35 @@ Bool glXSet3DfxModeMESA(int mode)
+/*** AGP memory allocation ***/
+
+void *
+glXAllocateMemoryNV( GLsizei size,
+ GLfloat readFrequency,
+ GLfloat writeFrequency,
+ GLfloat priority )
+{
+ struct _glxapi_table *t;
+ Display *dpy = glXGetCurrentDisplay();
+ GET_DISPATCH(dpy, t);
+ if (!t)
+ return NULL;
+ return (t->AllocateMemoryNV)(size, readFrequency, writeFrequency, priority);
+}
+
+
+void
+glXFreeMemoryNV( GLvoid *pointer )
+{
+ struct _glxapi_table *t;
+ Display *dpy = glXGetCurrentDisplay();
+ GET_DISPATCH(dpy, t);
+ if (!t)
+ return;
+ (t->FreeMemoryNV)(pointer);
+}
+
+
/**********************************************************************/
/* GLX API management functions */
@@ -1198,6 +1227,10 @@ static struct name_address_pair GLX_functions[] = {
/*** GLX_ARB_get_proc_address ***/
{ "glXGetProcAddressARB", (GLvoid *) glXGetProcAddressARB },
+ /*** GLX AGP memory allocation ***/
+ { "glXAllocateMemoryNV", (GLvoid *) glXAllocateMemoryNV },
+ { "glXFreeMemoryNV", (GLvoid *) glXFreeMemoryNV },
+
{ NULL, NULL } /* end of list */
};
diff --git a/src/mesa/drivers/x11/glxapi.h b/src/mesa/drivers/x11/glxapi.h
index 886cf76d74b..dc95a44ae1a 100644
--- a/src/mesa/drivers/x11/glxapi.h
+++ b/src/mesa/drivers/x11/glxapi.h
@@ -1,4 +1,4 @@
-/* $Id: glxapi.h,v 1.12 2002/03/15 18:33:12 brianp Exp $ */
+/* $Id: glxapi.h,v 1.13 2002/08/22 21:10:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -196,6 +196,12 @@ struct _glxapi_table {
/*** GLX_MESA_set_3dfx_mode ***/
Bool (*Set3DfxModeMESA)(int mode);
+ /*** GLX AGP functions ***/
+ void * (*AllocateMemoryNV)( GLsizei size,
+ GLfloat readFrequency,
+ GLfloat writeFrequency,
+ GLfloat priority );
+ void (*FreeMemoryNV)( GLvoid *pointer );
};
diff --git a/src/mesa/drivers/x11/realglx.c b/src/mesa/drivers/x11/realglx.c
index 884bbee6051..eb3449ad41b 100644
--- a/src/mesa/drivers/x11/realglx.c
+++ b/src/mesa/drivers/x11/realglx.c
@@ -1,4 +1,4 @@
-/* $Id: realglx.c,v 1.4 2001/05/30 14:39:47 brianp Exp $ */
+/* $Id: realglx.c,v 1.5 2002/08/22 21:10:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -170,5 +170,9 @@ _real_GetGLXDispatchTable(void)
/*** GLX_MESA_set_3dfx_mode ***/
glx.Set3DfxModeMESA = _real_glXSet3DfxModeMESA;
+ /*** GLX AGP memory allocation ***/
+ glx.AllocateMemoryNV = _real_glXAllocateMemoryNV;
+ glx.FreeMemoryNV = _real_glXFreeMemoryNV;
+
return &glx;
}