summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaders.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/shaders.c')
-rw-r--r--src/mesa/main/shaders.c149
1 files changed, 71 insertions, 78 deletions
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index 917e295fe15..761b3e85a74 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -49,7 +49,7 @@
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader)
{
GET_CURRENT_CONTEXT(ctx);
@@ -57,7 +57,7 @@ _mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_AttachShader(GLuint program, GLuint shader)
{
GET_CURRENT_CONTEXT(ctx);
@@ -65,7 +65,7 @@ _mesa_AttachShader(GLuint program, GLuint shader)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_BindAttribLocationARB(GLhandleARB program, GLuint index,
const GLcharARB *name)
{
@@ -74,7 +74,7 @@ _mesa_BindAttribLocationARB(GLhandleARB program, GLuint index,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_CompileShaderARB(GLhandleARB shaderObj)
{
GET_CURRENT_CONTEXT(ctx);
@@ -82,7 +82,7 @@ _mesa_CompileShaderARB(GLhandleARB shaderObj)
}
-static GLuint GLAPIENTRY
+GLuint GLAPIENTRY
_mesa_CreateShader(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
@@ -90,7 +90,7 @@ _mesa_CreateShader(GLenum type)
}
-static GLhandleARB GLAPIENTRY
+GLhandleARB GLAPIENTRY
_mesa_CreateShaderObjectARB(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
@@ -98,7 +98,7 @@ _mesa_CreateShaderObjectARB(GLenum type)
}
-static GLuint GLAPIENTRY
+GLuint GLAPIENTRY
_mesa_CreateProgram(void)
{
GET_CURRENT_CONTEXT(ctx);
@@ -106,7 +106,7 @@ _mesa_CreateProgram(void)
}
-static GLhandleARB GLAPIENTRY
+GLhandleARB GLAPIENTRY
_mesa_CreateProgramObjectARB(void)
{
GET_CURRENT_CONTEXT(ctx);
@@ -114,7 +114,7 @@ _mesa_CreateProgramObjectARB(void)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_DeleteObjectARB(GLhandleARB obj)
{
if (obj) {
@@ -132,7 +132,7 @@ _mesa_DeleteObjectARB(GLhandleARB obj)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_DeleteProgram(GLuint name)
{
if (name) {
@@ -142,7 +142,7 @@ _mesa_DeleteProgram(GLuint name)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_DeleteShader(GLuint name)
{
if (name) {
@@ -152,7 +152,7 @@ _mesa_DeleteShader(GLuint name)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader)
{
GET_CURRENT_CONTEXT(ctx);
@@ -160,7 +160,7 @@ _mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_DetachShader(GLuint program, GLuint shader)
{
GET_CURRENT_CONTEXT(ctx);
@@ -168,7 +168,7 @@ _mesa_DetachShader(GLuint program, GLuint shader)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetActiveAttribARB(GLhandleARB program, GLuint index,
GLsizei maxLength, GLsizei * length, GLint * size,
GLenum * type, GLcharARB * name)
@@ -179,7 +179,7 @@ _mesa_GetActiveAttribARB(GLhandleARB program, GLuint index,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetActiveUniformARB(GLhandleARB program, GLuint index,
GLsizei maxLength, GLsizei * length, GLint * size,
GLenum * type, GLcharARB * name)
@@ -190,7 +190,7 @@ _mesa_GetActiveUniformARB(GLhandleARB program, GLuint index,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetAttachedObjectsARB(GLhandleARB container, GLsizei maxCount,
GLsizei * count, GLhandleARB * obj)
{
@@ -199,7 +199,7 @@ _mesa_GetAttachedObjectsARB(GLhandleARB container, GLsizei maxCount,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
GLsizei *count, GLuint *obj)
{
@@ -208,7 +208,7 @@ _mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
}
-static GLint GLAPIENTRY
+GLint GLAPIENTRY
_mesa_GetAttribLocationARB(GLhandleARB program, const GLcharARB * name)
{
GET_CURRENT_CONTEXT(ctx);
@@ -216,7 +216,7 @@ _mesa_GetAttribLocationARB(GLhandleARB program, const GLcharARB * name)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetInfoLogARB(GLhandleARB object, GLsizei maxLength, GLsizei * length,
GLcharARB * infoLog)
{
@@ -234,7 +234,7 @@ _mesa_GetInfoLogARB(GLhandleARB object, GLsizei maxLength, GLsizei * length,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -261,7 +261,7 @@ _mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetObjectParameterfvARB(GLhandleARB object, GLenum pname,
GLfloat *params)
{
@@ -271,7 +271,7 @@ _mesa_GetObjectParameterfvARB(GLhandleARB object, GLenum pname,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -279,7 +279,7 @@ _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -287,7 +287,7 @@ _mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
@@ -296,7 +296,7 @@ _mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
@@ -305,7 +305,7 @@ _mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetShaderSourceARB(GLhandleARB shader, GLsizei maxLength,
GLsizei *length, GLcharARB *sourceOut)
{
@@ -314,7 +314,7 @@ _mesa_GetShaderSourceARB(GLhandleARB shader, GLsizei maxLength,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetUniformfvARB(GLhandleARB program, GLint location, GLfloat * params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -322,7 +322,7 @@ _mesa_GetUniformfvARB(GLhandleARB program, GLint location, GLfloat * params)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint * params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -341,7 +341,7 @@ _mesa_GetUniformLocation(GLuint program, const GLcharARB *name)
#endif
-static GLhandleARB GLAPIENTRY
+GLhandleARB GLAPIENTRY
_mesa_GetHandleARB(GLenum pname)
{
GET_CURRENT_CONTEXT(ctx);
@@ -349,7 +349,7 @@ _mesa_GetHandleARB(GLenum pname)
}
-static GLint GLAPIENTRY
+GLint GLAPIENTRY
_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
{
GET_CURRENT_CONTEXT(ctx);
@@ -357,7 +357,7 @@ _mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
}
-static GLboolean GLAPIENTRY
+GLboolean GLAPIENTRY
_mesa_IsProgram(GLuint name)
{
GET_CURRENT_CONTEXT(ctx);
@@ -365,7 +365,7 @@ _mesa_IsProgram(GLuint name)
}
-static GLboolean GLAPIENTRY
+GLboolean GLAPIENTRY
_mesa_IsShader(GLuint name)
{
GET_CURRENT_CONTEXT(ctx);
@@ -373,7 +373,7 @@ _mesa_IsShader(GLuint name)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_LinkProgramARB(GLhandleARB programObj)
{
GET_CURRENT_CONTEXT(ctx);
@@ -416,7 +416,7 @@ _mesa_read_shader(const char *fname)
* Basically, concatenate the source code strings into one long string
* and pass it to ctx->Driver.ShaderSource().
*/
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
const GLcharARB ** string, const GLint * length)
{
@@ -509,14 +509,14 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform1fARB(GLint location, GLfloat v0)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, 1, &v0, GL_FLOAT);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1)
{
GET_CURRENT_CONTEXT(ctx);
@@ -526,7 +526,7 @@ _mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1)
ctx->Driver.Uniform(ctx, location, 1, v, GL_FLOAT_VEC2);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
{
GET_CURRENT_CONTEXT(ctx);
@@ -537,7 +537,7 @@ _mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
ctx->Driver.Uniform(ctx, location, 1, v, GL_FLOAT_VEC3);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
GLfloat v3)
{
@@ -550,14 +550,14 @@ _mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
ctx->Driver.Uniform(ctx, location, 1, v, GL_FLOAT_VEC4);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform1iARB(GLint location, GLint v0)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, 1, &v0, GL_INT);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform2iARB(GLint location, GLint v0, GLint v1)
{
GET_CURRENT_CONTEXT(ctx);
@@ -567,7 +567,7 @@ _mesa_Uniform2iARB(GLint location, GLint v0, GLint v1)
ctx->Driver.Uniform(ctx, location, 1, v, GL_INT_VEC2);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2)
{
GET_CURRENT_CONTEXT(ctx);
@@ -578,7 +578,7 @@ _mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2)
ctx->Driver.Uniform(ctx, location, 1, v, GL_INT_VEC3);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
{
GET_CURRENT_CONTEXT(ctx);
@@ -590,56 +590,56 @@ _mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
ctx->Driver.Uniform(ctx, location, 1, v, GL_INT_VEC4);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT_VEC2);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT_VEC3);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT_VEC4);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_INT);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_INT_VEC2);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_INT_VEC3);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
@@ -648,14 +648,14 @@ _mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value)
/** OpenGL 3.0 GLuint-valued functions **/
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform1ui(GLint location, GLuint v0)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, 1, &v0, GL_UNSIGNED_INT);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1)
{
GET_CURRENT_CONTEXT(ctx);
@@ -665,7 +665,7 @@ _mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1)
ctx->Driver.Uniform(ctx, location, 1, v, GL_UNSIGNED_INT_VEC2);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
{
GET_CURRENT_CONTEXT(ctx);
@@ -676,7 +676,7 @@ _mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
ctx->Driver.Uniform(ctx, location, 1, v, GL_UNSIGNED_INT_VEC3);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
GET_CURRENT_CONTEXT(ctx);
@@ -688,28 +688,28 @@ _mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
ctx->Driver.Uniform(ctx, location, 1, v, GL_UNSIGNED_INT_VEC4);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_UNSIGNED_INT);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_UNSIGNED_INT_VEC2);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.Uniform(ctx, location, count, value, GL_UNSIGNED_INT_VEC3);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
@@ -718,7 +718,7 @@ _mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
@@ -726,7 +726,7 @@ _mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
ctx->Driver.UniformMatrix(ctx, 2, 2, location, count, transpose, value);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
@@ -734,7 +734,7 @@ _mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
ctx->Driver.UniformMatrix(ctx, 3, 3, location, count, transpose, value);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
@@ -746,7 +746,7 @@ _mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
/**
* Non-square UniformMatrix are OpenGL 2.1
*/
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
@@ -754,7 +754,7 @@ _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
ctx->Driver.UniformMatrix(ctx, 2, 3, location, count, transpose, value);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
@@ -762,7 +762,7 @@ _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
ctx->Driver.UniformMatrix(ctx, 3, 2, location, count, transpose, value);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
@@ -770,7 +770,7 @@ _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
ctx->Driver.UniformMatrix(ctx, 2, 4, location, count, transpose, value);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
@@ -778,7 +778,7 @@ _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
ctx->Driver.UniformMatrix(ctx, 4, 2, location, count, transpose, value);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
@@ -786,7 +786,7 @@ _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
ctx->Driver.UniformMatrix(ctx, 3, 4, location, count, transpose, value);
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
@@ -804,7 +804,7 @@ _mesa_UseProgramObjectARB(GLhandleARB program)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_ValidateProgramARB(GLhandleARB program)
{
GET_CURRENT_CONTEXT(ctx);
@@ -813,7 +813,7 @@ _mesa_ValidateProgramARB(GLhandleARB program)
#ifdef FEATURE_ES2
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
GLint* range, GLint* precision)
{
@@ -822,7 +822,7 @@ _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_ReleaseShaderCompiler(void)
{
GET_CURRENT_CONTEXT(ctx);
@@ -830,7 +830,7 @@ _mesa_ReleaseShaderCompiler(void)
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
const void* binary, GLint length)
{
@@ -917,13 +917,6 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec)
SET_GetAttribLocationARB(exec, _mesa_GetAttribLocationARB);
#endif
-#ifdef FEATURE_ES2
- /* XXX finish dispatch */
- (void) _mesa_GetShaderPrecisionFormat;
- (void) _mesa_ReleaseShaderCompiler;
- (void) _mesa_ShaderBinary;
-#endif
-
/* OpenGL 3.0 */
/* XXX finish dispatch */
(void) _mesa_Uniform1ui;