bring in a few AGP-related bits from 4.0.4

This commit is contained in:
Brian Paul 2002-11-18 15:11:49 +00:00
parent a8f002f4f4
commit d6113fc20d
2 changed files with 37 additions and 7 deletions

View file

@ -1,4 +1,4 @@
/* $Id: fakeglx.c,v 1.76 2002/11/14 16:14:56 brianp Exp $ */
/* $Id: fakeglx.c,v 1.77 2002/11/18 15:11:49 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -2637,6 +2637,16 @@ Fake_glXFreeMemoryNV( GLvoid *pointer )
}
/*** GLX_MESA_agp_offset */
static GLuint
Fake_glXGetAGPOffsetMESA( const GLvoid *pointer )
{
(void) pointer;
return ~0;
}
extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void);
struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
@ -2775,9 +2785,12 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
/*** GLX_MESA_set_3dfx_mode ***/
glx.Set3DfxModeMESA = Fake_glXSet3DfxModeMESA;
/*** GLX AGP memory allocation ***/
/*** GLX_NV_vertex_array_range ***/
glx.AllocateMemoryNV = Fake_glXAllocateMemoryNV;
glx.FreeMemoryNV = Fake_glXFreeMemoryNV;
/*** GLX_MESA_agp_offset ***/
glx.GetAGPOffsetMESA = Fake_glXGetAGPOffsetMESA;
return &glx;
}

View file

@ -1,10 +1,10 @@
/* $Id: glxapi.c,v 1.30 2002/08/22 21:10:01 brianp Exp $ */
/* $Id: glxapi.c,v 1.31 2002/11/18 15:11:52 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 4.0.2
* Version: 5.1
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -988,7 +988,8 @@ Bool glXSet3DfxModeMESA(int mode)
/*** AGP memory allocation ***/
/*** GLX_NV_vertex_array_range ***/
void *
glXAllocateMemoryNV( GLsizei size,
@ -1017,6 +1018,19 @@ glXFreeMemoryNV( GLvoid *pointer )
}
/*** GLX_MESA_agp_offset */
GLuint
glXGetAGPOffsetMESA( const GLvoid *pointer )
{
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
GET_DISPATCH(dpy, t);
if (!t)
return ~0;
return (t->GetAGPOffsetMESA)(pointer);
}
/**********************************************************************/
/* GLX API management functions */
@ -1227,10 +1241,13 @@ static struct name_address_pair GLX_functions[] = {
/*** GLX_ARB_get_proc_address ***/
{ "glXGetProcAddressARB", (GLvoid *) glXGetProcAddressARB },
/*** GLX AGP memory allocation ***/
/*** GLX_NV_vertex_array_range ***/
{ "glXAllocateMemoryNV", (GLvoid *) glXAllocateMemoryNV },
{ "glXFreeMemoryNV", (GLvoid *) glXFreeMemoryNV },
/*** GLX_MESA_agp_offset ***/
{ "glXGetAGPOffsetMESA", (GLvoid *) glXGetAGPOffsetMESA },
{ NULL, NULL } /* end of list */
};