-/* $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
+/*** 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)
/*** GLX_MESA_set_3dfx_mode ***/
glx.Set3DfxModeMESA = Fake_glXSet3DfxModeMESA;
+ /*** GLX AGP memory allocation ***/
+ glx.AllocateMemoryNV = Fake_glXAllocateMemoryNV;
+ glx.FreeMemoryNV = Fake_glXFreeMemoryNV;
+
return &glx;
}
-/* $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
+/*** 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 */
/*** GLX_ARB_get_proc_address ***/
{ "glXGetProcAddressARB", (GLvoid *) glXGetProcAddressARB },
+ /*** GLX AGP memory allocation ***/
+ { "glXAllocateMemoryNV", (GLvoid *) glXAllocateMemoryNV },
+ { "glXFreeMemoryNV", (GLvoid *) glXFreeMemoryNV },
+
{ NULL, NULL } /* end of list */
};
-/* $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
/*** 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 );
};
-/* $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
/*** GLX_MESA_set_3dfx_mode ***/
glx.Set3DfxModeMESA = _real_glXSet3DfxModeMESA;
+ /*** GLX AGP memory allocation ***/
+ glx.AllocateMemoryNV = _real_glXAllocateMemoryNV;
+ glx.FreeMemoryNV = _real_glXFreeMemoryNV;
+
return &glx;
}