updated mesa to 7.0.2

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23260 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2008-01-05 16:12:28 +00:00
parent de5c8292ae
commit 0f928a18d2
56 changed files with 2037 additions and 2037 deletions
+11 -16
View File
@@ -44,22 +44,17 @@
#define GLAPIENTRYP GLAPIENTRY *
#endif
#ifdef GLAPI
#undef GLAPI
#endif
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
# define GLAPI __declspec(dllexport)
# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# endif /* _STATIC_MESA support */
#ifndef GLAPI
#define GLAPI
#endif
#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
# undef GLAPI
# define GLAPI __declspec(dllexport)
#elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL)
/* tag specifying we're building for DLL runtime support */
# undef GLAPI
# define GLAPI __declspec(dllimport)
#elif !defined(GLAPI)
/* for use with static link lib build of Win32 edition only */
# define GLAPI extern
#endif /* _STATIC_MESA support */
#ifdef __cplusplus
extern "C" {
+49 -66
View File
@@ -168,74 +168,57 @@ static void __gluMultMatrixVecd(const GLdouble matrix[16], const GLdouble in[4],
}
/*
** inverse = invert(src)
** New, faster implementation by Shan Hao Bo, April 2006.
** Invert 4x4 matrix.
** Contributed by David Moore (See Mesa bug #6748)
*/
static int __gluInvertMatrixd(const GLdouble src[16], GLdouble inverse[16])
static int __gluInvertMatrixd(const GLdouble m[16], GLdouble invOut[16])
{
int i, j, k;
double t;
GLdouble temp[4][4];
for (i=0; i<4; i++) {
for (j=0; j<4; j++) {
temp[i][j] = src[i*4+j];
}
}
__gluMakeIdentityd(inverse);
for (i = 0; i < 4; i++) {
if (temp[i][i] == 0.0f) {
/*
** Look for non-zero element in column
*/
for (j = i + 1; j < 4; j++) {
if (temp[j][i] != 0.0f) {
break;
}
}
if (j != 4) {
/*
** Swap rows.
*/
for (k = 0; k < 4; k++) {
t = temp[i][k];
temp[i][k] = temp[j][k];
temp[j][k] = t;
t = inverse[i*4+k];
inverse[i*4+k] = inverse[j*4+k];
inverse[j*4+k] = t;
}
}
else {
/*
** No non-zero pivot. The matrix is singular,
which shouldn't
** happen. This means the user gave us a bad
matrix.
*/
return GL_FALSE;
}
}
t = 1.0f / temp[i][i];
for (k = 0; k < 4; k++) {
temp[i][k] *= t;
inverse[i*4+k] *= t;
}
for (j = 0; j < 4; j++) {
if (j != i) {
t = temp[j][i];
for (k = 0; k < 4; k++) {
temp[j][k] -= temp[i][k]*t;
inverse[j*4+k] -= inverse[i*4+k]*t;
}
}
}
}
return GL_TRUE;
double inv[16], det;
int i;
inv[0] = m[5]*m[10]*m[15] - m[5]*m[11]*m[14] - m[9]*m[6]*m[15]
+ m[9]*m[7]*m[14] + m[13]*m[6]*m[11] - m[13]*m[7]*m[10];
inv[4] = -m[4]*m[10]*m[15] + m[4]*m[11]*m[14] + m[8]*m[6]*m[15]
- m[8]*m[7]*m[14] - m[12]*m[6]*m[11] + m[12]*m[7]*m[10];
inv[8] = m[4]*m[9]*m[15] - m[4]*m[11]*m[13] - m[8]*m[5]*m[15]
+ m[8]*m[7]*m[13] + m[12]*m[5]*m[11] - m[12]*m[7]*m[9];
inv[12] = -m[4]*m[9]*m[14] + m[4]*m[10]*m[13] + m[8]*m[5]*m[14]
- m[8]*m[6]*m[13] - m[12]*m[5]*m[10] + m[12]*m[6]*m[9];
inv[1] = -m[1]*m[10]*m[15] + m[1]*m[11]*m[14] + m[9]*m[2]*m[15]
- m[9]*m[3]*m[14] - m[13]*m[2]*m[11] + m[13]*m[3]*m[10];
inv[5] = m[0]*m[10]*m[15] - m[0]*m[11]*m[14] - m[8]*m[2]*m[15]
+ m[8]*m[3]*m[14] + m[12]*m[2]*m[11] - m[12]*m[3]*m[10];
inv[9] = -m[0]*m[9]*m[15] + m[0]*m[11]*m[13] + m[8]*m[1]*m[15]
- m[8]*m[3]*m[13] - m[12]*m[1]*m[11] + m[12]*m[3]*m[9];
inv[13] = m[0]*m[9]*m[14] - m[0]*m[10]*m[13] - m[8]*m[1]*m[14]
+ m[8]*m[2]*m[13] + m[12]*m[1]*m[10] - m[12]*m[2]*m[9];
inv[2] = m[1]*m[6]*m[15] - m[1]*m[7]*m[14] - m[5]*m[2]*m[15]
+ m[5]*m[3]*m[14] + m[13]*m[2]*m[7] - m[13]*m[3]*m[6];
inv[6] = -m[0]*m[6]*m[15] + m[0]*m[7]*m[14] + m[4]*m[2]*m[15]
- m[4]*m[3]*m[14] - m[12]*m[2]*m[7] + m[12]*m[3]*m[6];
inv[10] = m[0]*m[5]*m[15] - m[0]*m[7]*m[13] - m[4]*m[1]*m[15]
+ m[4]*m[3]*m[13] + m[12]*m[1]*m[7] - m[12]*m[3]*m[5];
inv[14] = -m[0]*m[5]*m[14] + m[0]*m[6]*m[13] + m[4]*m[1]*m[14]
- m[4]*m[2]*m[13] - m[12]*m[1]*m[6] + m[12]*m[2]*m[5];
inv[3] = -m[1]*m[6]*m[11] + m[1]*m[7]*m[10] + m[5]*m[2]*m[11]
- m[5]*m[3]*m[10] - m[9]*m[2]*m[7] + m[9]*m[3]*m[6];
inv[7] = m[0]*m[6]*m[11] - m[0]*m[7]*m[10] - m[4]*m[2]*m[11]
+ m[4]*m[3]*m[10] + m[8]*m[2]*m[7] - m[8]*m[3]*m[6];
inv[11] = -m[0]*m[5]*m[11] + m[0]*m[7]*m[9] + m[4]*m[1]*m[11]
- m[4]*m[3]*m[9] - m[8]*m[1]*m[7] + m[8]*m[3]*m[5];
inv[15] = m[0]*m[5]*m[10] - m[0]*m[6]*m[9] - m[4]*m[1]*m[10]
+ m[4]*m[2]*m[9] + m[8]*m[1]*m[6] - m[8]*m[2]*m[5];
det = m[0]*inv[0] + m[1]*inv[4] + m[2]*inv[8] + m[3]*inv[12];
if (det == 0)
return GL_FALSE;
det = 1.0 / det;
for (i = 0; i < 16; i++)
invOut[i] = inv[i] * det;
return GL_TRUE;
}
static void __gluMultMatricesd(const GLdouble a[16], const GLdouble b[16],
+12 -5
View File
@@ -2362,6 +2362,9 @@
#define CALL_BlitFramebufferEXT(disp, parameters) (*((disp)->BlitFramebufferEXT)) parameters
#define GET_BlitFramebufferEXT(disp) ((disp)->BlitFramebufferEXT)
#define SET_BlitFramebufferEXT(disp, fn) ((disp)->BlitFramebufferEXT = fn)
#define CALL_StencilFuncSeparateATI(disp, parameters) (*((disp)->StencilFuncSeparateATI)) parameters
#define GET_StencilFuncSeparateATI(disp) ((disp)->StencilFuncSeparateATI)
#define SET_StencilFuncSeparateATI(disp, fn) ((disp)->StencilFuncSeparateATI = fn)
#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) (*((disp)->ProgramEnvParameters4fvEXT)) parameters
#define GET_ProgramEnvParameters4fvEXT(disp) ((disp)->ProgramEnvParameters4fvEXT)
#define SET_ProgramEnvParameters4fvEXT(disp, fn) ((disp)->ProgramEnvParameters4fvEXT = fn)
@@ -2377,7 +2380,7 @@
#else
#define driDispatchRemapTable_size 364
#define driDispatchRemapTable_size 365
extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define AttachShader_remap_index 0
@@ -2740,10 +2743,11 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define IsRenderbufferEXT_remap_index 357
#define RenderbufferStorageEXT_remap_index 358
#define BlitFramebufferEXT_remap_index 359
#define ProgramEnvParameters4fvEXT_remap_index 360
#define ProgramLocalParameters4fvEXT_remap_index 361
#define GetQueryObjecti64vEXT_remap_index 362
#define GetQueryObjectui64vEXT_remap_index 363
#define StencilFuncSeparateATI_remap_index 360
#define ProgramEnvParameters4fvEXT_remap_index 361
#define ProgramLocalParameters4fvEXT_remap_index 362
#define GetQueryObjecti64vEXT_remap_index 363
#define GetQueryObjectui64vEXT_remap_index 364
#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[AttachShader_remap_index], parameters)
#define GET_AttachShader(disp) GET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index])
@@ -3825,6 +3829,9 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), driDispatchRemapTable[BlitFramebufferEXT_remap_index], parameters)
#define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BlitFramebufferEXT_remap_index])
#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BlitFramebufferEXT_remap_index], fn)
#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), driDispatchRemapTable[StencilFuncSeparateATI_remap_index], parameters)
#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index])
#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index], fn)
#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index], parameters)
#define GET_ProgramEnvParameters4fvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index])
#define SET_ProgramEnvParameters4fvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index], fn)
+7 -5
View File
@@ -800,11 +800,12 @@
#define _gloffset_IsRenderbufferEXT 765
#define _gloffset_RenderbufferStorageEXT 766
#define _gloffset_BlitFramebufferEXT 767
#define _gloffset_ProgramEnvParameters4fvEXT 768
#define _gloffset_ProgramLocalParameters4fvEXT 769
#define _gloffset_GetQueryObjecti64vEXT 770
#define _gloffset_GetQueryObjectui64vEXT 771
#define _gloffset_FIRST_DYNAMIC 772
#define _gloffset_StencilFuncSeparateATI 768
#define _gloffset_ProgramEnvParameters4fvEXT 769
#define _gloffset_ProgramLocalParameters4fvEXT 770
#define _gloffset_GetQueryObjecti64vEXT 771
#define _gloffset_GetQueryObjectui64vEXT 772
#define _gloffset_FIRST_DYNAMIC 773
#else
@@ -1168,6 +1169,7 @@
#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index]
#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index]
#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index]
#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index]
#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index]
#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index]
#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index]
+6 -5
View File
@@ -464,7 +464,7 @@ struct _glapi_table
GLboolean (GLAPIENTRYP IsShader)(GLuint shader); /* 420 */
void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 421 */
void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 422 */
void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); /* 423 */
void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass); /* 423 */
void (GLAPIENTRYP UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 424 */
void (GLAPIENTRYP UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 425 */
void (GLAPIENTRYP UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 426 */
@@ -809,10 +809,11 @@ struct _glapi_table
GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 765 */
void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 766 */
void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 767 */
void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 768 */
void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 769 */
void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 770 */
void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 771 */
void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 768 */
void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 769 */
void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 770 */
void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 771 */
void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 772 */
};
#endif /* !defined( _GLAPI_TABLE_H_ ) */
+24 -9
View File
@@ -2754,9 +2754,16 @@ KEYWORD1 void KEYWORD2 NAME(StencilMaskSeparate)(GLenum face, GLuint mask)
DISPATCH(StencilMaskSeparate, (face, mask), (F, "glStencilMaskSeparate(0x%x, %d);\n", face, mask));
}
KEYWORD1 void KEYWORD2 NAME(StencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
KEYWORD1 void KEYWORD2 NAME(StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)
{
DISPATCH(StencilOpSeparate, (face, fail, zfail, zpass), (F, "glStencilOpSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", face, fail, zfail, zpass));
DISPATCH(StencilOpSeparate, (face, sfail, zfail, zpass), (F, "glStencilOpSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", face, sfail, zfail, zpass));
}
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_423)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_423)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)
{
DISPATCH(StencilOpSeparate, (face, sfail, zfail, zpass), (F, "glStencilOpSeparateATI(0x%x, 0x%x, 0x%x, 0x%x);\n", face, sfail, zfail, zpass));
}
KEYWORD1 void KEYWORD2 NAME(UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
@@ -5441,30 +5448,37 @@ KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_767)(GLint srcX0, GLint srcY0, GL
DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebufferEXT(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter));
}
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
{
DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
DISPATCH(StencilFuncSeparateATI, (frontfunc, backfunc, ref, mask), (F, "glStencilFuncSeparateATI(0x%x, 0x%x, %d, %d);\n", frontfunc, backfunc, ref, mask));
}
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_769)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_769)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_770)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_770)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_770)(GLuint id, GLenum pname, GLint64EXT * params);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_771)(GLuint id, GLenum pname, GLint64EXT * params);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_770)(GLuint id, GLenum pname, GLint64EXT * params)
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_771)(GLuint id, GLenum pname, GLint64EXT * params)
{
DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_771)(GLuint id, GLenum pname, GLuint64EXT * params);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_772)(GLuint id, GLenum pname, GLuint64EXT * params);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_771)(GLuint id, GLenum pname, GLuint64EXT * params)
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_772)(GLuint id, GLenum pname, GLuint64EXT * params)
{
DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
@@ -6255,6 +6269,7 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(_dispatch_stub_769),
TABLE_ENTRY(_dispatch_stub_770),
TABLE_ENTRY(_dispatch_stub_771),
TABLE_ENTRY(_dispatch_stub_772),
/* A whole bunch of no-op functions. These might be called
* when someone tries to call a dynamically-registered
* extension function without a current rendering context.
+284 -278
View File
@@ -820,6 +820,7 @@ static const char gl_string_table[] =
"glIsRenderbufferEXT\0"
"glRenderbufferStorageEXT\0"
"glBlitFramebufferEXT\0"
"glStencilFuncSeparateATI\0"
"glProgramEnvParameters4fvEXT\0"
"glProgramLocalParameters4fvEXT\0"
"glGetQueryObjecti64vEXT\0"
@@ -915,6 +916,7 @@ static const char gl_string_table[] =
"glMultiTexCoord4iv\0"
"glMultiTexCoord4s\0"
"glMultiTexCoord4sv\0"
"glStencilOpSeparateATI\0"
"glLoadTransposeMatrixd\0"
"glLoadTransposeMatrixf\0"
"glMultTransposeMatrixd\0"
@@ -1147,6 +1149,7 @@ static const char gl_string_table[] =
#define gl_dispatch_stub_769 mgl_dispatch_stub_769
#define gl_dispatch_stub_770 mgl_dispatch_stub_770
#define gl_dispatch_stub_771 mgl_dispatch_stub_771
#define gl_dispatch_stub_772 mgl_dispatch_stub_772
#endif /* USE_MGL_NAMESPACE */
@@ -1197,6 +1200,7 @@ extern void gl_dispatch_stub_768(void);
extern void gl_dispatch_stub_769(void);
extern void gl_dispatch_stub_770(void);
extern void gl_dispatch_stub_771(void);
extern void gl_dispatch_stub_772(void);
#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */
static const glprocs_table_t static_functions[] = {
@@ -1968,284 +1972,286 @@ static const glprocs_table_t static_functions[] = {
NAME_FUNC_OFFSET(13404, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT),
NAME_FUNC_OFFSET(13424, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT),
NAME_FUNC_OFFSET(13449, gl_dispatch_stub_767, gl_dispatch_stub_767, NULL, _gloffset_BlitFramebufferEXT),
NAME_FUNC_OFFSET(13470, gl_dispatch_stub_768, gl_dispatch_stub_768, NULL, _gloffset_ProgramEnvParameters4fvEXT),
NAME_FUNC_OFFSET(13499, gl_dispatch_stub_769, gl_dispatch_stub_769, NULL, _gloffset_ProgramLocalParameters4fvEXT),
NAME_FUNC_OFFSET(13530, gl_dispatch_stub_770, gl_dispatch_stub_770, NULL, _gloffset_GetQueryObjecti64vEXT),
NAME_FUNC_OFFSET(13554, gl_dispatch_stub_771, gl_dispatch_stub_771, NULL, _gloffset_GetQueryObjectui64vEXT),
NAME_FUNC_OFFSET(13579, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
NAME_FUNC_OFFSET(13597, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
NAME_FUNC_OFFSET(13614, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
NAME_FUNC_OFFSET(13630, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident),
NAME_FUNC_OFFSET(13655, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
NAME_FUNC_OFFSET(13675, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
NAME_FUNC_OFFSET(13695, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
NAME_FUNC_OFFSET(13718, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
NAME_FUNC_OFFSET(13741, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures),
NAME_FUNC_OFFSET(13761, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures),
NAME_FUNC_OFFSET(13778, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
NAME_FUNC_OFFSET(13795, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture),
NAME_FUNC_OFFSET(13810, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
NAME_FUNC_OFFSET(13834, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
NAME_FUNC_OFFSET(13853, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
NAME_FUNC_OFFSET(13872, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
NAME_FUNC_OFFSET(13888, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
NAME_FUNC_OFFSET(13907, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
NAME_FUNC_OFFSET(13930, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
NAME_FUNC_OFFSET(13946, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
NAME_FUNC_OFFSET(13962, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
NAME_FUNC_OFFSET(13989, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
NAME_FUNC_OFFSET(14016, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
NAME_FUNC_OFFSET(14036, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
NAME_FUNC_OFFSET(14055, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
NAME_FUNC_OFFSET(14074, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
NAME_FUNC_OFFSET(14104, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
NAME_FUNC_OFFSET(14134, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
NAME_FUNC_OFFSET(14164, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
NAME_FUNC_OFFSET(14194, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
NAME_FUNC_OFFSET(14213, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
NAME_FUNC_OFFSET(14236, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
NAME_FUNC_OFFSET(14261, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
NAME_FUNC_OFFSET(14286, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
NAME_FUNC_OFFSET(14313, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
NAME_FUNC_OFFSET(14341, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
NAME_FUNC_OFFSET(14368, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
NAME_FUNC_OFFSET(14396, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
NAME_FUNC_OFFSET(14425, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
NAME_FUNC_OFFSET(14454, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter),
NAME_FUNC_OFFSET(14480, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv),
NAME_FUNC_OFFSET(14511, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv),
NAME_FUNC_OFFSET(14542, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter),
NAME_FUNC_OFFSET(14566, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
NAME_FUNC_OFFSET(14589, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram),
NAME_FUNC_OFFSET(14607, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv),
NAME_FUNC_OFFSET(14636, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv),
NAME_FUNC_OFFSET(14665, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax),
NAME_FUNC_OFFSET(14680, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv),
NAME_FUNC_OFFSET(14706, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv),
NAME_FUNC_OFFSET(14732, glHistogram, glHistogram, NULL, _gloffset_Histogram),
NAME_FUNC_OFFSET(14747, glMinmax, glMinmax, NULL, _gloffset_Minmax),
NAME_FUNC_OFFSET(14759, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
NAME_FUNC_OFFSET(14779, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
NAME_FUNC_OFFSET(14796, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
NAME_FUNC_OFFSET(14812, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
NAME_FUNC_OFFSET(14831, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
NAME_FUNC_OFFSET(14854, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
NAME_FUNC_OFFSET(14870, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
NAME_FUNC_OFFSET(14892, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
NAME_FUNC_OFFSET(14910, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
NAME_FUNC_OFFSET(14929, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
NAME_FUNC_OFFSET(14947, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
NAME_FUNC_OFFSET(14966, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
NAME_FUNC_OFFSET(14984, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
NAME_FUNC_OFFSET(15003, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
NAME_FUNC_OFFSET(15021, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
NAME_FUNC_OFFSET(15040, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
NAME_FUNC_OFFSET(15058, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
NAME_FUNC_OFFSET(15077, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
NAME_FUNC_OFFSET(15095, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
NAME_FUNC_OFFSET(15114, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
NAME_FUNC_OFFSET(15132, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
NAME_FUNC_OFFSET(15151, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
NAME_FUNC_OFFSET(15169, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
NAME_FUNC_OFFSET(15188, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
NAME_FUNC_OFFSET(15206, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
NAME_FUNC_OFFSET(15225, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
NAME_FUNC_OFFSET(15243, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
NAME_FUNC_OFFSET(15262, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
NAME_FUNC_OFFSET(15280, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
NAME_FUNC_OFFSET(15299, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
NAME_FUNC_OFFSET(15317, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
NAME_FUNC_OFFSET(15336, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
NAME_FUNC_OFFSET(15354, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
NAME_FUNC_OFFSET(15373, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
NAME_FUNC_OFFSET(15391, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
NAME_FUNC_OFFSET(15410, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
NAME_FUNC_OFFSET(15428, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
NAME_FUNC_OFFSET(15447, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
NAME_FUNC_OFFSET(15465, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
NAME_FUNC_OFFSET(15484, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
NAME_FUNC_OFFSET(15507, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
NAME_FUNC_OFFSET(15530, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
NAME_FUNC_OFFSET(15553, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
NAME_FUNC_OFFSET(15576, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
NAME_FUNC_OFFSET(15593, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
NAME_FUNC_OFFSET(15616, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
NAME_FUNC_OFFSET(15639, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
NAME_FUNC_OFFSET(15662, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
NAME_FUNC_OFFSET(15688, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
NAME_FUNC_OFFSET(15714, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
NAME_FUNC_OFFSET(15740, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
NAME_FUNC_OFFSET(15764, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
NAME_FUNC_OFFSET(15791, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
NAME_FUNC_OFFSET(15817, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
NAME_FUNC_OFFSET(15837, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
NAME_FUNC_OFFSET(15857, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
NAME_FUNC_OFFSET(15877, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
NAME_FUNC_OFFSET(15894, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
NAME_FUNC_OFFSET(15912, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
NAME_FUNC_OFFSET(15929, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
NAME_FUNC_OFFSET(15947, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
NAME_FUNC_OFFSET(15964, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
NAME_FUNC_OFFSET(15982, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
NAME_FUNC_OFFSET(15999, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
NAME_FUNC_OFFSET(16017, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
NAME_FUNC_OFFSET(16034, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
NAME_FUNC_OFFSET(16052, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
NAME_FUNC_OFFSET(16069, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
NAME_FUNC_OFFSET(16087, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
NAME_FUNC_OFFSET(16104, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
NAME_FUNC_OFFSET(16122, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
NAME_FUNC_OFFSET(16139, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
NAME_FUNC_OFFSET(16157, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
NAME_FUNC_OFFSET(16174, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
NAME_FUNC_OFFSET(16192, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
NAME_FUNC_OFFSET(16211, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
NAME_FUNC_OFFSET(16230, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
NAME_FUNC_OFFSET(16249, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
NAME_FUNC_OFFSET(16268, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
NAME_FUNC_OFFSET(16288, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
NAME_FUNC_OFFSET(16308, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
NAME_FUNC_OFFSET(16328, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
NAME_FUNC_OFFSET(16346, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
NAME_FUNC_OFFSET(16363, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
NAME_FUNC_OFFSET(16381, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
NAME_FUNC_OFFSET(16398, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
NAME_FUNC_OFFSET(16416, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
NAME_FUNC_OFFSET(16434, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
NAME_FUNC_OFFSET(16451, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
NAME_FUNC_OFFSET(16469, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
NAME_FUNC_OFFSET(16488, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
NAME_FUNC_OFFSET(16507, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
NAME_FUNC_OFFSET(16526, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
NAME_FUNC_OFFSET(16548, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
NAME_FUNC_OFFSET(16561, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
NAME_FUNC_OFFSET(16574, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
NAME_FUNC_OFFSET(16590, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
NAME_FUNC_OFFSET(16606, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
NAME_FUNC_OFFSET(16619, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
NAME_FUNC_OFFSET(16642, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
NAME_FUNC_OFFSET(16662, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
NAME_FUNC_OFFSET(16681, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
NAME_FUNC_OFFSET(16692, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
NAME_FUNC_OFFSET(16704, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
NAME_FUNC_OFFSET(16718, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
NAME_FUNC_OFFSET(16731, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
NAME_FUNC_OFFSET(16747, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
NAME_FUNC_OFFSET(16758, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
NAME_FUNC_OFFSET(16771, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
NAME_FUNC_OFFSET(16790, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
NAME_FUNC_OFFSET(16810, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
NAME_FUNC_OFFSET(16823, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
NAME_FUNC_OFFSET(16833, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
NAME_FUNC_OFFSET(16849, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
NAME_FUNC_OFFSET(16868, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
NAME_FUNC_OFFSET(16886, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
NAME_FUNC_OFFSET(16907, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
NAME_FUNC_OFFSET(16922, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
NAME_FUNC_OFFSET(16937, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
NAME_FUNC_OFFSET(16951, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
NAME_FUNC_OFFSET(16966, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
NAME_FUNC_OFFSET(16978, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
NAME_FUNC_OFFSET(16991, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
NAME_FUNC_OFFSET(17003, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
NAME_FUNC_OFFSET(17016, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
NAME_FUNC_OFFSET(17028, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
NAME_FUNC_OFFSET(17041, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
NAME_FUNC_OFFSET(17053, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
NAME_FUNC_OFFSET(17066, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
NAME_FUNC_OFFSET(17078, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
NAME_FUNC_OFFSET(17091, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
NAME_FUNC_OFFSET(17103, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
NAME_FUNC_OFFSET(17116, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
NAME_FUNC_OFFSET(17128, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
NAME_FUNC_OFFSET(17141, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
NAME_FUNC_OFFSET(17153, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
NAME_FUNC_OFFSET(17166, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
NAME_FUNC_OFFSET(17185, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
NAME_FUNC_OFFSET(17204, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
NAME_FUNC_OFFSET(17223, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
NAME_FUNC_OFFSET(17236, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
NAME_FUNC_OFFSET(17254, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
NAME_FUNC_OFFSET(17275, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
NAME_FUNC_OFFSET(17293, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
NAME_FUNC_OFFSET(17313, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
NAME_FUNC_OFFSET(17327, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
NAME_FUNC_OFFSET(17344, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS),
NAME_FUNC_OFFSET(17360, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS),
NAME_FUNC_OFFSET(17379, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
NAME_FUNC_OFFSET(17397, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
NAME_FUNC_OFFSET(17418, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
NAME_FUNC_OFFSET(17440, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
NAME_FUNC_OFFSET(17459, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
NAME_FUNC_OFFSET(17481, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
NAME_FUNC_OFFSET(17504, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
NAME_FUNC_OFFSET(17523, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
NAME_FUNC_OFFSET(17543, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
NAME_FUNC_OFFSET(17562, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
NAME_FUNC_OFFSET(17582, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
NAME_FUNC_OFFSET(17601, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
NAME_FUNC_OFFSET(17621, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
NAME_FUNC_OFFSET(17640, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
NAME_FUNC_OFFSET(17660, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
NAME_FUNC_OFFSET(17679, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
NAME_FUNC_OFFSET(17699, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
NAME_FUNC_OFFSET(17719, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
NAME_FUNC_OFFSET(17740, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
NAME_FUNC_OFFSET(17760, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
NAME_FUNC_OFFSET(17781, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
NAME_FUNC_OFFSET(17801, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
NAME_FUNC_OFFSET(17822, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
NAME_FUNC_OFFSET(17846, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
NAME_FUNC_OFFSET(17864, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
NAME_FUNC_OFFSET(17884, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
NAME_FUNC_OFFSET(17902, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
NAME_FUNC_OFFSET(17914, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
NAME_FUNC_OFFSET(17927, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
NAME_FUNC_OFFSET(17939, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
NAME_FUNC_OFFSET(17952, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
NAME_FUNC_OFFSET(17972, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
NAME_FUNC_OFFSET(17996, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
NAME_FUNC_OFFSET(18010, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
NAME_FUNC_OFFSET(18027, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
NAME_FUNC_OFFSET(18042, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
NAME_FUNC_OFFSET(18060, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
NAME_FUNC_OFFSET(18074, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
NAME_FUNC_OFFSET(18091, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
NAME_FUNC_OFFSET(18106, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
NAME_FUNC_OFFSET(18124, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
NAME_FUNC_OFFSET(18138, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
NAME_FUNC_OFFSET(18155, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
NAME_FUNC_OFFSET(18170, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
NAME_FUNC_OFFSET(18188, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
NAME_FUNC_OFFSET(18202, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
NAME_FUNC_OFFSET(18219, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
NAME_FUNC_OFFSET(18234, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
NAME_FUNC_OFFSET(18252, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
NAME_FUNC_OFFSET(18266, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
NAME_FUNC_OFFSET(18283, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
NAME_FUNC_OFFSET(18298, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
NAME_FUNC_OFFSET(18316, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
NAME_FUNC_OFFSET(18330, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
NAME_FUNC_OFFSET(18347, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
NAME_FUNC_OFFSET(18362, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
NAME_FUNC_OFFSET(18380, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
NAME_FUNC_OFFSET(18394, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
NAME_FUNC_OFFSET(18411, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
NAME_FUNC_OFFSET(18426, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
NAME_FUNC_OFFSET(18444, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
NAME_FUNC_OFFSET(18458, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
NAME_FUNC_OFFSET(18475, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
NAME_FUNC_OFFSET(18490, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
NAME_FUNC_OFFSET(18508, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
NAME_FUNC_OFFSET(18525, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
NAME_FUNC_OFFSET(18545, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
NAME_FUNC_OFFSET(18562, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
NAME_FUNC_OFFSET(18588, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
NAME_FUNC_OFFSET(18617, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
NAME_FUNC_OFFSET(18632, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
NAME_FUNC_OFFSET(18650, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
NAME_FUNC_OFFSET(18669, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT),
NAME_FUNC_OFFSET(18693, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT),
NAME_FUNC_OFFSET(13470, gl_dispatch_stub_768, gl_dispatch_stub_768, NULL, _gloffset_StencilFuncSeparateATI),
NAME_FUNC_OFFSET(13495, gl_dispatch_stub_769, gl_dispatch_stub_769, NULL, _gloffset_ProgramEnvParameters4fvEXT),
NAME_FUNC_OFFSET(13524, gl_dispatch_stub_770, gl_dispatch_stub_770, NULL, _gloffset_ProgramLocalParameters4fvEXT),
NAME_FUNC_OFFSET(13555, gl_dispatch_stub_771, gl_dispatch_stub_771, NULL, _gloffset_GetQueryObjecti64vEXT),
NAME_FUNC_OFFSET(13579, gl_dispatch_stub_772, gl_dispatch_stub_772, NULL, _gloffset_GetQueryObjectui64vEXT),
NAME_FUNC_OFFSET(13604, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
NAME_FUNC_OFFSET(13622, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
NAME_FUNC_OFFSET(13639, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
NAME_FUNC_OFFSET(13655, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident),
NAME_FUNC_OFFSET(13680, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
NAME_FUNC_OFFSET(13700, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
NAME_FUNC_OFFSET(13720, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
NAME_FUNC_OFFSET(13743, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
NAME_FUNC_OFFSET(13766, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures),
NAME_FUNC_OFFSET(13786, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures),
NAME_FUNC_OFFSET(13803, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
NAME_FUNC_OFFSET(13820, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture),
NAME_FUNC_OFFSET(13835, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
NAME_FUNC_OFFSET(13859, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
NAME_FUNC_OFFSET(13878, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
NAME_FUNC_OFFSET(13897, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
NAME_FUNC_OFFSET(13913, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
NAME_FUNC_OFFSET(13932, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
NAME_FUNC_OFFSET(13955, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
NAME_FUNC_OFFSET(13971, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
NAME_FUNC_OFFSET(13987, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
NAME_FUNC_OFFSET(14014, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
NAME_FUNC_OFFSET(14041, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
NAME_FUNC_OFFSET(14061, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
NAME_FUNC_OFFSET(14080, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
NAME_FUNC_OFFSET(14099, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
NAME_FUNC_OFFSET(14129, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
NAME_FUNC_OFFSET(14159, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
NAME_FUNC_OFFSET(14189, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
NAME_FUNC_OFFSET(14219, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
NAME_FUNC_OFFSET(14238, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
NAME_FUNC_OFFSET(14261, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
NAME_FUNC_OFFSET(14286, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
NAME_FUNC_OFFSET(14311, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
NAME_FUNC_OFFSET(14338, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
NAME_FUNC_OFFSET(14366, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
NAME_FUNC_OFFSET(14393, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
NAME_FUNC_OFFSET(14421, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
NAME_FUNC_OFFSET(14450, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
NAME_FUNC_OFFSET(14479, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter),
NAME_FUNC_OFFSET(14505, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv),
NAME_FUNC_OFFSET(14536, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv),
NAME_FUNC_OFFSET(14567, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter),
NAME_FUNC_OFFSET(14591, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
NAME_FUNC_OFFSET(14614, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram),
NAME_FUNC_OFFSET(14632, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv),
NAME_FUNC_OFFSET(14661, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv),
NAME_FUNC_OFFSET(14690, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax),
NAME_FUNC_OFFSET(14705, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv),
NAME_FUNC_OFFSET(14731, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv),
NAME_FUNC_OFFSET(14757, glHistogram, glHistogram, NULL, _gloffset_Histogram),
NAME_FUNC_OFFSET(14772, glMinmax, glMinmax, NULL, _gloffset_Minmax),
NAME_FUNC_OFFSET(14784, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
NAME_FUNC_OFFSET(14804, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
NAME_FUNC_OFFSET(14821, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
NAME_FUNC_OFFSET(14837, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
NAME_FUNC_OFFSET(14856, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
NAME_FUNC_OFFSET(14879, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
NAME_FUNC_OFFSET(14895, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
NAME_FUNC_OFFSET(14917, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
NAME_FUNC_OFFSET(14935, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
NAME_FUNC_OFFSET(14954, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
NAME_FUNC_OFFSET(14972, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
NAME_FUNC_OFFSET(14991, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
NAME_FUNC_OFFSET(15009, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
NAME_FUNC_OFFSET(15028, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
NAME_FUNC_OFFSET(15046, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
NAME_FUNC_OFFSET(15065, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
NAME_FUNC_OFFSET(15083, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
NAME_FUNC_OFFSET(15102, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
NAME_FUNC_OFFSET(15120, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
NAME_FUNC_OFFSET(15139, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
NAME_FUNC_OFFSET(15157, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
NAME_FUNC_OFFSET(15176, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
NAME_FUNC_OFFSET(15194, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
NAME_FUNC_OFFSET(15213, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
NAME_FUNC_OFFSET(15231, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
NAME_FUNC_OFFSET(15250, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
NAME_FUNC_OFFSET(15268, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
NAME_FUNC_OFFSET(15287, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
NAME_FUNC_OFFSET(15305, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
NAME_FUNC_OFFSET(15324, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
NAME_FUNC_OFFSET(15342, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
NAME_FUNC_OFFSET(15361, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
NAME_FUNC_OFFSET(15379, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
NAME_FUNC_OFFSET(15398, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
NAME_FUNC_OFFSET(15416, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
NAME_FUNC_OFFSET(15435, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
NAME_FUNC_OFFSET(15453, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
NAME_FUNC_OFFSET(15472, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
NAME_FUNC_OFFSET(15490, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
NAME_FUNC_OFFSET(15509, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate),
NAME_FUNC_OFFSET(15532, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
NAME_FUNC_OFFSET(15555, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
NAME_FUNC_OFFSET(15578, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
NAME_FUNC_OFFSET(15601, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
NAME_FUNC_OFFSET(15624, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
NAME_FUNC_OFFSET(15641, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
NAME_FUNC_OFFSET(15664, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
NAME_FUNC_OFFSET(15687, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
NAME_FUNC_OFFSET(15710, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
NAME_FUNC_OFFSET(15736, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
NAME_FUNC_OFFSET(15762, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
NAME_FUNC_OFFSET(15788, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
NAME_FUNC_OFFSET(15812, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
NAME_FUNC_OFFSET(15839, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
NAME_FUNC_OFFSET(15865, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
NAME_FUNC_OFFSET(15885, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
NAME_FUNC_OFFSET(15905, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
NAME_FUNC_OFFSET(15925, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
NAME_FUNC_OFFSET(15942, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
NAME_FUNC_OFFSET(15960, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
NAME_FUNC_OFFSET(15977, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
NAME_FUNC_OFFSET(15995, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
NAME_FUNC_OFFSET(16012, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
NAME_FUNC_OFFSET(16030, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
NAME_FUNC_OFFSET(16047, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
NAME_FUNC_OFFSET(16065, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
NAME_FUNC_OFFSET(16082, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
NAME_FUNC_OFFSET(16100, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
NAME_FUNC_OFFSET(16117, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
NAME_FUNC_OFFSET(16135, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
NAME_FUNC_OFFSET(16152, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
NAME_FUNC_OFFSET(16170, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
NAME_FUNC_OFFSET(16187, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
NAME_FUNC_OFFSET(16205, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
NAME_FUNC_OFFSET(16222, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
NAME_FUNC_OFFSET(16240, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
NAME_FUNC_OFFSET(16259, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
NAME_FUNC_OFFSET(16278, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
NAME_FUNC_OFFSET(16297, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
NAME_FUNC_OFFSET(16316, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
NAME_FUNC_OFFSET(16336, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
NAME_FUNC_OFFSET(16356, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
NAME_FUNC_OFFSET(16376, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
NAME_FUNC_OFFSET(16394, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
NAME_FUNC_OFFSET(16411, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
NAME_FUNC_OFFSET(16429, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
NAME_FUNC_OFFSET(16446, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
NAME_FUNC_OFFSET(16464, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
NAME_FUNC_OFFSET(16482, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
NAME_FUNC_OFFSET(16499, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
NAME_FUNC_OFFSET(16517, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
NAME_FUNC_OFFSET(16536, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
NAME_FUNC_OFFSET(16555, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
NAME_FUNC_OFFSET(16574, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
NAME_FUNC_OFFSET(16596, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
NAME_FUNC_OFFSET(16609, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
NAME_FUNC_OFFSET(16622, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
NAME_FUNC_OFFSET(16638, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
NAME_FUNC_OFFSET(16654, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
NAME_FUNC_OFFSET(16667, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
NAME_FUNC_OFFSET(16690, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
NAME_FUNC_OFFSET(16710, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
NAME_FUNC_OFFSET(16729, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
NAME_FUNC_OFFSET(16740, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
NAME_FUNC_OFFSET(16752, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
NAME_FUNC_OFFSET(16766, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
NAME_FUNC_OFFSET(16779, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
NAME_FUNC_OFFSET(16795, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
NAME_FUNC_OFFSET(16806, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
NAME_FUNC_OFFSET(16819, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
NAME_FUNC_OFFSET(16838, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
NAME_FUNC_OFFSET(16858, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
NAME_FUNC_OFFSET(16871, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
NAME_FUNC_OFFSET(16881, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
NAME_FUNC_OFFSET(16897, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
NAME_FUNC_OFFSET(16916, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
NAME_FUNC_OFFSET(16934, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
NAME_FUNC_OFFSET(16955, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
NAME_FUNC_OFFSET(16970, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
NAME_FUNC_OFFSET(16985, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
NAME_FUNC_OFFSET(16999, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
NAME_FUNC_OFFSET(17014, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
NAME_FUNC_OFFSET(17026, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
NAME_FUNC_OFFSET(17039, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
NAME_FUNC_OFFSET(17051, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
NAME_FUNC_OFFSET(17064, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
NAME_FUNC_OFFSET(17076, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
NAME_FUNC_OFFSET(17089, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
NAME_FUNC_OFFSET(17101, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
NAME_FUNC_OFFSET(17114, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
NAME_FUNC_OFFSET(17126, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
NAME_FUNC_OFFSET(17139, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
NAME_FUNC_OFFSET(17151, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
NAME_FUNC_OFFSET(17164, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
NAME_FUNC_OFFSET(17176, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
NAME_FUNC_OFFSET(17189, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
NAME_FUNC_OFFSET(17201, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
NAME_FUNC_OFFSET(17214, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
NAME_FUNC_OFFSET(17233, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
NAME_FUNC_OFFSET(17252, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
NAME_FUNC_OFFSET(17271, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
NAME_FUNC_OFFSET(17284, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
NAME_FUNC_OFFSET(17302, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
NAME_FUNC_OFFSET(17323, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
NAME_FUNC_OFFSET(17341, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
NAME_FUNC_OFFSET(17361, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
NAME_FUNC_OFFSET(17375, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
NAME_FUNC_OFFSET(17392, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS),
NAME_FUNC_OFFSET(17408, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS),
NAME_FUNC_OFFSET(17427, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
NAME_FUNC_OFFSET(17445, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
NAME_FUNC_OFFSET(17466, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
NAME_FUNC_OFFSET(17488, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
NAME_FUNC_OFFSET(17507, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
NAME_FUNC_OFFSET(17529, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
NAME_FUNC_OFFSET(17552, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
NAME_FUNC_OFFSET(17571, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
NAME_FUNC_OFFSET(17591, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
NAME_FUNC_OFFSET(17610, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
NAME_FUNC_OFFSET(17630, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
NAME_FUNC_OFFSET(17649, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
NAME_FUNC_OFFSET(17669, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
NAME_FUNC_OFFSET(17688, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
NAME_FUNC_OFFSET(17708, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
NAME_FUNC_OFFSET(17727, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
NAME_FUNC_OFFSET(17747, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
NAME_FUNC_OFFSET(17767, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
NAME_FUNC_OFFSET(17788, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
NAME_FUNC_OFFSET(17808, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
NAME_FUNC_OFFSET(17829, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
NAME_FUNC_OFFSET(17849, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
NAME_FUNC_OFFSET(17870, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
NAME_FUNC_OFFSET(17894, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
NAME_FUNC_OFFSET(17912, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
NAME_FUNC_OFFSET(17932, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
NAME_FUNC_OFFSET(17950, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
NAME_FUNC_OFFSET(17962, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
NAME_FUNC_OFFSET(17975, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
NAME_FUNC_OFFSET(17987, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
NAME_FUNC_OFFSET(18000, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
NAME_FUNC_OFFSET(18020, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
NAME_FUNC_OFFSET(18044, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
NAME_FUNC_OFFSET(18058, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
NAME_FUNC_OFFSET(18075, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
NAME_FUNC_OFFSET(18090, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
NAME_FUNC_OFFSET(18108, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
NAME_FUNC_OFFSET(18122, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
NAME_FUNC_OFFSET(18139, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
NAME_FUNC_OFFSET(18154, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
NAME_FUNC_OFFSET(18172, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
NAME_FUNC_OFFSET(18186, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
NAME_FUNC_OFFSET(18203, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
NAME_FUNC_OFFSET(18218, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
NAME_FUNC_OFFSET(18236, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
NAME_FUNC_OFFSET(18250, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
NAME_FUNC_OFFSET(18267, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
NAME_FUNC_OFFSET(18282, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
NAME_FUNC_OFFSET(18300, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
NAME_FUNC_OFFSET(18314, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
NAME_FUNC_OFFSET(18331, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
NAME_FUNC_OFFSET(18346, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
NAME_FUNC_OFFSET(18364, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
NAME_FUNC_OFFSET(18378, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
NAME_FUNC_OFFSET(18395, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
NAME_FUNC_OFFSET(18410, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
NAME_FUNC_OFFSET(18428, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
NAME_FUNC_OFFSET(18442, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
NAME_FUNC_OFFSET(18459, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
NAME_FUNC_OFFSET(18474, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
NAME_FUNC_OFFSET(18492, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
NAME_FUNC_OFFSET(18506, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
NAME_FUNC_OFFSET(18523, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
NAME_FUNC_OFFSET(18538, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
NAME_FUNC_OFFSET(18556, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
NAME_FUNC_OFFSET(18573, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
NAME_FUNC_OFFSET(18593, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
NAME_FUNC_OFFSET(18610, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
NAME_FUNC_OFFSET(18636, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
NAME_FUNC_OFFSET(18665, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
NAME_FUNC_OFFSET(18680, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
NAME_FUNC_OFFSET(18698, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
NAME_FUNC_OFFSET(18717, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT),
NAME_FUNC_OFFSET(18741, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT),
NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
};
+86 -64
View File
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
* Version: 7.0.1
* Version: 7.0.2
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -30,6 +30,55 @@
#include "state.h"
/**
* Find the max index in the given element/index buffer
*/
static GLuint
max_buffer_index(GLcontext *ctx, GLuint count, GLenum type,
const void *indices,
struct gl_buffer_object *elementBuf)
{
const GLubyte *map = NULL;
GLuint max = 0;
GLint i;
if (elementBuf->Name) {
/* elements are in a user-defined buffer object. need to map it */
map = ctx->Driver.MapBuffer(ctx,
GL_ELEMENT_ARRAY_BUFFER_ARB,
GL_READ_ONLY,
elementBuf);
/* Actual address is the sum of pointers */
indices = (const GLvoid *) ADD_POINTERS(map, (const GLubyte *) indices);
}
if (type == GL_UNSIGNED_INT) {
for (i = 0; i < count; i++)
if (((GLuint *) indices)[i] > max)
max = ((GLuint *) indices)[i];
}
else if (type == GL_UNSIGNED_SHORT) {
for (i = 0; i < count; i++)
if (((GLushort *) indices)[i] > max)
max = ((GLushort *) indices)[i];
}
else {
ASSERT(type == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++)
if (((GLubyte *) indices)[i] > max)
max = ((GLubyte *) indices)[i];
}
if (map) {
ctx->Driver.UnmapBuffer(ctx,
GL_ELEMENT_ARRAY_BUFFER_ARB,
ctx->Array.ElementArrayBufferObj);
}
return max;
}
GLboolean
_mesa_validate_DrawElements(GLcontext *ctx,
GLenum mode, GLsizei count, GLenum type,
@@ -61,20 +110,15 @@ _mesa_validate_DrawElements(GLcontext *ctx,
/* Always need vertex positions */
if (!ctx->Array.ArrayObj->Vertex.Enabled
&& !(ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
&& !(ctx->VertexProgram._Enabled
&& ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
return GL_FALSE;
/* Vertex buffer object tests */
if (ctx->Array.ElementArrayBufferObj->Name) {
/* use indices in the buffer object */
GLuint indexBytes;
/* use indices in the buffer object */
if (!ctx->Array.ElementArrayBufferObj->Data) {
_mesa_warning(ctx, "DrawElements with empty vertex elements buffer!");
return GL_FALSE;
}
/* make sure count doesn't go outside buffer bounds */
if (type == GL_UNSIGNED_INT) {
indexBytes = count * sizeof(GLuint);
}
@@ -86,19 +130,11 @@ _mesa_validate_DrawElements(GLcontext *ctx,
indexBytes = count * sizeof(GLushort);
}
if ((GLubyte *) indices + indexBytes >
ctx->Array.ElementArrayBufferObj->Data +
ctx->Array.ElementArrayBufferObj->Size) {
/* make sure count doesn't go outside buffer bounds */
if (indexBytes > ctx->Array.ElementArrayBufferObj->Size) {
_mesa_warning(ctx, "glDrawElements index out of buffer bounds");
return GL_FALSE;
}
/* Actual address is the sum of pointers. Indices may be used below. */
if (ctx->Const.CheckArrayBounds) {
indices = (const GLvoid *)
ADD_POINTERS(ctx->Array.ElementArrayBufferObj->Data,
(const GLubyte *) indices);
}
}
else {
/* not using a VBO */
@@ -108,24 +144,8 @@ _mesa_validate_DrawElements(GLcontext *ctx,
if (ctx->Const.CheckArrayBounds) {
/* find max array index */
GLuint max = 0;
GLint i;
if (type == GL_UNSIGNED_INT) {
for (i = 0; i < count; i++)
if (((GLuint *) indices)[i] > max)
max = ((GLuint *) indices)[i];
}
else if (type == GL_UNSIGNED_SHORT) {
for (i = 0; i < count; i++)
if (((GLushort *) indices)[i] > max)
max = ((GLushort *) indices)[i];
}
else {
ASSERT(type == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++)
if (((GLubyte *) indices)[i] > max)
max = ((GLubyte *) indices)[i];
}
GLuint max = max_buffer_index(ctx, count, type, indices,
ctx->Array.ElementArrayBufferObj);
if (max >= ctx->Array._MaxElement) {
/* the max element is out of bounds of one or more enabled arrays */
return GL_FALSE;
@@ -172,41 +192,41 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
/* Always need vertex positions */
if (!ctx->Array.ArrayObj->Vertex.Enabled
&& !(ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
&& !(ctx->VertexProgram._Enabled
&& ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
return GL_FALSE;
/* Vertex buffer object tests */
if (ctx->Array.ElementArrayBufferObj->Name) {
/* XXX re-use code from above? */
/* use indices in the buffer object */
GLuint indexBytes;
if (type == GL_UNSIGNED_INT) {
indexBytes = count * sizeof(GLuint);
}
else if (type == GL_UNSIGNED_BYTE) {
indexBytes = count * sizeof(GLubyte);
}
else {
ASSERT(type == GL_UNSIGNED_SHORT);
indexBytes = count * sizeof(GLushort);
}
/* make sure count doesn't go outside buffer bounds */
if (indexBytes > ctx->Array.ElementArrayBufferObj->Size) {
_mesa_warning(ctx, "glDrawRangeElements index out of buffer bounds");
return GL_FALSE;
}
}
else {
/* not using VBO */
/* not using a VBO */
if (!indices)
return GL_FALSE;
}
if (ctx->Const.CheckArrayBounds) {
/* Find max array index.
* We don't trust the user's start and end values.
*/
GLuint max = 0;
GLint i;
if (type == GL_UNSIGNED_INT) {
for (i = 0; i < count; i++)
if (((GLuint *) indices)[i] > max)
max = ((GLuint *) indices)[i];
}
else if (type == GL_UNSIGNED_SHORT) {
for (i = 0; i < count; i++)
if (((GLushort *) indices)[i] > max)
max = ((GLushort *) indices)[i];
}
else {
ASSERT(type == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++)
if (((GLubyte *) indices)[i] > max)
max = ((GLubyte *) indices)[i];
}
GLuint max = max_buffer_index(ctx, count, type, indices,
ctx->Array.ElementArrayBufferObj);
if (max >= ctx->Array._MaxElement) {
/* the max element is out of bounds of one or more enabled arrays */
return GL_FALSE;
@@ -227,8 +247,9 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
if (count < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" );
if (count <= 0) {
if (count < 0)
_mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" );
return GL_FALSE;
}
@@ -241,7 +262,8 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
_mesa_update_state(ctx);
/* Always need vertex positions */
if (!ctx->Array.ArrayObj->Vertex.Enabled && !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
if (!ctx->Array.ArrayObj->Vertex.Enabled
&& !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
return GL_FALSE;
if (ctx->Const.CheckArrayBounds) {
+139 -64
View File
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
* Version: 6.5.3
* Version: 7.0.2
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -51,6 +51,32 @@
#include "math/m_xform.h"
/**
* Special struct for saving/restoring texture state (GL_TEXTURE_BIT)
*/
struct texture_state
{
struct gl_texture_attrib Texture; /**< The usual context state */
/** to save per texture object state (wrap modes, filters, etc): */
struct gl_texture_object Saved1D[MAX_TEXTURE_UNITS];
struct gl_texture_object Saved2D[MAX_TEXTURE_UNITS];
struct gl_texture_object Saved3D[MAX_TEXTURE_UNITS];
struct gl_texture_object SavedCube[MAX_TEXTURE_UNITS];
struct gl_texture_object SavedRect[MAX_TEXTURE_UNITS];
/**
* To save references to texture objects (so they don't get accidentally
* deleted while saved in the attribute stack).
*/
struct gl_texture_object *SavedRef1D[MAX_TEXTURE_UNITS];
struct gl_texture_object *SavedRef2D[MAX_TEXTURE_UNITS];
struct gl_texture_object *SavedRef3D[MAX_TEXTURE_UNITS];
struct gl_texture_object *SavedRefCube[MAX_TEXTURE_UNITS];
struct gl_texture_object *SavedRefRect[MAX_TEXTURE_UNITS];
};
/**
* Allocate a new attribute state node. These nodes have a
* "kind" value and a pointer to a struct of state data.
@@ -335,40 +361,48 @@ _mesa_PushAttrib(GLbitfield mask)
}
if (mask & GL_TEXTURE_BIT) {
struct gl_texture_attrib *attr;
struct texture_state *texstate = CALLOC_STRUCT( texture_state );
GLuint u;
if (!texstate) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib(GL_TEXTURE_BIT)");
goto end;
}
_mesa_lock_context_textures(ctx);
/* Bump the texture object reference counts so that they don't
* inadvertantly get deleted.
/* copy/save the bulk of texture state here */
_mesa_memcpy(&texstate->Texture, &ctx->Texture, sizeof(ctx->Texture));
/* Save references to the currently bound texture objects so they don't
* accidentally get deleted while referenced in the attribute stack.
*/
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
ctx->Texture.Unit[u].Current1D->RefCount++;
ctx->Texture.Unit[u].Current2D->RefCount++;
ctx->Texture.Unit[u].Current3D->RefCount++;
ctx->Texture.Unit[u].CurrentCubeMap->RefCount++;
ctx->Texture.Unit[u].CurrentRect->RefCount++;
_mesa_reference_texobj(&texstate->SavedRef1D[u], ctx->Texture.Unit[u].Current1D);
_mesa_reference_texobj(&texstate->SavedRef2D[u], ctx->Texture.Unit[u].Current2D);
_mesa_reference_texobj(&texstate->SavedRef3D[u], ctx->Texture.Unit[u].Current3D);
_mesa_reference_texobj(&texstate->SavedRefCube[u], ctx->Texture.Unit[u].CurrentCubeMap);
_mesa_reference_texobj(&texstate->SavedRefRect[u], ctx->Texture.Unit[u].CurrentRect);
}
attr = MALLOC_STRUCT( gl_texture_attrib );
MEMCPY( attr, &ctx->Texture, sizeof(struct gl_texture_attrib) );
/* copy state of the currently bound texture objects */
/* copy state/contents of the currently bound texture objects */
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
_mesa_copy_texture_object(&attr->Unit[u].Saved1D,
attr->Unit[u].Current1D);
_mesa_copy_texture_object(&attr->Unit[u].Saved2D,
attr->Unit[u].Current2D);
_mesa_copy_texture_object(&attr->Unit[u].Saved3D,
attr->Unit[u].Current3D);
_mesa_copy_texture_object(&attr->Unit[u].SavedCubeMap,
attr->Unit[u].CurrentCubeMap);
_mesa_copy_texture_object(&attr->Unit[u].SavedRect,
attr->Unit[u].CurrentRect);
_mesa_copy_texture_object(&texstate->Saved1D[u],
ctx->Texture.Unit[u].Current1D);
_mesa_copy_texture_object(&texstate->Saved2D[u],
ctx->Texture.Unit[u].Current2D);
_mesa_copy_texture_object(&texstate->Saved3D[u],
ctx->Texture.Unit[u].Current3D);
_mesa_copy_texture_object(&texstate->SavedCube[u],
ctx->Texture.Unit[u].CurrentCubeMap);
_mesa_copy_texture_object(&texstate->SavedRect[u],
ctx->Texture.Unit[u].CurrentRect);
}
_mesa_unlock_context_textures(ctx);
newnode = new_attrib_node( GL_TEXTURE_BIT );
newnode->data = attr;
newnode->data = texstate;
newnode->next = head;
head = newnode;
}
@@ -404,6 +438,7 @@ _mesa_PushAttrib(GLbitfield mask)
head = newnode;
}
end:
ctx->AttribStack[ctx->AttribStackDepth] = head;
ctx->AttribStackDepth++;
}
@@ -613,14 +648,19 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
}
/**
* Pop/restore texture attribute/group state.
*/
static void
pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
pop_texture_group(GLcontext *ctx, struct texture_state *texstate)
{
GLuint u;
_mesa_lock_context_textures(ctx);
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
const struct gl_texture_unit *unit = &texAttrib->Unit[u];
GLuint i;
const struct gl_texture_unit *unit = &texstate->Texture.Unit[u];
GLuint tgt;
_mesa_ActiveTextureARB(GL_TEXTURE0_ARB + u);
_mesa_set_enable(ctx, GL_TEXTURE_1D,
@@ -713,41 +753,44 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
1 << unit->Combine.ScaleShiftA);
}
/* Restore texture object state */
for (i = 0; i < NUM_TEXTURE_TARGETS; i++) {
GLenum target = 0;
/* Restore texture object state for each target */
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
const struct gl_texture_object *obj = NULL;
GLfloat bordColor[4];
GLenum target;
switch (i) {
case 0:
target = GL_TEXTURE_1D;
obj = &unit->Saved1D;
switch (tgt) {
case TEXTURE_1D_INDEX:
obj = &texstate->Saved1D[u];
ASSERT(obj->Target == GL_TEXTURE_1D);
break;
case 1:
target = GL_TEXTURE_2D;
obj = &unit->Saved2D;
case TEXTURE_2D_INDEX:
obj = &texstate->Saved2D[u];
ASSERT(obj->Target == GL_TEXTURE_2D);
break;
case 2:
target = GL_TEXTURE_3D;
obj = &unit->Saved3D;
case TEXTURE_3D_INDEX:
obj = &texstate->Saved3D[u];
ASSERT(obj->Target == GL_TEXTURE_3D);
break;
case 3:
case TEXTURE_CUBE_INDEX:
if (!ctx->Extensions.ARB_texture_cube_map)
continue;
target = GL_TEXTURE_CUBE_MAP_ARB;
obj = &unit->SavedCubeMap;
obj = &texstate->SavedCube[u];
ASSERT(obj->Target == GL_TEXTURE_CUBE_MAP_ARB);
break;
case 4:
case TEXTURE_RECT_INDEX:
if (!ctx->Extensions.NV_texture_rectangle)
continue;
target = GL_TEXTURE_RECTANGLE_NV;
obj = &unit->SavedRect;
obj = &texstate->SavedRect[u];
ASSERT(obj->Target == GL_TEXTURE_RECTANGLE_NV);
break;
default:
; /* silence warnings */
_mesa_problem(ctx, "bad texture index in pop_texture_group");
continue;
}
target = obj->Target;
_mesa_BindTexture(target, obj->Name);
bordColor[0] = CHAN_TO_FLOAT(obj->BorderColor[0]);
@@ -782,23 +825,19 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
_mesa_TexParameterf(target, GL_SHADOW_AMBIENT_SGIX,
obj->ShadowAmbient);
}
}
}
_mesa_ActiveTextureARB(GL_TEXTURE0_ARB
+ texAttrib->CurrentUnit);
/* "un-bump" the texture object reference counts. We did that so they
* wouldn't inadvertantly get deleted while they were still referenced
* inside the attribute state stack.
*/
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
ctx->Texture.Unit[u].Current1D->RefCount--;
ctx->Texture.Unit[u].Current2D->RefCount--;
ctx->Texture.Unit[u].Current3D->RefCount--;
ctx->Texture.Unit[u].CurrentCubeMap->RefCount--;
ctx->Texture.Unit[u].CurrentRect->RefCount--;
/* remove saved references to the texture objects */
_mesa_reference_texobj(&texstate->SavedRef1D[u], NULL);
_mesa_reference_texobj(&texstate->SavedRef2D[u], NULL);
_mesa_reference_texobj(&texstate->SavedRef3D[u], NULL);
_mesa_reference_texobj(&texstate->SavedRefCube[u], NULL);
_mesa_reference_texobj(&texstate->SavedRefRect[u], NULL);
}
_mesa_ActiveTextureARB(GL_TEXTURE0_ARB + texstate->Texture.CurrentUnit);
_mesa_unlock_context_textures(ctx);
}
@@ -1067,7 +1106,8 @@ _mesa_PopAttrib(void)
(GLint) point->CoordReplace[u]);
}
_mesa_set_enable(ctx, GL_POINT_SPRITE_NV,point->PointSprite);
_mesa_PointParameteriNV(GL_POINT_SPRITE_R_MODE_NV,
if (ctx->Extensions.NV_point_sprite)
_mesa_PointParameteriNV(GL_POINT_SPRITE_R_MODE_NV,
ctx->Point.SpriteRMode);
_mesa_PointParameterfEXT(GL_POINT_SPRITE_COORD_ORIGIN,
(GLfloat)ctx->Point.SpriteOrigin);
@@ -1177,9 +1217,9 @@ _mesa_PopAttrib(void)
case GL_TEXTURE_BIT:
/* Take care of texture object reference counters */
{
const struct gl_texture_attrib *texture;
texture = (const struct gl_texture_attrib *) attr->data;
pop_texture_group(ctx, texture);
struct texture_state *texstate
= (struct texture_state *) attr->data;
pop_texture_group(ctx, texstate);
ctx->NewState |= _NEW_TEXTURE;
}
break;
@@ -1401,6 +1441,41 @@ _mesa_PopClientAttrib(void)
}
void
_mesa_free_attrib_data(GLcontext *ctx)
{
while (ctx->AttribStackDepth > 0) {
struct gl_attrib_node *attr, *next;
ctx->AttribStackDepth--;
attr = ctx->AttribStack[ctx->AttribStackDepth];
while (attr) {
if (attr->kind == GL_TEXTURE_BIT) {
struct texture_state *texstate = (struct texture_state*)attr->data;
GLuint u;
/* clear references to the saved texture objects */
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
_mesa_reference_texobj(&texstate->SavedRef1D[u], NULL);
_mesa_reference_texobj(&texstate->SavedRef2D[u], NULL);
_mesa_reference_texobj(&texstate->SavedRef3D[u], NULL);
_mesa_reference_texobj(&texstate->SavedRefCube[u], NULL);
_mesa_reference_texobj(&texstate->SavedRefRect[u], NULL);
}
}
else {
/* any other chunks of state that requires special handling? */
}
next = attr->next;
_mesa_free(attr->data);
_mesa_free(attr);
attr = next;
}
}
}
void _mesa_init_attrib( GLcontext *ctx )
{
/* Renderer and client attribute stacks */
+4
View File
@@ -58,10 +58,14 @@ _mesa_PopClientAttrib( void );
extern void
_mesa_init_attrib( GLcontext *ctx );
extern void
_mesa_free_attrib_data( GLcontext *ctx );
#else
/** No-op */
#define _mesa_init_attrib( c ) ((void)0)
#define _mesa_free_attrib_data( c ) ((void)0)
#endif
+65 -43
View File
@@ -6,7 +6,7 @@
/*
* Mesa 3-D graphics library
* Version: 7.0
* Version: 7.0.2
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -467,17 +467,12 @@ alloc_shared_state( GLcontext *ctx )
if (!ss->DefaultRect)
goto cleanup;
/* Effectively bind the default textures to all texture units */
ss->Default1D->RefCount += MAX_TEXTURE_IMAGE_UNITS;
ss->Default2D->RefCount += MAX_TEXTURE_IMAGE_UNITS;
ss->Default3D->RefCount += MAX_TEXTURE_IMAGE_UNITS;
ss->DefaultCubeMap->RefCount += MAX_TEXTURE_IMAGE_UNITS;
ss->DefaultRect->RefCount += MAX_TEXTURE_IMAGE_UNITS;
/* sanity check */
assert(ss->Default1D->RefCount == 1);
_glthread_INIT_MUTEX(ss->TexMutex);
ss->TextureStateStamp = 0;
#if FEATURE_EXT_framebuffer_object
ss->FrameBuffers = _mesa_NewHashTable();
if (!ss->FrameBuffers)
@@ -487,10 +482,9 @@ alloc_shared_state( GLcontext *ctx )
goto cleanup;
#endif
return GL_TRUE;
cleanup:
cleanup:
/* Ran out of memory at some point. Free everything and return NULL */
if (ss->DisplayList)
_mesa_DeleteHashTable(ss->DisplayList);
@@ -634,6 +628,33 @@ delete_shader_cb(GLuint id, void *data, void *userData)
}
}
/**
* Callback for deleting a framebuffer object. Called by _mesa_HashDeleteAll()
*/
static void
delete_framebuffer_cb(GLuint id, void *data, void *userData)
{
struct gl_framebuffer *fb = (struct gl_framebuffer *) data;
/* The fact that the framebuffer is in the hashtable means its refcount
* is one, but we're removing from the hashtable now. So clear refcount.
*/
/*assert(fb->RefCount == 1);*/
fb->RefCount = 0;
fb->Delete(fb);
}
/**
* Callback for deleting a renderbuffer object. Called by _mesa_HashDeleteAll()
*/
static void
delete_renderbuffer_cb(GLuint id, void *data, void *userData)
{
struct gl_renderbuffer *rb = (struct gl_renderbuffer *) data;
rb->RefCount = 0; /* see comment for FBOs above */
rb->Delete(rb);
}
/**
* Deallocate a shared state object and all children structures.
@@ -656,20 +677,6 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
_mesa_HashDeleteAll(ss->DisplayList, delete_displaylist_cb, ctx);
_mesa_DeleteHashTable(ss->DisplayList);
/*
* Free texture objects
*/
ASSERT(ctx->Driver.DeleteTexture);
/* the default textures */
ctx->Driver.DeleteTexture(ctx, ss->Default1D);
ctx->Driver.DeleteTexture(ctx, ss->Default2D);
ctx->Driver.DeleteTexture(ctx, ss->Default3D);
ctx->Driver.DeleteTexture(ctx, ss->DefaultCubeMap);
ctx->Driver.DeleteTexture(ctx, ss->DefaultRect);
/* all other textures */
_mesa_HashDeleteAll(ss->TexObjects, delete_texture_cb, ctx);
_mesa_DeleteHashTable(ss->TexObjects);
#if defined(FEATURE_NV_vertex_program) || defined(FEATURE_NV_fragment_program)
_mesa_HashDeleteAll(ss->Programs, delete_program_cb, ctx);
_mesa_DeleteHashTable(ss->Programs);
@@ -701,10 +708,27 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
#endif
#if FEATURE_EXT_framebuffer_object
_mesa_HashDeleteAll(ss->FrameBuffers, delete_framebuffer_cb, ctx);
_mesa_DeleteHashTable(ss->FrameBuffers);
_mesa_HashDeleteAll(ss->RenderBuffers, delete_renderbuffer_cb, ctx);
_mesa_DeleteHashTable(ss->RenderBuffers);
#endif
/*
* Free texture objects (after FBOs since some textures might have
* been bound to FBOs).
*/
ASSERT(ctx->Driver.DeleteTexture);
/* the default textures */
ctx->Driver.DeleteTexture(ctx, ss->Default1D);
ctx->Driver.DeleteTexture(ctx, ss->Default2D);
ctx->Driver.DeleteTexture(ctx, ss->Default3D);
ctx->Driver.DeleteTexture(ctx, ss->DefaultCubeMap);
ctx->Driver.DeleteTexture(ctx, ss->DefaultRect);
/* all other textures */
_mesa_HashDeleteAll(ss->TexObjects, delete_texture_cb, ctx);
_mesa_DeleteHashTable(ss->TexObjects);
_glthread_DESTROY_MUTEX(ss->Mutex);
_mesa_free(ss);
@@ -1157,18 +1181,20 @@ _mesa_create_context(const GLvisual *visual,
void
_mesa_free_context_data( GLcontext *ctx )
{
/* if we're destroying the current context, unbind it first */
if (ctx == _mesa_get_current_context()) {
_mesa_make_current(NULL, NULL, NULL);
}
else {
/* unreference WinSysDraw/Read buffers */
_mesa_unreference_framebuffer(&ctx->WinSysDrawBuffer);
_mesa_unreference_framebuffer(&ctx->WinSysReadBuffer);
_mesa_unreference_framebuffer(&ctx->DrawBuffer);
_mesa_unreference_framebuffer(&ctx->ReadBuffer);
if (!_mesa_get_current_context()){
/* No current context, but we may need one in order to delete
* texture objs, etc. So temporarily bind the context now.
*/
_mesa_make_current(ctx, NULL, NULL);
}
/* unreference WinSysDraw/Read buffers */
_mesa_unreference_framebuffer(&ctx->WinSysDrawBuffer);
_mesa_unreference_framebuffer(&ctx->WinSysReadBuffer);
_mesa_unreference_framebuffer(&ctx->DrawBuffer);
_mesa_unreference_framebuffer(&ctx->ReadBuffer);
_mesa_free_attrib_data(ctx);
_mesa_free_lighting_data( ctx );
_mesa_free_eval_data( ctx );
_mesa_free_texture_data( ctx );
@@ -1200,6 +1226,11 @@ _mesa_free_context_data( GLcontext *ctx )
if (ctx->Extensions.String)
_mesa_free((void *) ctx->Extensions.String);
/* unbind the context if it's currently bound */
if (ctx == _mesa_get_current_context()) {
_mesa_make_current(NULL, NULL, NULL);
}
}
@@ -1431,8 +1462,6 @@ void
_mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
GLframebuffer *readBuffer )
{
GET_CURRENT_CONTEXT(oldCtx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(newCtx, "_mesa_make_current()\n");
@@ -1457,13 +1486,6 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
_glapi_set_context((void *) newCtx);
ASSERT(_mesa_get_current_context() == newCtx);
if (oldCtx) {
_mesa_unreference_framebuffer(&oldCtx->WinSysDrawBuffer);
_mesa_unreference_framebuffer(&oldCtx->WinSysReadBuffer);
_mesa_unreference_framebuffer(&oldCtx->DrawBuffer);
_mesa_unreference_framebuffer(&oldCtx->ReadBuffer);
}
if (!newCtx) {
_glapi_set_dispatch(NULL); /* none current */
}
+3 -3
View File
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
* Version: 7.0.1
* Version: 7.0.2
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -5737,7 +5737,7 @@ execute_list(GLcontext *ctx, GLuint list)
if (!dlist)
return;
ctx->ListState.CallStack[ctx->ListState.CallDepth++] = dlist;
ctx->ListState.CallDepth++;
if (ctx->Driver.BeginCallList)
ctx->Driver.BeginCallList(ctx, dlist);
@@ -6629,7 +6629,7 @@ execute_list(GLcontext *ctx, GLuint list)
if (ctx->Driver.EndCallList)
ctx->Driver.EndCallList(ctx);
ctx->ListState.CallStack[ctx->ListState.CallDepth--] = NULL;
ctx->ListState.CallDepth--;
}
+13
View File
@@ -364,6 +364,10 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
case GL_LIGHTING:
if (ctx->Light.Enabled == state)
return;
if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE;
else
ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Enabled = state;
break;
@@ -372,12 +376,14 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.SmoothFlag = state;
ctx->_TriangleCaps ^= DD_LINE_SMOOTH;
break;
case GL_LINE_STIPPLE:
if (ctx->Line.StippleFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.StippleFlag = state;
ctx->_TriangleCaps ^= DD_LINE_STIPPLE;
break;
case GL_INDEX_LOGIC_OP:
if (ctx->Color.IndexLogicOpEnabled == state)
@@ -516,18 +522,21 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
ctx->Point.SmoothFlag = state;
ctx->_TriangleCaps ^= DD_POINT_SMOOTH;
break;
case GL_POLYGON_SMOOTH:
if (ctx->Polygon.SmoothFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.SmoothFlag = state;
ctx->_TriangleCaps ^= DD_TRI_SMOOTH;
break;
case GL_POLYGON_STIPPLE:
if (ctx->Polygon.StippleFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.StippleFlag = state;
ctx->_TriangleCaps ^= DD_TRI_STIPPLE;
break;
case GL_POLYGON_OFFSET_POINT:
if (ctx->Polygon.OffsetPoint == state)
@@ -877,6 +886,10 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_STENCIL);
ctx->Stencil.TestTwoSide = state;
if (state)
ctx->_TriangleCaps |= DD_TRI_TWOSTENCIL;
else
ctx->_TriangleCaps &= ~DD_TRI_TWOSTENCIL;
break;
#if FEATURE_ARB_fragment_program
File diff suppressed because it is too large Load Diff
+13 -14
View File
@@ -150,22 +150,18 @@ _mesa_remove_attachment(GLcontext *ctx, struct gl_renderbuffer_attachment *att)
{
if (att->Type == GL_TEXTURE) {
ASSERT(att->Texture);
att->Texture->RefCount--;
if (att->Texture->RefCount == 0) {
ctx->Driver.DeleteTexture(ctx, att->Texture);
if (ctx->Driver.FinishRenderTexture) {
/* tell driver we're done rendering to this texobj */
ctx->Driver.FinishRenderTexture(ctx, att);
}
else {
/* tell driver that we're done rendering to this texture. */
if (ctx->Driver.FinishRenderTexture) {
ctx->Driver.FinishRenderTexture(ctx, att);
}
}
att->Texture = NULL;
_mesa_reference_texobj(&att->Texture, NULL); /* unbind */
ASSERT(!att->Texture);
}
if (att->Type == GL_TEXTURE || att->Type == GL_RENDERBUFFER_EXT) {
ASSERT(att->Renderbuffer);
ASSERT(!att->Texture);
_mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
_mesa_reference_renderbuffer(&att->Renderbuffer, NULL); /* unbind */
ASSERT(!att->Renderbuffer);
}
att->Type = GL_NONE;
att->Complete = GL_TRUE;
@@ -191,8 +187,8 @@ _mesa_set_texture_attachment(GLcontext *ctx,
/* new attachment */
_mesa_remove_attachment(ctx, att);
att->Type = GL_TEXTURE;
att->Texture = texObj;
texObj->RefCount++;
assert(!att->Texture);
_mesa_reference_texobj(&att->Texture, texObj);
}
/* always update these fields */
@@ -983,6 +979,7 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
return;
}
_mesa_HashInsert(ctx->Shared->FrameBuffers, framebuffer, newFb);
ASSERT(newFb->RefCount == 1);
}
}
else {
@@ -1006,8 +1003,10 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
if (bindDrawBuf) {
/* check if old FB had any texture attachments */
check_end_texture_render(ctx, ctx->DrawBuffer);
/* check if time to delete this framebuffer */
/* bind new drawing buffer */
_mesa_reference_framebuffer(&ctx->DrawBuffer, newFb);
if (newFb->Name != 0) {
/* check if newly bound framebuffer has any texture attachments */
check_begin_texture_render(ctx, newFb);
+4 -9
View File
@@ -38,6 +38,7 @@
#include "fbobject.h"
#include "framebuffer.h"
#include "renderbuffer.h"
#include "texobj.h"
@@ -190,17 +191,11 @@ _mesa_free_framebuffer_data(struct gl_framebuffer *fb)
_mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
}
if (att->Texture) {
/* render to texture */
att->Texture->RefCount--;
if (att->Texture->RefCount == 0) {
GET_CURRENT_CONTEXT(ctx);
if (ctx) {
ctx->Driver.DeleteTexture(ctx, att->Texture);
}
}
_mesa_reference_texobj(&att->Texture, NULL);
}
ASSERT(!att->Renderbuffer);
ASSERT(!att->Texture);
att->Type = GL_NONE;
att->Texture = NULL;
}
/* unbind _Depth/_StencilBuffer to decr ref counts */
+1 -1
View File
@@ -237,7 +237,7 @@
#endif
#if !defined __GNUC__ || __GNUC__ < 3
#if (!defined(__GNUC__) || __GNUC__ < 3) && !defined(__IBMC__)
# define __builtin_expect(x, y) x
#endif
+1 -1
View File
@@ -3794,7 +3794,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n,
GLint *dst = (GLint *) dest;
GLuint i;
for (i=0;i<n;i++) {
*dst++ = (GLint) source[i];
dst[i] = (GLint) source[i];
}
if (dstPacking->SwapBytes) {
_mesa_swap4( (GLuint *) dst, n );
+9
View File
@@ -53,6 +53,11 @@ _mesa_ShadeModel( GLenum mode )
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.ShadeModel = mode;
if (mode == GL_FLAT)
ctx->_TriangleCaps |= DD_FLATSHADE;
else
ctx->_TriangleCaps &= ~DD_FLATSHADE;
if (ctx->Driver.ShadeModel)
ctx->Driver.ShadeModel( ctx, mode );
}
@@ -441,6 +446,10 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params )
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Model.TwoSide = newbool;
if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE;
else
ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE;
break;
case GL_LIGHT_MODEL_COLOR_CONTROL:
if (params[0] == (GLfloat) GL_SINGLE_COLOR)
+5
View File
@@ -59,6 +59,11 @@ _mesa_LineWidth( GLfloat width )
ctx->Const.MinLineWidth,
ctx->Const.MaxLineWidth);
if (width != 1.0F)
ctx->_TriangleCaps |= DD_LINE_WIDTH;
else
ctx->_TriangleCaps &= ~DD_LINE_WIDTH;
if (ctx->Driver.LineWidth)
ctx->Driver.LineWidth(ctx, width);
}
-7
View File
@@ -1523,12 +1523,6 @@ struct gl_texture_unit
struct gl_texture_object *_Current; /**< Points to really enabled tex obj */
struct gl_texture_object Saved1D; /**< only used by glPush/PopAttrib */
struct gl_texture_object Saved2D;
struct gl_texture_object Saved3D;
struct gl_texture_object SavedCubeMap;
struct gl_texture_object SavedRect;
/* GL_SGI_texture_color_table */
struct gl_color_table ColorTable;
struct gl_color_table ProxyColorTable;
@@ -2848,7 +2842,6 @@ struct mesa_display_list
*/
struct gl_dlist_state
{
struct mesa_display_list *CallStack[MAX_LIST_NESTING];
GLuint CallDepth; /**< Current recursion calling depth */
struct mesa_display_list *CurrentList;
+6
View File
@@ -123,9 +123,15 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
COPY_3V(ctx->Point.Params, params);
ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 ||
ctx->Point.Params[1] != 0.0 ||
ctx->Point.Params[2] != 0.0);
if (ctx->Point._Attenuated)
ctx->_TriangleCaps |= DD_POINT_ATTEN;
else
ctx->_TriangleCaps &= ~DD_POINT_ATTEN;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
+5
View File
@@ -167,6 +167,11 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
return;
}
if (ctx->Polygon.FrontMode == GL_FILL && ctx->Polygon.BackMode == GL_FILL)
ctx->_TriangleCaps &= ~DD_TRI_UNFILLED;
else
ctx->_TriangleCaps |= DD_TRI_UNFILLED;
if (ctx->Driver.PolygonMode)
ctx->Driver.PolygonMode(ctx, face, mode);
}
+43
View File
@@ -812,6 +812,9 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_ProgramEnvParameters4fvEXT(exec, _mesa_ProgramEnvParameters4fvEXT);
SET_ProgramLocalParameters4fvEXT(exec, _mesa_ProgramLocalParameters4fvEXT);
#endif
/* GL_ATI_separate_stencil */
SET_StencilFuncSeparateATI(exec, _mesa_StencilFuncSeparateATI);
}
@@ -821,6 +824,16 @@ _mesa_init_exec_table(struct _glapi_table *exec)
/*@{*/
static void
update_separate_specular( GLcontext *ctx )
{
if (NEED_SECONDARY_COLOR(ctx))
ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
else
ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR;
}
/**
* Update state dependent on vertex arrays.
*/
@@ -1045,6 +1058,26 @@ update_color(GLcontext *ctx)
}
/*
* Check polygon state and set DD_TRI_CULL_FRONT_BACK and/or DD_TRI_OFFSET
* in ctx->_TriangleCaps if needed.
*/
static void
update_polygon( GLcontext *ctx )
{
ctx->_TriangleCaps &= ~(DD_TRI_CULL_FRONT_BACK | DD_TRI_OFFSET);
if (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK)
ctx->_TriangleCaps |= DD_TRI_CULL_FRONT_BACK;
/* Any Polygon offsets enabled? */
if (ctx->Polygon.OffsetPoint ||
ctx->Polygon.OffsetLine ||
ctx->Polygon.OffsetFill) {
ctx->_TriangleCaps |= DD_TRI_OFFSET;
}
}
/**
* Update the ctx->_TriangleCaps bitfield.
@@ -1052,6 +1085,7 @@ update_color(GLcontext *ctx)
* This function must be called after other update_*() functions since
* there are dependencies on some other derived values.
*/
#if 0
static void
update_tricaps(GLcontext *ctx, GLbitfield new_state)
{
@@ -1117,6 +1151,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
if (ctx->Stencil._TestTwoSide)
ctx->_TriangleCaps |= DD_TRI_TWOSTENCIL;
}
#endif
/**
@@ -1154,6 +1189,9 @@ _mesa_update_state_locked( GLcontext *ctx )
if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT))
_mesa_update_draw_buffer_bounds( ctx );
if (new_state & _NEW_POLYGON)
update_polygon( ctx );
if (new_state & _NEW_LIGHT)
_mesa_update_lighting( ctx );
@@ -1163,6 +1201,9 @@ _mesa_update_state_locked( GLcontext *ctx )
if (new_state & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_pixel( ctx, new_state );
if (new_state & _DD_NEW_SEPARATE_SPECULAR)
update_separate_specular( ctx );
if (new_state & (_NEW_ARRAY | _NEW_PROGRAM))
update_arrays( ctx );
@@ -1172,9 +1213,11 @@ _mesa_update_state_locked( GLcontext *ctx )
if (new_state & _NEW_COLOR)
update_color( ctx );
#if 0
if (new_state & (_NEW_POINT | _NEW_LINE | _NEW_POLYGON | _NEW_LIGHT
| _NEW_STENCIL | _DD_NEW_SEPARATE_SPECULAR))
update_tricaps( ctx, new_state );
#endif
if (ctx->FragmentProgram._MaintainTexEnvProgram) {
if (new_state & (_NEW_TEXTURE | _DD_NEW_SEPARATE_SPECULAR | _NEW_FOG))
+151 -146
View File
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
* Version: 6.5.2
* Version: 7.1
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2007 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"),
@@ -53,6 +53,48 @@
#include "mtypes.h"
static GLboolean
validate_stencil_op(GLcontext *ctx, GLenum op)
{
switch (op) {
case GL_KEEP:
case GL_ZERO:
case GL_REPLACE:
case GL_INCR:
case GL_DECR:
case GL_INVERT:
return GL_TRUE;
case GL_INCR_WRAP_EXT:
case GL_DECR_WRAP_EXT:
if (ctx->Extensions.EXT_stencil_wrap) {
return GL_TRUE;
}
/* FALL-THROUGH */
default:
return GL_FALSE;
}
}
static GLboolean
validate_stencil_func(GLcontext *ctx, GLenum func)
{
switch (func) {
case GL_NEVER:
case GL_LESS:
case GL_LEQUAL:
case GL_GREATER:
case GL_GEQUAL:
case GL_EQUAL:
case GL_NOTEQUAL:
case GL_ALWAYS:
return GL_TRUE;
default:
return GL_FALSE;
}
}
/**
* Set the clear value for the stencil buffer.
*
@@ -82,6 +124,62 @@ _mesa_ClearStencil( GLint s )
}
/**
* Set the function and reference value for stencil testing.
*
* \param frontfunc front test function.
* \param backfunc back test function.
* \param ref front and back reference value.
* \param mask front and back bitmask.
*
* \sa glStencilFunc().
*
* Verifies the parameters and updates the respective values in
* __GLcontextRec::Stencil. On change flushes the vertices and notifies the
* driver via the dd_function_table::StencilFunc callback.
*/
void GLAPIENTRY
_mesa_StencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask )
{
GET_CURRENT_CONTEXT(ctx);
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!validate_stencil_func(ctx, frontfunc)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glStencilFuncSeparateATI(frontfunc)");
return;
}
if (!validate_stencil_func(ctx, backfunc)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glStencilFuncSeparateATI(backfunc)");
return;
}
ref = CLAMP( ref, 0, stencilMax );
/* set both front and back state */
if (ctx->Stencil.Function[0] == frontfunc &&
ctx->Stencil.Function[1] == backfunc &&
ctx->Stencil.ValueMask[0] == mask &&
ctx->Stencil.ValueMask[1] == mask &&
ctx->Stencil.Ref[0] == ref &&
ctx->Stencil.Ref[1] == ref)
return;
FLUSH_VERTICES(ctx, _NEW_STENCIL);
ctx->Stencil.Function[0] = frontfunc;
ctx->Stencil.Function[1] = backfunc;
ctx->Stencil.Ref[0] = ctx->Stencil.Ref[1] = ref;
ctx->Stencil.ValueMask[0] = ctx->Stencil.ValueMask[1] = mask;
if (ctx->Driver.StencilFuncSeparate) {
ctx->Driver.StencilFuncSeparate(ctx, GL_FRONT,
frontfunc, ref, mask);
ctx->Driver.StencilFuncSeparate(ctx, GL_BACK,
backfunc, ref, mask);
}
}
/**
* Set the function and reference value for stencil testing.
*
@@ -102,19 +200,9 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
ASSERT_OUTSIDE_BEGIN_END(ctx);
switch (func) {
case GL_NEVER:
case GL_LESS:
case GL_LEQUAL:
case GL_GREATER:
case GL_GEQUAL:
case GL_EQUAL:
case GL_NOTEQUAL:
case GL_ALWAYS:
break;
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glStencilFunc (0x%04x)", func );
return;
if (!validate_stencil_func(ctx, func)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilFunc(func)");
return;
}
ref = CLAMP( ref, 0, stencilMax );
@@ -218,59 +306,17 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
switch (fail) {
case GL_KEEP:
case GL_ZERO:
case GL_REPLACE:
case GL_INCR:
case GL_DECR:
case GL_INVERT:
break;
case GL_INCR_WRAP_EXT:
case GL_DECR_WRAP_EXT:
if (ctx->Extensions.EXT_stencil_wrap) {
break;
}
/* FALL-THROUGH */
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp");
return;
if (!validate_stencil_op(ctx, fail)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp(sfail)");
return;
}
switch (zfail) {
case GL_KEEP:
case GL_ZERO:
case GL_REPLACE:
case GL_INCR:
case GL_DECR:
case GL_INVERT:
break;
case GL_INCR_WRAP_EXT:
case GL_DECR_WRAP_EXT:
if (ctx->Extensions.EXT_stencil_wrap) {
break;
}
/* FALL-THROUGH */
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp");
return;
if (!validate_stencil_op(ctx, zfail)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp(zfail)");
return;
}
switch (zpass) {
case GL_KEEP:
case GL_ZERO:
case GL_REPLACE:
case GL_INCR:
case GL_DECR:
case GL_INVERT:
break;
case GL_INCR_WRAP_EXT:
case GL_DECR_WRAP_EXT:
if (ctx->Extensions.EXT_stencil_wrap) {
break;
}
/* FALL-THROUGH */
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp");
return;
if (!validate_stencil_op(ctx, zpass)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp(zpass)");
return;
}
if (ctx->Extensions.ATI_separate_stencil) {
@@ -343,85 +389,55 @@ _mesa_ActiveStencilFaceEXT(GLenum face)
* instead.
*/
void GLAPIENTRY
_mesa_StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
_mesa_StencilOpSeparate(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)
{
GLboolean set = GL_FALSE;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!validate_stencil_op(ctx, sfail)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOpSeparate(sfail)");
return;
}
if (!validate_stencil_op(ctx, zfail)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOpSeparate(zfail)");
return;
}
if (!validate_stencil_op(ctx, zpass)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOpSeparate(zpass)");
return;
}
if (face != GL_FRONT && face != GL_BACK && face != GL_FRONT_AND_BACK) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOpSeparate(face)");
return;
}
switch (fail) {
case GL_KEEP:
case GL_ZERO:
case GL_REPLACE:
case GL_INCR:
case GL_DECR:
case GL_INVERT:
break;
case GL_INCR_WRAP_EXT:
case GL_DECR_WRAP_EXT:
if (ctx->Extensions.EXT_stencil_wrap) {
break;
}
/* FALL-THROUGH */
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOpSeparate(fail)");
return;
}
switch (zfail) {
case GL_KEEP:
case GL_ZERO:
case GL_REPLACE:
case GL_INCR:
case GL_DECR:
case GL_INVERT:
break;
case GL_INCR_WRAP_EXT:
case GL_DECR_WRAP_EXT:
if (ctx->Extensions.EXT_stencil_wrap) {
break;
}
/* FALL-THROUGH */
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOpSeparate(zfail)");
return;
}
switch (zpass) {
case GL_KEEP:
case GL_ZERO:
case GL_REPLACE:
case GL_INCR:
case GL_DECR:
case GL_INVERT:
break;
case GL_INCR_WRAP_EXT:
case GL_DECR_WRAP_EXT:
if (ctx->Extensions.EXT_stencil_wrap) {
break;
}
/* FALL-THROUGH */
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOpSeparate(zpass)");
return;
}
FLUSH_VERTICES(ctx, _NEW_STENCIL);
if (face != GL_BACK) {
ctx->Stencil.FailFunc[0] = fail;
ctx->Stencil.ZFailFunc[0] = zfail;
ctx->Stencil.ZPassFunc[0] = zpass;
/* set front */
if (ctx->Stencil.ZFailFunc[0] != zfail ||
ctx->Stencil.ZPassFunc[0] != zpass ||
ctx->Stencil.FailFunc[0] != sfail){
FLUSH_VERTICES(ctx, _NEW_STENCIL);
ctx->Stencil.ZFailFunc[0] = zfail;
ctx->Stencil.ZPassFunc[0] = zpass;
ctx->Stencil.FailFunc[0] = sfail;
set = GL_TRUE;
}
}
if (face != GL_FRONT) {
ctx->Stencil.FailFunc[1] = fail;
ctx->Stencil.ZFailFunc[1] = zfail;
ctx->Stencil.ZPassFunc[1] = zpass;
/* set back */
if (ctx->Stencil.ZFailFunc[1] != zfail ||
ctx->Stencil.ZPassFunc[1] != zpass ||
ctx->Stencil.FailFunc[1] != sfail) {
FLUSH_VERTICES(ctx, _NEW_STENCIL);
ctx->Stencil.ZFailFunc[1] = zfail;
ctx->Stencil.ZPassFunc[1] = zpass;
ctx->Stencil.FailFunc[1] = sfail;
set = GL_TRUE;
}
}
if (ctx->Driver.StencilOpSeparate) {
ctx->Driver.StencilOpSeparate(ctx, face, fail, zfail, zpass);
if (set && ctx->Driver.StencilOpSeparate) {
ctx->Driver.StencilOpSeparate(ctx, face, sfail, zfail, zpass);
}
}
@@ -438,20 +454,9 @@ _mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilFuncSeparate(face)");
return;
}
switch (func) {
case GL_NEVER:
case GL_LESS:
case GL_LEQUAL:
case GL_GREATER:
case GL_GEQUAL:
case GL_EQUAL:
case GL_NOTEQUAL:
case GL_ALWAYS:
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilFuncSeparate(func)");
return;
if (!validate_stencil_func(ctx, func)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilFuncSeparate(func)");
return;
}
ref = CLAMP(ref, 0, stencilMax);
+5 -2
View File
@@ -5,9 +5,9 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Version: 7.1
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2007 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"),
@@ -63,6 +63,9 @@ extern void GLAPIENTRY
_mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
extern void GLAPIENTRY
_mesa_StencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
extern void GLAPIENTRY
_mesa_StencilMaskSeparate(GLenum face, GLuint mask);
+9 -6
View File
@@ -35,10 +35,11 @@
#include "texenvprogram.h"
/**
* According to Glean's texCombine test, no more than 21 instructions
* are needed. Allow a few extra just in case.
* This MAX is probably a bit generous, but that's OK. There can be
* up to four instructions per texture unit (TEX + 3 for combine),
* then there's fog and specular add.
*/
#define MAX_INSTRUCTIONS 24
#define MAX_INSTRUCTIONS ((MAX_TEXTURE_UNITS * 4) + 12)
#define DISASSEM (MESA_VERBOSE & VERBOSE_DISASSEM)
@@ -460,8 +461,8 @@ static void emit_dst( struct prog_dst_register *dst,
dst->File = ureg.file;
dst->Index = ureg.idx;
dst->WriteMask = mask;
dst->CondMask = 0;
dst->CondSwizzle = 0;
dst->CondMask = COND_TR; /* always pass cond test */
dst->CondSwizzle = SWIZZLE_NOOP;
}
static struct prog_instruction *
@@ -476,7 +477,9 @@ emit_op(struct texenv_fragment_program *p,
{
GLuint nr = p->program->Base.NumInstructions++;
struct prog_instruction *inst = &p->program->Base.Instructions[nr];
assert(nr < MAX_INSTRUCTIONS);
_mesa_init_instructions(inst, 1);
inst->Opcode = op;
+115 -104
View File
@@ -156,6 +156,11 @@ _mesa_delete_texture_object( GLcontext *ctx, struct gl_texture_object *texObj )
(void) ctx;
/* Set Target to an invalid value. With some assertions elsewhere
* we can try to detect possible use of deleted textures.
*/
texObj->Target = 0x99;
_mesa_free_colortable_data(&texObj->Palette);
/* free the texture images */
@@ -188,6 +193,7 @@ void
_mesa_copy_texture_object( struct gl_texture_object *dest,
const struct gl_texture_object *src )
{
dest->Target = src->Target;
dest->Name = src->Name;
dest->Priority = src->Priority;
dest->BorderColor[0] = src->BorderColor[0];
@@ -219,6 +225,92 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
}
/**
* Check if the given texture object is valid by examining its Target field.
* For debugging only.
*/
static GLboolean
valid_texture_object(const struct gl_texture_object *tex)
{
switch (tex->Target) {
case 0:
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
case GL_TEXTURE_3D:
case GL_TEXTURE_CUBE_MAP_ARB:
case GL_TEXTURE_RECTANGLE_NV:
return GL_TRUE;
case 0x99:
_mesa_problem(NULL, "invalid reference to a deleted texture object");
return GL_FALSE;
default:
_mesa_problem(NULL, "invalid texture object Target value");
return GL_FALSE;
}
}
/**
* Reference (or unreference) a texture object.
* If '*ptr', decrement *ptr's refcount (and delete if it becomes zero).
* If 'tex' is non-null, increment its refcount.
*/
void
_mesa_reference_texobj(struct gl_texture_object **ptr,
struct gl_texture_object *tex)
{
assert(ptr);
if (*ptr == tex) {
/* no change */
return;
}
if (*ptr) {
/* Unreference the old texture */
GLboolean deleteFlag = GL_FALSE;
struct gl_texture_object *oldTex = *ptr;
assert(valid_texture_object(oldTex));
_glthread_LOCK_MUTEX(oldTex->Mutex);
ASSERT(oldTex->RefCount > 0);
oldTex->RefCount--;
deleteFlag = (oldTex->RefCount == 0);
_glthread_UNLOCK_MUTEX(oldTex->Mutex);
if (deleteFlag) {
GET_CURRENT_CONTEXT(ctx);
if (ctx)
ctx->Driver.DeleteTexture(ctx, oldTex);
else
_mesa_problem(NULL, "Unable to delete texture, no context");
}
*ptr = NULL;
}
assert(!*ptr);
if (tex) {
/* reference new texture */
assert(valid_texture_object(tex));
_glthread_LOCK_MUTEX(tex->Mutex);
if (tex->RefCount == 0) {
/* this texture's being deleted (look just above) */
/* Not sure this can every really happen. Warn if it does. */
_mesa_problem(NULL, "referencing deleted texture object");
*ptr = NULL;
}
else {
tex->RefCount++;
*ptr = tex;
}
_glthread_UNLOCK_MUTEX(tex->Mutex);
}
}
/**
* Report why a texture object is incomplete.
*
@@ -620,8 +712,7 @@ unbind_texobj_from_fbo(GLcontext *ctx, struct gl_texture_object *texObj)
/**
* Check if the given texture object is bound to any texture image units and
* unbind it if so.
* XXX all RefCount accesses should be protected by a mutex.
* unbind it if so (revert to default textures).
*/
static void
unbind_texobj_from_texunits(GLcontext *ctx, struct gl_texture_object *texObj)
@@ -630,34 +721,20 @@ unbind_texobj_from_texunits(GLcontext *ctx, struct gl_texture_object *texObj)
for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) {
struct gl_texture_unit *unit = &ctx->Texture.Unit[u];
struct gl_texture_object **curr = NULL;
if (texObj == unit->Current1D) {
curr = &unit->Current1D;
unit->Current1D = ctx->Shared->Default1D;
_mesa_reference_texobj(&unit->Current1D, ctx->Shared->Default1D);
}
else if (texObj == unit->Current2D) {
curr = &unit->Current2D;
unit->Current2D = ctx->Shared->Default2D;
_mesa_reference_texobj(&unit->Current2D, ctx->Shared->Default2D);
}
else if (texObj == unit->Current3D) {
curr = &unit->Current3D;
unit->Current3D = ctx->Shared->Default3D;
_mesa_reference_texobj(&unit->Current3D, ctx->Shared->Default3D);
}
else if (texObj == unit->CurrentCubeMap) {
curr = &unit->CurrentCubeMap;
unit->CurrentCubeMap = ctx->Shared->DefaultCubeMap;
_mesa_reference_texobj(&unit->CurrentCubeMap, ctx->Shared->DefaultCubeMap);
}
else if (texObj == unit->CurrentRect) {
curr = &unit->CurrentRect;
unit->CurrentRect = ctx->Shared->DefaultRect;
}
if (curr) {
(*curr)->RefCount++;
texObj->RefCount--;
if (texObj == unit->_Current)
unit->_Current = *curr;
_mesa_reference_texobj(&unit->CurrentRect, ctx->Shared->DefaultRect);
}
}
}
@@ -693,8 +770,6 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
= _mesa_lookup_texture(ctx, textures[i]);
if (delObj) {
GLboolean deleted;
_mesa_lock_texture(ctx, delObj);
/* Check if texture is bound to any framebuffer objects.
@@ -704,10 +779,12 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
unbind_texobj_from_fbo(ctx, delObj);
/* Check if this texture is currently bound to any texture units.
* If so, unbind it and decrement the reference count.
* If so, unbind it.
*/
unbind_texobj_from_texunits(ctx, delObj);
_mesa_unlock_texture(ctx, delObj);
ctx->NewState |= _NEW_TEXTURE;
/* The texture _name_ is now free for re-use.
@@ -717,23 +794,10 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
_mesa_HashRemove(ctx->Shared->TexObjects, delObj->Name);
_glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
/* The actual texture object will not be freed until it's no
* longer bound in any context.
* XXX all RefCount accesses should be protected by a mutex.
/* Unreference the texobj. If refcount hits zero, the texture
* will be deleted.
*/
delObj->RefCount--;
deleted = (delObj->RefCount == 0);
_mesa_unlock_texture(ctx, delObj);
/* We know that refcount went to zero above, so this is
* the only pointer left to delObj, so we don't have to
* worry about locking any more:
*/
if (deleted) {
ASSERT(delObj->Name != 0); /* Never delete default tex objs */
ASSERT(ctx->Driver.DeleteTexture);
(*ctx->Driver.DeleteTexture)(ctx, delObj);
}
_mesa_reference_texobj(&delObj, NULL);
}
}
}
@@ -761,7 +825,6 @@ _mesa_BindTexture( GLenum target, GLuint texName )
GET_CURRENT_CONTEXT(ctx);
const GLuint unit = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
struct gl_texture_object *oldTexObj;
struct gl_texture_object *newTexObj = NULL;
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -769,48 +832,6 @@ _mesa_BindTexture( GLenum target, GLuint texName )
_mesa_debug(ctx, "glBindTexture %s %d\n",
_mesa_lookup_enum_by_nr(target), (GLint) texName);
/*
* Get pointer to currently bound texture object (oldTexObj)
*/
switch (target) {
case GL_TEXTURE_1D:
oldTexObj = texUnit->Current1D;
break;
case GL_TEXTURE_2D:
oldTexObj = texUnit->Current2D;
break;
case GL_TEXTURE_3D:
oldTexObj = texUnit->Current3D;
break;
case GL_TEXTURE_CUBE_MAP_ARB:
if (!ctx->Extensions.ARB_texture_cube_map) {
_mesa_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" );
return;
}
oldTexObj = texUnit->CurrentCubeMap;
break;
case GL_TEXTURE_RECTANGLE_NV:
if (!ctx->Extensions.NV_texture_rectangle) {
_mesa_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" );
return;
}
oldTexObj = texUnit->CurrentRect;
break;
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" );
return;
}
if (oldTexObj->Name == texName) {
/* XXX this might be wrong. If the texobj is in use by another
* context and a texobj parameter was changed, this might be our
* only chance to update this context's hardware state.
* Note that some applications re-bind the same texture a lot so we
* want to handle that case quickly.
*/
return; /* rebinding the same texture- no change */
}
/*
* Get pointer to new texture object (newTexObj)
*/
@@ -879,28 +900,30 @@ _mesa_BindTexture( GLenum target, GLuint texName )
newTexObj->Target = target;
}
/* XXX all RefCount accesses should be protected by a mutex. */
newTexObj->RefCount++;
assert(valid_texture_object(newTexObj));
/* do the actual binding, but first flush outstanding vertices:
*/
/* flush before changing binding */
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
/* Do the actual binding. The refcount on the previously bound
* texture object will be decremented. It'll be deleted if the
* count hits zero.
*/
switch (target) {
case GL_TEXTURE_1D:
texUnit->Current1D = newTexObj;
_mesa_reference_texobj(&texUnit->Current1D, newTexObj);
break;
case GL_TEXTURE_2D:
texUnit->Current2D = newTexObj;
_mesa_reference_texobj(&texUnit->Current2D, newTexObj);
break;
case GL_TEXTURE_3D:
texUnit->Current3D = newTexObj;
_mesa_reference_texobj(&texUnit->Current3D, newTexObj);
break;
case GL_TEXTURE_CUBE_MAP_ARB:
texUnit->CurrentCubeMap = newTexObj;
_mesa_reference_texobj(&texUnit->CurrentCubeMap, newTexObj);
break;
case GL_TEXTURE_RECTANGLE_NV:
texUnit->CurrentRect = newTexObj;
_mesa_reference_texobj(&texUnit->CurrentRect, newTexObj);
break;
default:
_mesa_problem(ctx, "bad target in BindTexture");
@@ -910,18 +933,6 @@ _mesa_BindTexture( GLenum target, GLuint texName )
/* Pass BindTexture call to device driver */
if (ctx->Driver.BindTexture)
(*ctx->Driver.BindTexture)( ctx, target, newTexObj );
/* Decrement the reference count on the old texture and check if it's
* time to delete it.
*/
/* XXX all RefCount accesses should be protected by a mutex. */
oldTexObj->RefCount--;
ASSERT(oldTexObj->RefCount >= 0);
if (oldTexObj->RefCount == 0) {
ASSERT(oldTexObj->Name != 0);
ASSERT(ctx->Driver.DeleteTexture);
(*ctx->Driver.DeleteTexture)( ctx, oldTexObj );
}
}
+4
View File
@@ -57,6 +57,10 @@ extern void
_mesa_copy_texture_object( struct gl_texture_object *dest,
const struct gl_texture_object *src );
extern void
_mesa_reference_texobj(struct gl_texture_object **ptr,
struct gl_texture_object *tex);
extern void
_mesa_test_texobj_completeness( const GLcontext *ctx,
struct gl_texture_object *obj );
+40 -53
View File
@@ -63,31 +63,6 @@ static const struct gl_tex_env_combine_state default_combine_state = {
};
/**
* Copy a texture binding. Helper used by _mesa_copy_texture_state().
*/
static void
copy_texture_binding(const GLcontext *ctx,
struct gl_texture_object **dst,
struct gl_texture_object *src)
{
/* only copy if names differ (per OpenGL SI) */
if ((*dst)->Name != src->Name) {
/* unbind/delete dest binding which we're changing */
(*dst)->RefCount--;
if ((*dst)->RefCount == 0) {
/* time to delete this texture object */
ASSERT((*dst)->Name != 0);
ASSERT(ctx->Driver.DeleteTexture);
/* XXX cast-away const, unfortunately */
(*ctx->Driver.DeleteTexture)((GLcontext *) ctx, *dst);
}
/* make new binding, incrementing ref count */
*dst = src;
src->RefCount++;
}
}
/**
* Used by glXCopyContext to copy texture state from one context to another.
@@ -144,16 +119,16 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
/* copy texture object bindings, not contents of texture objects */
_mesa_lock_context_textures(dst);
copy_texture_binding(src, &dst->Texture.Unit[i].Current1D,
src->Texture.Unit[i].Current1D);
copy_texture_binding(src, &dst->Texture.Unit[i].Current2D,
src->Texture.Unit[i].Current2D);
copy_texture_binding(src, &dst->Texture.Unit[i].Current3D,
src->Texture.Unit[i].Current3D);
copy_texture_binding(src, &dst->Texture.Unit[i].CurrentCubeMap,
src->Texture.Unit[i].CurrentCubeMap);
copy_texture_binding(src, &dst->Texture.Unit[i].CurrentRect,
src->Texture.Unit[i].CurrentRect);
_mesa_reference_texobj(&dst->Texture.Unit[i].Current1D,
src->Texture.Unit[i].Current1D);
_mesa_reference_texobj(&dst->Texture.Unit[i].Current2D,
src->Texture.Unit[i].Current2D);
_mesa_reference_texobj(&dst->Texture.Unit[i].Current3D,
src->Texture.Unit[i].Current3D);
_mesa_reference_texobj(&dst->Texture.Unit[i].CurrentCubeMap,
src->Texture.Unit[i].CurrentCubeMap);
_mesa_reference_texobj(&dst->Texture.Unit[i].CurrentRect,
src->Texture.Unit[i].CurrentRect);
_mesa_unlock_context_textures(dst);
}
@@ -3032,6 +3007,8 @@ alloc_proxy_textures( GLcontext *ctx )
if (!ctx->Texture.ProxyRect)
goto cleanup;
assert(ctx->Texture.Proxy1D->RefCount == 1);
return GL_TRUE;
cleanup:
@@ -3087,11 +3064,12 @@ init_texture_unit( GLcontext *ctx, GLuint unit )
ASSIGN_4V( texUnit->EyePlaneR, 0.0, 0.0, 0.0, 0.0 );
ASSIGN_4V( texUnit->EyePlaneQ, 0.0, 0.0, 0.0, 0.0 );
texUnit->Current1D = ctx->Shared->Default1D;
texUnit->Current2D = ctx->Shared->Default2D;
texUnit->Current3D = ctx->Shared->Default3D;
texUnit->CurrentCubeMap = ctx->Shared->DefaultCubeMap;
texUnit->CurrentRect = ctx->Shared->DefaultRect;
/* initialize current texture object ptrs to the shared default objects */
_mesa_reference_texobj(&texUnit->Current1D, ctx->Shared->Default1D);
_mesa_reference_texobj(&texUnit->Current2D, ctx->Shared->Default2D);
_mesa_reference_texobj(&texUnit->Current3D, ctx->Shared->Default3D);
_mesa_reference_texobj(&texUnit->CurrentCubeMap, ctx->Shared->DefaultCubeMap);
_mesa_reference_texobj(&texUnit->CurrentRect, ctx->Shared->DefaultRect);
}
@@ -3106,21 +3084,20 @@ _mesa_init_texture(GLcontext *ctx)
assert(MAX_TEXTURE_LEVELS >= MAX_3D_TEXTURE_LEVELS);
assert(MAX_TEXTURE_LEVELS >= MAX_CUBE_TEXTURE_LEVELS);
/* Effectively bind the default textures to all texture units */
ctx->Shared->Default1D->RefCount += MAX_TEXTURE_UNITS;
ctx->Shared->Default2D->RefCount += MAX_TEXTURE_UNITS;
ctx->Shared->Default3D->RefCount += MAX_TEXTURE_UNITS;
ctx->Shared->DefaultCubeMap->RefCount += MAX_TEXTURE_UNITS;
ctx->Shared->DefaultRect->RefCount += MAX_TEXTURE_UNITS;
/* Texture group */
ctx->Texture.CurrentUnit = 0; /* multitexture */
ctx->Texture._EnabledUnits = 0;
for (i=0; i<MAX_TEXTURE_UNITS; i++)
init_texture_unit( ctx, i );
ctx->Texture.SharedPalette = GL_FALSE;
_mesa_init_colortable(&ctx->Texture.Palette);
for (i = 0; i < MAX_TEXTURE_UNITS; i++)
init_texture_unit( ctx, i );
/* After we're done initializing the context's texture state the default
* texture objects' refcounts should be at least MAX_TEXTURE_UNITS + 1.
*/
assert(ctx->Shared->Default1D->RefCount >= MAX_TEXTURE_UNITS + 1);
_mesa_TexEnvProgramCacheInit( ctx );
/* Allocate proxy textures */
@@ -3132,12 +3109,22 @@ _mesa_init_texture(GLcontext *ctx)
/**
* Free dynamically-allocted texture data attached to the given context.
* Free dynamically-allocated texture data attached to the given context.
*/
void
_mesa_free_texture_data(GLcontext *ctx)
{
GLuint i;
GLuint u;
/* unreference current textures */
for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) {
struct gl_texture_unit *unit = ctx->Texture.Unit + u;
_mesa_reference_texobj(&unit->Current1D, NULL);
_mesa_reference_texobj(&unit->Current2D, NULL);
_mesa_reference_texobj(&unit->Current3D, NULL);
_mesa_reference_texobj(&unit->CurrentCubeMap, NULL);
_mesa_reference_texobj(&unit->CurrentRect, NULL);
}
/* Free proxy texture objects */
(ctx->Driver.DeleteTexture)(ctx, ctx->Texture.Proxy1D );
@@ -3146,8 +3133,8 @@ _mesa_free_texture_data(GLcontext *ctx)
(ctx->Driver.DeleteTexture)(ctx, ctx->Texture.ProxyCubeMap );
(ctx->Driver.DeleteTexture)(ctx, ctx->Texture.ProxyRect );
for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++)
_mesa_free_colortable_data( &ctx->Texture.Unit[i].ColorTable );
for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++)
_mesa_free_colortable_data( &ctx->Texture.Unit[u].ColorTable );
_mesa_TexEnvProgramCacheDestroy( ctx );
}
+3 -3
View File
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
* Version: 7.0.1
* Version: 7.0.2
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -30,8 +30,8 @@
/* Mesa version */
#define MESA_MAJOR 7
#define MESA_MINOR 0
#define MESA_PATCH 1
#define MESA_VERSION_STRING "7.0.1"
#define MESA_PATCH 2
#define MESA_VERSION_STRING "7.0.2"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+68 -48
View File
@@ -624,6 +624,41 @@ program_error(GLcontext *ctx, GLint position, const char *descrip)
}
/**
* As above, but with an extra string parameter for more info.
*/
static void
program_error2(GLcontext *ctx, GLint position, const char *descrip,
const char *var)
{
if (descrip) {
const char *prefix = "glProgramString(", *suffix = ")";
char *str = (char *) _mesa_malloc(_mesa_strlen(descrip) +
_mesa_strlen(": ") +
_mesa_strlen(var) +
_mesa_strlen(prefix) +
_mesa_strlen(suffix) + 1);
if (str) {
_mesa_sprintf(str, "%s%s: %s%s", prefix, descrip, var, suffix);
_mesa_error(ctx, GL_INVALID_OPERATION, str);
_mesa_free(str);
}
}
{
char *str = (char *) _mesa_malloc(_mesa_strlen(descrip) +
_mesa_strlen(": ") +
_mesa_strlen(var) + 1);
if (str) {
_mesa_sprintf(str, "%s: %s", descrip, var);
}
_mesa_set_program_error(ctx, position, str);
if (str) {
_mesa_free(str);
}
}
}
/**
* constructs an integer from 4 GLubytes in LE format
@@ -1217,10 +1252,10 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
state_tokens[1] = coord;
/* EYE or OBJECT */
type = *(*inst++);
type = *(*inst)++;
/* 0 - s, 1 - t, 2 - r, 3 - q */
coord = *(*inst++);
coord = *(*inst)++;
if (type == TEX_GEN_EYE) {
switch (coord) {
@@ -1236,6 +1271,9 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
case COMPONENT_W:
state_tokens[2] = STATE_TEXGEN_EYE_Q;
break;
default:
_mesa_problem(ctx, "bad texgen component in "
"parse_state_single_item()");
}
}
else {
@@ -1252,6 +1290,9 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
case COMPONENT_W:
state_tokens[2] = STATE_TEXGEN_OBJECT_Q;
break;
default:
_mesa_problem(ctx, "bad texgen component in "
"parse_state_single_item()");
}
}
}
@@ -1274,7 +1315,7 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
break;
case STATE_POINT:
switch (*(*inst++)) {
switch (*(*inst)++) {
case POINT_SIZE:
state_tokens[0] = STATE_POINT_SIZE;
break;
@@ -1678,18 +1719,14 @@ parse_attrib (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head
struct arb_program *Program)
{
GLuint found;
char *error_msg;
struct var_cache *attrib_var;
attrib_var = parse_string (inst, vc_head, Program, &found);
Program->Position = parse_position (inst);
if (found) {
error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) attrib_var->name) + 40);
_mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
attrib_var->name);
program_error(ctx, Program->Position, error_msg);
_mesa_free (error_msg);
program_error2(ctx, Program->Position,
"Duplicate variable declaration",
(char *) attrib_var->name);
return 1;
}
@@ -1867,12 +1904,9 @@ parse_param (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head,
Program->Position = parse_position (inst);
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) param_var->name) + 40);
_mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
param_var->name);
program_error (ctx, Program->Position, error_msg);
_mesa_free (error_msg);
program_error2(ctx, Program->Position,
"Duplicate variable declaration",
(char *) param_var->name);
return 1;
}
@@ -1967,12 +2001,9 @@ parse_temp (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head,
temp_var = parse_string (inst, vc_head, Program, &found);
Program->Position = parse_position (inst);
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
_mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
temp_var->name);
program_error(ctx, Program->Position, error_msg);
_mesa_free (error_msg);
program_error2(ctx, Program->Position,
"Duplicate variable declaration",
(char *) temp_var->name);
return 1;
}
@@ -2013,12 +2044,9 @@ parse_output (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head
output_var = parse_string (inst, vc_head, Program, &found);
Program->Position = parse_position (inst);
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) output_var->name) + 40);
_mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
output_var->name);
program_error (ctx, Program->Position, error_msg);
_mesa_free (error_msg);
program_error2(ctx, Program->Position,
"Duplicate variable declaration",
(char *) output_var->name);
return 1;
}
@@ -2044,12 +2072,9 @@ parse_alias (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head,
Program->Position = parse_position (inst);
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
_mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
temp_var->name);
program_error(ctx, Program->Position, error_msg);
_mesa_free (error_msg);
program_error2(ctx, Program->Position,
"Duplicate variable declaration",
(char *) temp_var->name);
return 1;
}
@@ -2059,12 +2084,9 @@ parse_alias (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head,
if (!found)
{
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
_mesa_sprintf (error_msg, "Alias value %s is not defined",
temp_var->alias_binding->name);
program_error (ctx, Program->Position, error_msg);
_mesa_free (error_msg);
program_error2(ctx, Program->Position,
"Undefined alias value",
(char *) temp_var->alias_binding->name);
return 1;
}
@@ -2087,12 +2109,9 @@ parse_address (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_hea
temp_var = parse_string (inst, vc_head, Program, &found);
Program->Position = parse_position (inst);
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
_mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
temp_var->name);
program_error (ctx, Program->Position, error_msg);
_mesa_free (error_msg);
program_error2(ctx, Program->Position,
"Duplicate variable declaration",
(char *) temp_var->name);
return 1;
}
@@ -2445,8 +2464,9 @@ parse_src_reg (GLcontext * ctx, const GLubyte ** inst,
Program->Position = parse_position (inst);
if (!found) {
program_error(ctx, Program->Position,
"2: Undefined variable"); /* src->name */
program_error2(ctx, Program->Position,
"Undefined variable",
(char *) src->name);
return 1;
}
+2 -2
View File
@@ -440,7 +440,7 @@ _mesa_PassTexCoordATI(GLuint dst, GLuint coord, GLenum swizzle)
_mesa_error(ctx, GL_INVALID_OPERATION, "glPassTexCoordATI(coord)");
return;
}
if ((swizzle < GL_SWIZZLE_STR_ATI) && (swizzle > GL_SWIZZLE_STQ_DQ_ATI)) {
if (!(swizzle >= GL_SWIZZLE_STR_ATI) && (swizzle <= GL_SWIZZLE_STQ_DQ_ATI)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glPassTexCoordATI(swizzle)");
return;
}
@@ -513,7 +513,7 @@ _mesa_SampleMapATI(GLuint dst, GLuint interp, GLenum swizzle)
_mesa_error(ctx, GL_INVALID_OPERATION, "glSampleMapATI(interp)");
return;
}
if ((swizzle < GL_SWIZZLE_STR_ATI) && (swizzle > GL_SWIZZLE_STQ_DQ_ATI)) {
if (!(swizzle >= GL_SWIZZLE_STR_ATI) && (swizzle <= GL_SWIZZLE_STQ_DQ_ATI)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glSampleMapATI(swizzle)");
return;
}
@@ -507,6 +507,8 @@ _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH])
switch (state[1]) {
case STATE_TEXRECT_SCALE:
return _NEW_TEXTURE;
case STATE_FOG_PARAMS_OPTIMIZED:
return _NEW_FOG;
default:
/* unknown state indexes are silently ignored and
* no flag set, since it is handled by the driver.
+6 -2
View File
@@ -378,7 +378,7 @@ _mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader)
struct gl_shader_program *shProg
= _mesa_lookup_shader_program(ctx, program);
struct gl_shader *sh = _mesa_lookup_shader(ctx, shader);
const GLuint n = shProg->NumShaders;
GLuint n;
GLuint i;
if (!shProg || !sh) {
@@ -387,6 +387,8 @@ _mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader)
return;
}
n = shProg->NumShaders;
for (i = 0; i < n; i++) {
if (shProg->Shaders[i] == sh) {
/* already attached */
@@ -548,7 +550,7 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader)
{
struct gl_shader_program *shProg
= _mesa_lookup_shader_program(ctx, program);
const GLuint n = shProg->NumShaders;
GLuint n;
GLuint i, j;
if (!shProg) {
@@ -557,6 +559,8 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader)
return;
}
n = shProg->NumShaders;
for (i = 0; i < n; i++) {
if (shProg->Shaders[i]->Name == shader) {
/* found it */
@@ -1,104 +0,0 @@
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
/* slang_builtin_120_common.gc */
3,1,0,26,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,26,109,0,0,1,0,0,26,110,0,
0,0,1,8,58,109,97,116,50,120,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,
49,0,57,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,28,0,109,97,116,114,105,120,67,111,109,112,77,117,
108,116,0,1,0,0,28,109,0,0,1,0,0,28,110,0,0,0,1,8,58,109,97,116,50,120,52,0,18,109,0,16,8,48,0,57,
18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,27,0,109,
97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,27,109,0,0,1,0,0,27,110,0,0,0,1,8,58,109,
97,116,51,120,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,
0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,30,0,109,97,116,
114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,30,109,0,0,1,0,0,30,110,0,0,0,1,8,58,109,97,116,
51,120,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,
49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,29,0,109,97,116,114,105,
120,67,111,109,112,77,117,108,116,0,1,0,0,29,109,0,0,1,0,0,29,110,0,0,0,1,8,58,109,97,116,52,120,
50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,
57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,
51,0,57,48,0,0,0,0,1,0,31,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,31,109,0,
0,1,0,0,31,110,0,0,0,1,8,58,109,97,116,52,120,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,
0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,
48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,13,0,111,117,116,101,114,80,114,
111,100,117,99,116,0,1,0,0,10,99,0,0,1,0,0,10,114,0,0,0,1,8,58,109,97,116,50,0,18,99,0,59,120,0,18,
114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,
0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,0,0,0,1,0,14,0,111,117,116,101,114,80,114,111,100,117,99,
116,0,1,0,0,11,99,0,0,1,0,0,11,114,0,0,0,1,8,58,109,97,116,51,0,18,99,0,59,120,0,18,114,0,59,120,0,
48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,
120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,
121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,
59,122,0,18,114,0,59,122,0,48,0,0,0,0,1,0,15,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,
0,12,99,0,0,1,0,0,12,114,0,0,0,1,8,58,109,97,116,52,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,
99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,119,0,18,
114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,
0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,119,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,
18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,
48,0,18,99,0,59,119,0,18,114,0,59,122,0,48,0,18,99,0,59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,
121,0,18,114,0,59,119,0,48,0,18,99,0,59,122,0,18,114,0,59,119,0,48,0,18,99,0,59,119,0,18,114,0,59,
119,0,48,0,0,0,0,1,0,26,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,11,99,0,0,1,0,0,10,
114,0,0,0,1,8,58,109,97,116,50,120,51,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,
18,114,0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,
48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,0,0,0,1,0,27,
0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,10,99,0,0,1,0,0,11,114,0,0,0,1,8,58,109,97,
116,51,120,50,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,
99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,
114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,0,0,0,1,0,28,0,111,117,116,101,114,80,
114,111,100,117,99,116,0,1,0,0,12,99,0,0,1,0,0,10,114,0,0,0,1,8,58,109,97,116,50,120,52,0,18,99,0,
59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,
59,120,0,48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,
99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,119,0,18,
114,0,59,121,0,48,0,0,0,0,1,0,29,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,10,99,0,0,
1,0,0,12,114,0,0,0,1,8,58,109,97,116,52,120,50,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,
59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,
59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,
99,0,59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,121,0,18,114,0,59,119,0,48,0,0,0,0,1,0,30,0,111,
117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,12,99,0,0,1,0,0,11,114,0,0,0,1,8,58,109,97,116,
51,120,52,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,
0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,
0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,
99,0,59,119,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,
114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,18,99,0,59,119,0,18,114,0,59,122,0,48,
0,0,0,0,1,0,31,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,11,99,0,0,1,0,0,12,114,0,0,
0,1,8,58,109,97,116,52,120,51,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,
59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,
99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,
114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,
0,18,99,0,59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,121,0,18,114,0,59,119,0,48,0,18,99,0,59,122,0,
18,114,0,59,119,0,48,0,0,0,0,1,0,13,0,116,114,97,110,115,112,111,115,101,0,1,0,0,13,109,0,0,0,1,8,
58,109,97,116,50,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,
8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,0,0,0,1,0,14,0,116,114,97,110,115,112,111,
115,101,0,1,0,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,
10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,
16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,
0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,0,0,0,1,0,15,0,116,114,97,110,115,112,
111,115,101,0,1,0,0,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,
16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,10,51,0,57,59,120,0,0,18,
109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,
18,109,0,16,10,51,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0,
0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,10,51,0,57,59,122,0,0,18,109,0,16,8,48,0,57,59,119,
0,0,18,109,0,16,10,49,0,57,59,119,0,0,18,109,0,16,10,50,0,57,59,119,0,0,18,109,0,16,10,51,0,57,59,
119,0,0,0,0,0,1,0,26,0,116,114,97,110,115,112,111,115,101,0,1,0,0,27,109,0,0,0,1,8,58,109,97,116,
50,120,51,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,
57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,
0,57,59,121,0,0,0,0,0,1,0,27,0,116,114,97,110,115,112,111,115,101,0,1,0,0,26,109,0,0,0,1,8,58,109,
97,116,51,120,50,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,
8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,
16,10,49,0,57,59,122,0,0,0,0,0,1,0,28,0,116,114,97,110,115,112,111,115,101,0,1,0,0,29,109,0,0,0,1,
8,58,109,97,116,50,120,52,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,
109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,
18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,
0,0,0,0,0,1,0,29,0,116,114,97,110,115,112,111,115,101,0,1,0,0,28,109,0,0,0,1,8,58,109,97,116,52,
120,50,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,8,48,0,57,
59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,
57,59,122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119,0,0,0,0,0,1,0,30,0,
116,114,97,110,115,112,111,115,101,0,1,0,0,31,109,0,0,0,1,8,58,109,97,116,51,120,52,0,18,109,0,16,
8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,
16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,
0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,
109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,10,51,0,57,59,122,0,0,
0,0,0,1,0,31,0,116,114,97,110,115,112,111,115,101,0,1,0,0,30,109,0,0,0,1,8,58,109,97,116,52,120,51,
0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,
0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,
121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,
59,122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119,0,0,18,109,0,16,10,50,0,
57,59,119,0,0,0,0,0,0
@@ -1,5 +0,0 @@
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
/* slang_builtin_120_fragment.gc */
3,2,2,3,10,1,103,108,95,80,111,105,110,116,67,111,111,114,100,0,0,0,0
+2
View File
@@ -837,6 +837,7 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */
.globl gl_dispatch_stub_769 ; .type gl_dispatch_stub_769,#function
.globl gl_dispatch_stub_770 ; .type gl_dispatch_stub_770,#function
.globl gl_dispatch_stub_771 ; .type gl_dispatch_stub_771,#function
.globl gl_dispatch_stub_772 ; .type gl_dispatch_stub_772,#function
.globl _mesa_sparc_glapi_begin ; .type _mesa_sparc_glapi_begin,#function
_mesa_sparc_glapi_begin:
@@ -1612,6 +1613,7 @@ _mesa_sparc_glapi_begin:
GL_STUB(gl_dispatch_stub_769, _gloffset__dispatch_stub_769)
GL_STUB(gl_dispatch_stub_770, _gloffset__dispatch_stub_770)
GL_STUB(gl_dispatch_stub_771, _gloffset__dispatch_stub_771)
GL_STUB(gl_dispatch_stub_772, _gloffset__dispatch_stub_772)
.globl _mesa_sparc_glapi_end ; .type _mesa_sparc_glapi_end,#function
_mesa_sparc_glapi_end:
+9 -2
View File
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
* Version: 6.5.3
* Version: 7.0.2
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -71,13 +71,20 @@ regions_overlap(GLint srcx, GLint srcy,
}
else {
/* add one pixel of slop when zooming, just to be safe */
if ((srcx > dstx + (width * zoomX) + 1) || (srcx + width + 1 < dstx)) {
if (srcx > (dstx + ((zoomX > 0.0F) ? (width * zoomX + 1.0F) : 0.0F))) {
/* src is completely right of dest */
return GL_FALSE;
}
else if (srcx + width + 1.0F < dstx + ((zoomX > 0.0F) ? 0.0F : (width * zoomX))) {
/* src is completely left of dest */
return GL_FALSE;
}
else if ((srcy < dsty) && (srcy + height < dsty + (height * zoomY))) {
/* src is completely below dest */
return GL_FALSE;
}
else if ((srcy > dsty) && (srcy + height > dsty + (height * zoomY))) {
/* src is completely above dest */
return GL_FALSE;
}
else {
+2 -2
View File
@@ -217,9 +217,9 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
}
else {
/* even size */
xmin = (GLint) vert->win[0] - iRadius + 1;
xmin = (GLint) vert->win[0] - iRadius;
xmax = xmin + iSize - 1;
ymin = (GLint) vert->win[1] - iRadius + 1;
ymin = (GLint) vert->win[1] - iRadius;
ymax = ymin + iSize - 1;
}
#endif /*SMOOTH*/
+5 -2
View File
@@ -61,8 +61,11 @@ _swrast_span_default_z( GLcontext *ctx, SWspan *span )
const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF;
if (ctx->DrawBuffer->Visual.depthBits <= 16)
span->z = FloatToFixed(ctx->Current.RasterPos[2] * depthMax + 0.5F);
else
span->z = (GLint) (ctx->Current.RasterPos[2] * depthMax + 0.5F);
else {
GLfloat tmpf = ctx->Current.RasterPos[2] * depthMax;
tmpf = MIN2(tmpf, depthMax);
span->z = (GLint) tmpf;
}
span->zStep = 0;
span->interpMask |= SPAN_Z;
}
+10 -8
View File
@@ -198,14 +198,16 @@ static void TAG(quadfunc)( GLcontext *ctx, GLuint v0,
{
if (IND & SS_UNFILLED_BIT) {
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLubyte ef1 = VB->EdgeFlag[v1];
GLubyte ef3 = VB->EdgeFlag[v3];
VB->EdgeFlag[v1] = 0;
TAG(triangle)( ctx, v0, v1, v3 );
VB->EdgeFlag[v1] = ef1;
VB->EdgeFlag[v3] = 0;
TAG(triangle)( ctx, v1, v2, v3 );
VB->EdgeFlag[v3] = ef3;
if (VB->EdgeFlag) { /* XXX this test shouldn't be needed (bug 12614) */
GLubyte ef1 = VB->EdgeFlag[v1];
GLubyte ef3 = VB->EdgeFlag[v3];
VB->EdgeFlag[v1] = 0;
TAG(triangle)( ctx, v0, v1, v3 );
VB->EdgeFlag[v1] = ef1;
VB->EdgeFlag[v3] = 0;
TAG(triangle)( ctx, v1, v2, v3 );
VB->EdgeFlag[v3] = ef3;
}
} else {
TAG(triangle)( ctx, v0, v1, v3 );
TAG(triangle)( ctx, v1, v2, v3 );
+3 -4
View File
@@ -1,9 +1,8 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Version: 7.0.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2007 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"),
@@ -368,7 +367,7 @@ void _tnl_draw_prims( GLcontext *ctx,
_tnl_draw_prims );
return;
}
else if (max_index >= max) {
else if (max_index > max) {
/* The software TNL pipeline has a fixed amount of storage for
* vertices and it is necessary to split incoming drawing commands
* if they exceed that limit.
+27 -16
View File
@@ -41,7 +41,6 @@
struct fog_stage_data {
GLvector4f fogcoord; /* has actual storage allocated */
GLvector4f input; /* points into VB->EyePtr Z values */
};
#define FOG_STAGE_DATA(stage) ((struct fog_stage_data *)stage->privatePtr)
@@ -91,7 +90,8 @@ init_static_data( void )
* evaluating the GL_LINEAR, GL_EXP or GL_EXP2 fog function.
* Fog coordinates are distances from the eye (typically between the
* near and far clip plane distances).
* Note the fog (eye Z) coords may be negative so we use ABS(z) below.
* Note that fogcoords may be negative, if eye z is source absolute
* value must be taken earlier.
* Fog blend factors are in the range [0,1].
*/
static void
@@ -114,7 +114,7 @@ compute_fog_blend_factors(GLcontext *ctx, GLvector4f *out, const GLvector4f *in)
else
d = 1.0F / (ctx->Fog.End - ctx->Fog.Start);
for ( i = 0 ; i < n ; i++, STRIDE_F(v, stride)) {
const GLfloat z = FABSF(*v);
const GLfloat z = *v;
GLfloat f = (end - z) * d;
data[i][0] = CLAMP(f, 0.0F, 1.0F);
}
@@ -122,14 +122,14 @@ compute_fog_blend_factors(GLcontext *ctx, GLvector4f *out, const GLvector4f *in)
case GL_EXP:
d = ctx->Fog.Density;
for ( i = 0 ; i < n ; i++, STRIDE_F(v,stride)) {
const GLfloat z = FABSF(*v);
const GLfloat z = *v;
NEG_EXP( data[i][0], d * z );
}
break;
case GL_EXP2:
d = ctx->Fog.Density*ctx->Fog.Density;
for ( i = 0 ; i < n ; i++, STRIDE_F(v, stride)) {
const GLfloat z = FABSF(*v);
const GLfloat z = *v;
NEG_EXP( data[i][0], d * z * z );
}
break;
@@ -153,6 +153,8 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
if (ctx->Fog.FogCoordinateSource == GL_FRAGMENT_DEPTH_EXT) {
GLuint i;
GLfloat *coord;
/* Fog is computed from vertex or fragment Z values */
/* source = VB->ObjPtr or VB->EyePtr coords */
/* dest = VB->AttribPtr[_TNL_ATTRIB_FOG] = fog stage private storage */
@@ -167,11 +169,10 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
*/
input = &store->fogcoord;
/* NOTE: negate plane here so we get positive fog coords! */
plane[0] = -m[2];
plane[1] = -m[6];
plane[2] = -m[10];
plane[3] = -m[14];
plane[0] = m[2];
plane[1] = m[6];
plane[2] = m[10];
plane[3] = m[14];
/* Full eye coords weren't required, just calculate the
* eye Z values.
*/
@@ -180,18 +181,29 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
VB->ObjPtr, plane );
input->count = VB->ObjPtr->count;
/* make sure coords are really positive
NOTE should avoid going through array twice */
coord = input->start;
for (i = 0; i < input->count; i++) {
*coord = FABSF(*coord);
STRIDE_F(coord, input->stride);
}
}
else {
/* fog coordinates = eye Z coordinates (use ABS later) */
input = &store->input;
/* fog coordinates = eye Z coordinates - need to copy for ABS */
input = &store->fogcoord;
if (VB->EyePtr->size < 2)
_mesa_vector4f_clean_elem( VB->EyePtr, VB->Count, 2 );
input->data = (GLfloat (*)[4]) &(VB->EyePtr->data[0][2]);
input->start = VB->EyePtr->start+2;
input->stride = VB->EyePtr->stride;
input->stride = 4 * sizeof(GLfloat);
input->count = VB->EyePtr->count;
coord = VB->EyePtr->start;
for (i = 0 ; i < VB->EyePtr->count; i++) {
input->data[i][0] = FABSF(coord[2]);
STRIDE_F(coord, VB->EyePtr->stride);
}
}
}
else {
@@ -234,7 +246,6 @@ alloc_fog_data(GLcontext *ctx, struct tnl_pipeline_stage *stage)
return GL_FALSE;
_mesa_vector4f_alloc( &store->fogcoord, 0, tnl->vb.Size, 32 );
_mesa_vector4f_init( &store->input, 0, NULL );
if (!inited)
init_static_data();
+13 -3
View File
@@ -39,6 +39,12 @@
#include "x86/common_x86_asm.h"
/**
* Number of bytes to allocate for generated SSE functions
*/
#define MAX_SSE_CODE_SIZE 1024
#define X 0
#define Y 1
#define Z 2
@@ -348,8 +354,6 @@ static GLboolean build_vertex_emit( struct x86_program *p )
struct x86_reg vp1 = x86_make_reg(file_XMM, 2);
GLubyte *fixup, *label;
x86_init_func(&p->func);
/* Push a few regs?
*/
x86_push(&p->func, countEBP);
@@ -621,7 +625,10 @@ static GLboolean build_vertex_emit( struct x86_program *p )
x86_pop(&p->func, countEBP);
x86_ret(&p->func);
assert(!vtx->emit);
vtx->emit = (tnl_emit_func)x86_get_func(&p->func);
assert( (char *) p->func.csr - (char *) p->func.store <= MAX_SSE_CODE_SIZE );
return GL_TRUE;
}
@@ -646,7 +653,10 @@ void _tnl_generate_sse_emit( GLcontext *ctx )
p.identity = x86_make_reg(file_XMM, 6);
p.chan0 = x86_make_reg(file_XMM, 7);
x86_init_func(&p.func);
if (!x86_init_func(&p.func, MAX_SSE_CODE_SIZE)) {
vtx->emit = NULL;
return;
}
if (build_vertex_emit(&p)) {
_tnl_register_fastpath( vtx, GL_TRUE );
+50 -21
View File
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Version: 7.1
*
* Copyright (C) 2006 Tungsten Graphics All Rights Reserved.
* Copyright (C) 2007 Tungsten Graphics 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"),
@@ -33,11 +33,11 @@
#include "glheader.h"
#include "macros.h"
#include "enums.h"
#include "program.h"
#include "prog_instruction.h"
#include "prog_parameter.h"
#include "prog_print.h"
#include "prog_statevars.h"
#include "shader/program.h"
#include "shader/prog_instruction.h"
#include "shader/prog_parameter.h"
#include "shader/prog_print.h"
#include "shader/prog_statevars.h"
#include "t_context.h" /* NOTE: very light dependency on this */
#include "t_vp_build.h"
@@ -457,9 +457,13 @@ static void register_matrix_param5( struct tnl_program *p,
}
/**
* Convert a ureg source register to a prog_src_register.
*/
static void emit_arg( struct prog_src_register *src,
struct ureg reg )
{
assert(reg.file != PROGRAM_OUTPUT);
src->File = reg.file;
src->Index = reg.idx;
src->Swizzle = reg.swz;
@@ -469,15 +473,24 @@ static void emit_arg( struct prog_src_register *src,
src->RelAddr = 0;
}
/**
* Convert a ureg dest register to a prog_dst_register.
*/
static void emit_dst( struct prog_dst_register *dst,
struct ureg reg, GLuint mask )
{
/* Check for legal output register type. UNDEFINED will occur in
* instruction that don't produce a result (like END).
*/
assert(reg.file == PROGRAM_TEMPORARY ||
reg.file == PROGRAM_OUTPUT ||
reg.file == PROGRAM_UNDEFINED);
dst->File = reg.file;
dst->Index = reg.idx;
/* allow zero as a shorthand for xyzw */
dst->WriteMask = mask ? mask : WRITEMASK_XYZW;
dst->CondMask = COND_TR;
dst->CondSwizzle = 0;
dst->CondMask = COND_TR; /* always pass cond test */
dst->CondSwizzle = SWIZZLE_NOOP;
dst->CondSrc = 0;
dst->pad = 0;
}
@@ -500,7 +513,7 @@ static void debug_insn( struct prog_instruction *inst, const char *fn,
static void emit_op3fn(struct tnl_program *p,
GLuint op,
enum prog_opcode op,
struct ureg dest,
GLuint mask,
struct ureg src0,
@@ -686,7 +699,7 @@ static struct ureg get_eye_normal( struct tnl_program *p )
struct ureg rescale = register_param2(p, STATE_INTERNAL,
STATE_NORMAL_SCALE);
emit_op2( p, OPCODE_MUL, p->eye_normal, 0, normal,
emit_op2( p, OPCODE_MUL, p->eye_normal, 0, p->eye_normal,
swizzle1(rescale, X));
}
}
@@ -956,13 +969,19 @@ static void build_lighting( struct tnl_program *p )
STATE_POSITION);
struct ureg V = get_eye_position(p);
struct ureg dist = get_temp(p);
struct ureg tmpPpli = get_temp(p);
VPpli = get_temp(p);
half = get_temp(p);
/* Calulate VPpli vector
/* In homogeneous object coordinates
*/
emit_op1(p, OPCODE_RCP, dist, 0, swizzle1(Ppli, W));
emit_op2(p, OPCODE_MUL, tmpPpli, 0, Ppli, dist);
/* Calculate VPpli vector
*/
emit_op2(p, OPCODE_SUB, VPpli, 0, Ppli, V);
emit_op2(p, OPCODE_SUB, VPpli, 0, tmpPpli, V);
/* Normalize VPpli. The dist value also used in
* attenuation below.
@@ -994,6 +1013,7 @@ static void build_lighting( struct tnl_program *p )
emit_normalize_vec3(p, half, half);
release_temp(p, dist);
release_temp(p, tmpPpli);
}
/* Calculate dot products:
@@ -1103,7 +1123,7 @@ static void build_fog( struct tnl_program *p )
{
struct ureg fog = register_output(p, VERT_RESULT_FOGC);
struct ureg input;
if (p->state->fog_source_is_depth) {
input = swizzle1(get_eye_position(p), Z);
}
@@ -1111,39 +1131,48 @@ static void build_fog( struct tnl_program *p )
input = swizzle1(register_input(p, VERT_ATTRIB_FOG), X);
}
if (p->state->tnl_do_vertex_fog) {
if (p->state->fog_mode && p->state->tnl_do_vertex_fog) {
struct ureg params = register_param2(p, STATE_INTERNAL,
STATE_FOG_PARAMS_OPTIMIZED);
struct ureg tmp = get_temp(p);
GLboolean useabs = (p->state->fog_mode != FOG_EXP2);
if (useabs) {
emit_op1(p, OPCODE_ABS, tmp, 0, input);
}
switch (p->state->fog_mode) {
case FOG_LINEAR: {
struct ureg id = get_identity_param(p);
emit_op3(p, OPCODE_MAD, tmp, 0, input, swizzle1(params,X), swizzle1(params,Y));
emit_op3(p, OPCODE_MAD, tmp, 0, useabs ? tmp : input,
swizzle1(params,X), swizzle1(params,Y));
emit_op2(p, OPCODE_MAX, tmp, 0, tmp, swizzle1(id,X)); /* saturate */
emit_op2(p, OPCODE_MIN, fog, WRITEMASK_X, tmp, swizzle1(id,W));
break;
}
case FOG_EXP:
emit_op1(p, OPCODE_ABS, tmp, 0, input);
emit_op2(p, OPCODE_MUL, tmp, 0, tmp, swizzle1(params,Z));
emit_op2(p, OPCODE_MUL, tmp, 0, useabs ? tmp : input,
swizzle1(params,Z));
emit_op1(p, OPCODE_EX2, fog, WRITEMASK_X, negate(tmp));
break;
case FOG_EXP2:
emit_op2(p, OPCODE_MUL, tmp, 0, input, swizzle1(params,W));
emit_op2(p, OPCODE_MUL, tmp, 0, tmp, tmp);
emit_op2(p, OPCODE_MUL, tmp, 0, tmp, tmp);
emit_op1(p, OPCODE_EX2, fog, WRITEMASK_X, negate(tmp));
break;
}
release_temp(p, tmp);
}
else {
/* results = incoming fog coords (compute fog per-fragment later)
*
* KW: Is it really necessary to do anything in this case?
* BP: Yes, we always need to compute the absolute value, unless
* we want to push that down into the fragment program...
*/
emit_op1(p, OPCODE_MOV, fog, WRITEMASK_X, input);
GLboolean useabs = GL_TRUE;
emit_op1(p, useabs ? OPCODE_ABS : OPCODE_MOV, fog, WRITEMASK_X, input);
}
}
+4 -2
View File
@@ -132,9 +132,11 @@ static void vbo_bind_vertex_list( GLcontext *ctx,
}
for (attr = 0; attr < VBO_ATTRIB_MAX; attr++) {
if (node->attrsz[attr]) {
GLuint src = map[attr];
if (node->attrsz[src]) {
arrays[attr].Ptr = (const GLubyte *)data;
arrays[attr].Size = node->attrsz[attr];
arrays[attr].Size = node->attrsz[src];
arrays[attr].StrideB = node->vertex_size * sizeof(GLfloat);
arrays[attr].Stride = node->vertex_size * sizeof(GLfloat);
arrays[attr].Type = GL_FLOAT;
+8 -1
View File
@@ -129,6 +129,13 @@ static GLuint attr_size( const struct gl_client_array *array )
*/
static GLboolean check_flush( struct copy_context *copy )
{
GLenum mode = copy->dstprim[copy->dstprim_nr].mode;
if (GL_TRIANGLE_STRIP == mode &&
copy->dstelt_nr & 1) { /* see bug9962 */
return GL_FALSE;
}
if (copy->dstbuf_nr + 4 > copy->dstbuf_size)
return GL_TRUE;
@@ -458,7 +465,7 @@ static void replay_init( struct copy_context *copy )
dst->StrideB = copy->vertex_size;
dst->Ptr = copy->dstbuf + offset;
dst->Enabled = GL_TRUE;
dst->Normalized = GL_TRUE;
dst->Normalized = src->Normalized;
dst->BufferObj = ctx->Array.NullBufferObj;
dst->_MaxElement = copy->dstbuf_size; /* may be less! */
@@ -29175,7 +29175,11 @@ GL_PREFIX(_dispatch_stub_770):
pushq %rdi
pushq %rsi
pushq %rdx
pushq %rcx
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
popq %rcx
popq %rdx
popq %rsi
popq %rdi
@@ -29191,7 +29195,11 @@ GL_PREFIX(_dispatch_stub_770):
pushq %rdi
pushq %rsi
pushq %rdx
pushq %rcx
pushq %rbp
call _glapi_get_dispatch
popq %rbp
popq %rcx
popq %rdx
popq %rsi
popq %rdi
@@ -29238,6 +29246,44 @@ GL_PREFIX(_dispatch_stub_771):
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(_dispatch_stub_771), .-GL_PREFIX(_dispatch_stub_771)
.p2align 4,,15
.globl GL_PREFIX(_dispatch_stub_772)
.type GL_PREFIX(_dispatch_stub_772), @function
HIDDEN(GL_PREFIX(_dispatch_stub_772))
GL_PREFIX(_dispatch_stub_772):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 6176(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
pushq %rsi
pushq %rdx
call _x86_64_get_dispatch@PLT
popq %rdx
popq %rsi
popq %rdi
movq 6176(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
movq 6176(%rax), %r11
jmp *%r11
1:
pushq %rdi
pushq %rsi
pushq %rdx
call _glapi_get_dispatch
popq %rdx
popq %rsi
popq %rdi
movq 6176(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(_dispatch_stub_772), .-GL_PREFIX(_dispatch_stub_772)
.globl GL_PREFIX(ArrayElementEXT) ; .set GL_PREFIX(ArrayElementEXT), GL_PREFIX(ArrayElement)
.globl GL_PREFIX(BindTextureEXT) ; .set GL_PREFIX(BindTextureEXT), GL_PREFIX(BindTexture)
.globl GL_PREFIX(DrawArraysEXT) ; .set GL_PREFIX(DrawArraysEXT), GL_PREFIX(DrawArrays)
-162
View File
@@ -1,162 +0,0 @@
/*
* This file is automatically generated from the Mesa internal type
* definitions. Do not edit directly.
*/
#ifndef __ASM_TYPES_H__
#define __ASM_TYPES_H__
/* =============================================================
* Offsets for GLcontext
*/
#define CTX_DRIVER_CTX 952
#define CTX_LIGHT_ENABLED 39312
#define CTX_LIGHT_SHADE_MODEL 39316
#define CTX_LIGHT_COLOR_MAT_FACE 39320
#define CTX_LIGHT_COLOR_MAT_MODE 39324
#define CTX_LIGHT_COLOR_MAT_MASK 39328
#define CTX_LIGHT_COLOR_MAT_ENABLED 39332
#define CTX_LIGHT_ENABLED_LIST 39340
#define CTX_LIGHT_NEED_VERTS 43701
#define CTX_LIGHT_FLAGS 43704
#define CTX_LIGHT_BASE_COLOR 43708
/* =============================================================
* Offsets for struct vertex_buffer
*/
#define VB_SIZE 0
#define VB_COUNT 4
#define VB_ELTS 8
#define VB_OBJ_PTR 12
#define VB_EYE_PTR 16
#define VB_CLIP_PTR 20
#define VB_PROJ_CLIP_PTR 24
#define VB_CLIP_OR_MASK 28
#define VB_CLIP_MASK 32
#define VB_NORMAL_PTR 36
#define VB_EDGE_FLAG 44
#define VB_TEX0_COORD_PTR 48
#define VB_TEX1_COORD_PTR 52
#define VB_TEX2_COORD_PTR 56
#define VB_TEX3_COORD_PTR 60
#define VB_INDEX_PTR 80
#define VB_COLOR_PTR 88
#define VB_SECONDARY_COLOR_PTR 96
#define VB_FOG_COORD_PTR 104
#define VB_PRIMITIVE 108
/*
* Flags for struct vertex_buffer
*/
#define VERT_BIT_OBJ 0x1
#define VERT_BIT_NORM 0x4
#define VERT_BIT_RGBA 0x8
#define VERT_BIT_SPEC_RGB 0x10
#define VERT_BIT_FOG_COORD 0x20
#define VERT_BIT_TEX0 0x100
#define VERT_BIT_TEX1 0x200
#define VERT_BIT_TEX2 0x400
#define VERT_BIT_TEX3 0x800
/* =============================================================
* Offsets for GLvector4f
*/
#define V4F_DATA 0
#define V4F_START 4
#define V4F_COUNT 8
#define V4F_STRIDE 12
#define V4F_SIZE 16
#define V4F_FLAGS 20
/*
* Flags for GLvector4f
*/
#define VEC_MALLOC 0x10
#define VEC_NOT_WRITEABLE 0x40
#define VEC_BAD_STRIDE 0x100
#define VEC_SIZE_1 0x1
#define VEC_SIZE_2 0x3
#define VEC_SIZE_3 0x7
#define VEC_SIZE_4 0xf
/* =============================================================
* Offsets for GLmatrix
*/
#define MATRIX_DATA 0
#define MATRIX_INV 4
#define MATRIX_FLAGS 8
#define MATRIX_TYPE 12
/* =============================================================
* Offsets for struct gl_light
*/
#define LIGHT_NEXT 0
#define LIGHT_PREV 4
#define LIGHT_AMBIENT 8
#define LIGHT_DIFFUSE 24
#define LIGHT_SPECULAR 40
#define LIGHT_EYE_POSITION 56
#define LIGHT_EYE_DIRECTION 72
#define LIGHT_SPOT_EXPONENT 88
#define LIGHT_SPOT_CUTOFF 92
#define LIGHT_COS_CUTOFF 100
#define LIGHT_CONST_ATTEN 104
#define LIGHT_LINEAR_ATTEN 108
#define LIGHT_QUADRATIC_ATTEN 112
#define LIGHT_ENABLED 116
#define LIGHT_FLAGS 120
#define LIGHT_POSITION 124
#define LIGHT_VP_INF_NORM 140
#define LIGHT_H_INF_NORM 152
#define LIGHT_NORM_DIRECTION 164
#define LIGHT_VP_INF_SPOT_ATTEN 180
#define LIGHT_SPOT_EXP_TABLE 184
#define LIGHT_MAT_AMBIENT 4280
#define LIGHT_MAT_DIFFUSE 4304
#define LIGHT_MAT_SPECULAR 4328
#define SIZEOF_GL_LIGHT 4360
/*
* Flags for struct gl_light
*/
#define LIGHT_SPOT 0x1
#define LIGHT_LOCAL_VIEWER 0x2
#define LIGHT_POSITIONAL 0x4
#define LIGHT_NEED_VERTICES 0x6
/* =============================================================
* Offsets for struct gl_lightmodel
*/
#define LIGHT_MODEL_AMBIENT 0
#define LIGHT_MODEL_LOCAL_VIEWER 16
#define LIGHT_MODEL_TWO_SIDE 17
#define LIGHT_MODEL_COLOR_CONTROL 20
#endif /* __ASM_TYPES_H__ */
+4 -6
View File
@@ -1,10 +1,8 @@
/* $Id: xform4.S,v 1.2 2006/04/17 18:58:24 krh Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
* Version: 7.0.1
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2007 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"),
@@ -64,7 +62,7 @@ _mesa_x86_64_transform_points4_general:
p4_general_loop:
movaps (%rdx), %xmm8 /* ox | oy | oz | ow */
movups (%rdx), %xmm8 /* ox | oy | oz | ow */
prefetchw 16(%rdi)
pshufd $0x00, %xmm8, %xmm0 /* ox | ox | ox | ox */
@@ -149,7 +147,7 @@ _mesa_x86_64_transform_points4_3d:
p4_3d_loop:
movaps (%rdx), %xmm8 /* ox | oy | oz | ow */
movups (%rdx), %xmm8 /* ox | oy | oz | ow */
prefetchw 16(%rdi)
pshufd $0x00, %xmm8, %xmm0 /* ox | ox | ox | ox */
+8 -5
View File
@@ -947,14 +947,16 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB(RenderbufferStorageEXT, _gloffset_RenderbufferStorageEXT, RenderbufferStorageEXT@16)
GL_STUB(_dispatch_stub_767, _gloffset_BlitFramebufferEXT, _dispatch_stub_767@40)
HIDDEN(GL_PREFIX(_dispatch_stub_767, _dispatch_stub_767@40))
GL_STUB(_dispatch_stub_768, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_768@16)
GL_STUB(_dispatch_stub_768, _gloffset_StencilFuncSeparateATI, _dispatch_stub_768@16)
HIDDEN(GL_PREFIX(_dispatch_stub_768, _dispatch_stub_768@16))
GL_STUB(_dispatch_stub_769, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_769@16)
GL_STUB(_dispatch_stub_769, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_769@16)
HIDDEN(GL_PREFIX(_dispatch_stub_769, _dispatch_stub_769@16))
GL_STUB(_dispatch_stub_770, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_770@12)
HIDDEN(GL_PREFIX(_dispatch_stub_770, _dispatch_stub_770@12))
GL_STUB(_dispatch_stub_771, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_771@12)
GL_STUB(_dispatch_stub_770, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_770@16)
HIDDEN(GL_PREFIX(_dispatch_stub_770, _dispatch_stub_770@16))
GL_STUB(_dispatch_stub_771, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_771@12)
HIDDEN(GL_PREFIX(_dispatch_stub_771, _dispatch_stub_771@12))
GL_STUB(_dispatch_stub_772, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_772@12)
HIDDEN(GL_PREFIX(_dispatch_stub_772, _dispatch_stub_772@12))
GL_STUB_ALIAS(ArrayElementEXT, _gloffset_ArrayElement, ArrayElementEXT@4, ArrayElement, ArrayElement@4)
GL_STUB_ALIAS(BindTextureEXT, _gloffset_BindTexture, BindTextureEXT@8, BindTexture, BindTexture@8)
GL_STUB_ALIAS(DrawArraysEXT, _gloffset_DrawArrays, DrawArraysEXT@12, DrawArrays, DrawArrays@12)
@@ -1086,6 +1088,7 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(MultiTexCoord4iv, _gloffset_MultiTexCoord4ivARB, MultiTexCoord4iv@8, MultiTexCoord4ivARB, MultiTexCoord4ivARB@8)
GL_STUB_ALIAS(MultiTexCoord4s, _gloffset_MultiTexCoord4sARB, MultiTexCoord4s@20, MultiTexCoord4sARB, MultiTexCoord4sARB@20)
GL_STUB_ALIAS(MultiTexCoord4sv, _gloffset_MultiTexCoord4svARB, MultiTexCoord4sv@8, MultiTexCoord4svARB, MultiTexCoord4svARB@8)
GL_STUB_ALIAS(StencilOpSeparateATI, _gloffset_StencilOpSeparate, StencilOpSeparateATI@16, StencilOpSeparate, StencilOpSeparate@16)
GL_STUB_ALIAS(LoadTransposeMatrixd, _gloffset_LoadTransposeMatrixdARB, LoadTransposeMatrixd@4, LoadTransposeMatrixdARB, LoadTransposeMatrixdARB@4)
GL_STUB_ALIAS(LoadTransposeMatrixf, _gloffset_LoadTransposeMatrixfARB, LoadTransposeMatrixf@4, LoadTransposeMatrixfARB, LoadTransposeMatrixfARB@4)
GL_STUB_ALIAS(MultTransposeMatrixd, _gloffset_MultTransposeMatrixdARB, MultTransposeMatrixd@4, MultTransposeMatrixdARB, MultTransposeMatrixdARB@4)
+10 -10
View File
@@ -15,16 +15,16 @@
#define CTX_DRIVER_CTX 952
#define CTX_LIGHT_ENABLED 39312
#define CTX_LIGHT_SHADE_MODEL 39316
#define CTX_LIGHT_COLOR_MAT_FACE 39320
#define CTX_LIGHT_COLOR_MAT_MODE 39324
#define CTX_LIGHT_COLOR_MAT_MASK 39328
#define CTX_LIGHT_COLOR_MAT_ENABLED 39332
#define CTX_LIGHT_ENABLED_LIST 39340
#define CTX_LIGHT_NEED_VERTS 43701
#define CTX_LIGHT_FLAGS 43704
#define CTX_LIGHT_BASE_COLOR 43708
#define CTX_LIGHT_ENABLED 39056
#define CTX_LIGHT_SHADE_MODEL 39060
#define CTX_LIGHT_COLOR_MAT_FACE 39064
#define CTX_LIGHT_COLOR_MAT_MODE 39068
#define CTX_LIGHT_COLOR_MAT_MASK 39072
#define CTX_LIGHT_COLOR_MAT_ENABLED 39076
#define CTX_LIGHT_ENABLED_LIST 39084
#define CTX_LIGHT_NEED_VERTS 43445
#define CTX_LIGHT_FLAGS 43448
#define CTX_LIGHT_BASE_COLOR 43452
/* =============================================================
+15 -118
View File
@@ -33,20 +33,7 @@
.file "read_rgba_span_x86.S"
#if !defined(__DJGPP__) && !defined(__MINGW32__) /* this one cries for assyntax.h */
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
.section .rodata
.align 16
.type mask, @object
.size mask, 32
mask:
.long 0xff00ff00
.long 0xff00ff00
.long 0xff00ff00
.long 0xff00ff00
.long 0x00ff0000
.long 0x00ff0000
.long 0x00ff0000
.long 0x00ff0000
* Replaced data segment constants with text-segment instructions.
*/
#define LOAD_MASK(mvins,m1,m2) \
pushl $0xff00ff00 ;\
@@ -61,8 +48,7 @@ mask:
mvins (%esp), m2 ;\
addl $32, %esp
/* I implemented these as macros because the appear in quite a few places,
/* I implemented these as macros because they appear in several places,
* and I've tweaked them a number of times. I got tired of changing every
* place they appear. :)
*/
@@ -99,11 +85,6 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX:
#ifdef USE_INNER_EMMS
emms
#endif
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
movq mask, %mm1
movq mask+16, %mm2
*/
LOAD_MASK(movq,%mm1,%mm2)
movl 8(%esp), %ebx /* source pointer */
@@ -201,11 +182,7 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE:
#ifdef USE_INNER_EMMS
emms
#endif
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
movq mask, %mm1
movq mask+16, %mm2
*/
LOAD_MASK(movq,%mm1,%mm2)
movl 16(%esp), %ebx /* source pointer */
@@ -364,11 +341,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2:
pushl %esi
pushl %ebx
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
movdqa mask, %xmm1
movdqa mask+16, %xmm2
*/
LOAD_MASK(movdqu,%xmm1,%xmm2)
movl 12(%esp), %ebx /* source pointer */
@@ -491,60 +463,12 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2:
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
*/
#if 0
.section .rodata
.align 16
mask_565:
.word 0xf800
.word 0x07e0
.word 0x001f
.word 0x0000
/* Setting SCALE_ADJUST to 5 gives a perfect match with the classic C
* implementation in Mesa. Setting SCALE_ADJUST to 0 is slightly faster but
* at a small cost to accuracy.
*/
#define SCALE_ADJUST 5
#if SCALE_ADJUST == 5
prescale:
.word 0x0001
.word 0x0010
.word 0x0200
.word 0x0000
scale:
.word 0x20e8 /* (0x00ff0000 / 0x000007c0) + 1 */
.word 0x40c5 /* (0x00ff0000 / 0x000003f0) + 1 */
.word 0x839d /* (0x00ff0000 / 0x000001f0) + 1 */
.word 0x0000
#elif SCALE_ADJUST == 0
prescale:
.word 0x0001
.word 0x0020
.word 0x0800
.word 0x0000
scale:
.word 0x0108 /* (0x00ff0000 / 0x0000f800) + 1 */
.word 0x0104 /* (0x00ff0000 / 0x0000fc00) + 1 */
.word 0x0108 /* (0x00ff0000 / 0x0000f800) + 1 */
.word 0x0000
#else
#error SCALE_ADJUST must either be 5 or 0.
#endif
alpha: .long 0x00000000
.long 0x00ff0000
#endif
#define MASK_565_L 0x07e0f800
#define MASK_565_H 0x0000001f
/* Setting SCALE_ADJUST to 5 gives a perfect match with the
* classic C implementation in Mesa. Setting SCALE_ADJUST
* to 0 is slightly faster but at a small cost to accuracy.
*/
#define SCALE_ADJUST 5
#if SCALE_ADJUST == 5
#define PRESCALE_L 0x00100001
@@ -581,23 +505,17 @@ _generic_read_RGBA_span_RGB565_MMX:
movl 8(%esp), %edx /* destination pointer */
movl 12(%esp), %ecx /* number of pixels to copy */
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
movq mask_565, %mm5
movq prescale, %mm6
movq scale, %mm7
*/
pushl MASK_565_H
pushl MASK_565_L
pushl $MASK_565_H
pushl $MASK_565_L
movq (%esp), %mm5
pushl PRESCALE_H
pushl PRESCALE_L
pushl $PRESCALE_H
pushl $PRESCALE_L
movq (%esp), %mm6
pushl SCALE_H
pushl SCALE_L
pushl $SCALE_H
pushl $SCALE_L
movq (%esp), %mm7
pushl ALPHA_H
pushl ALPHA_L
pushl $ALPHA_H
pushl $ALPHA_L
movq (%esp), %mm3
addl $32,%esp
@@ -648,11 +566,6 @@ _generic_read_RGBA_span_RGB565_MMX:
/* Always set the alpha value to 0xff.
*/
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
por alpha, %mm0
por alpha, %mm2
*/
por %mm3, %mm0
por %mm3, %mm2
@@ -665,8 +578,6 @@ _generic_read_RGBA_span_RGB565_MMX:
movq %mm0, (%edx)
addl $8, %edx
pshufw $0xaa, %mm4, %mm0
pshufw $0xff, %mm4, %mm2
@@ -681,11 +592,6 @@ _generic_read_RGBA_span_RGB565_MMX:
pmulhuw %mm7, %mm0
pmulhuw %mm7, %mm2
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
por alpha, %mm0
por alpha, %mm2
*/
por %mm3, %mm0
por %mm3, %mm2
@@ -724,11 +630,6 @@ _generic_read_RGBA_span_RGB565_MMX:
pmulhuw %mm7, %mm0
pmulhuw %mm7, %mm2
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
por alpha, %mm0
por alpha, %mm2
*/
por %mm3, %mm0
por %mm3, %mm2
@@ -757,10 +658,6 @@ _generic_read_RGBA_span_RGB565_MMX:
#endif
pmulhuw %mm7, %mm0
/* Kevin F. Quinn 2nd July 2006
* Replace data segment constants with text-segment instructions
por alpha, %mm0
*/
por %mm3, %mm0
packuswb %mm0, %mm0
+17 -8
View File
@@ -1063,20 +1063,29 @@ struct x86_reg x86_fn_arg( struct x86_function *p,
}
void x86_init_func( struct x86_function *p )
{
x86_init_func_size(p, 1024);
}
void x86_init_func_size( struct x86_function *p, GLuint code_size )
/**
* Initialize an x86_function object, allocating space for up to
* 'code_size' bytes of code.
*/
GLboolean x86_init_func( struct x86_function *p, GLuint code_size )
{
assert(!p->store);
p->store = _mesa_exec_malloc(code_size);
p->csr = p->store;
if (p->store) {
p->csr = p->store;
return GL_TRUE;
}
else {
p->csr = NULL;
return GL_FALSE;
}
}
void x86_release_func( struct x86_function *p )
{
_mesa_exec_free(p->store);
if (p->store)
_mesa_exec_free(p->store);
p->store = p->csr = NULL;
}
+1 -2
View File
@@ -80,8 +80,7 @@ enum sse_cc {
*/
void x86_init_func( struct x86_function *p );
void x86_init_func_size( struct x86_function *p, GLuint code_size );
GLboolean x86_init_func( struct x86_function *p, GLuint code_size );
void x86_release_func( struct x86_function *p );
void (*x86_get_func( struct x86_function *p ))( void );