summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-04-22 20:34:33 -0400
committerKristian Høgsberg <[email protected]>2010-04-27 19:28:10 -0400
commitc90166fd4fad6bbbeda51a4338bf17d976864188 (patch)
tree24bf886d5bee4d4dcc5e4b4883bb494a7385f293 /src/mesa
parentea0c7e71638a4a72a4eae962e6cc471bd33a5605 (diff)
mesa: Move GLES2 shader stubs to main/shaders.c
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/es/main/stubs.c23
-rw-r--r--src/mesa/main/shaders.c28
-rw-r--r--src/mesa/main/shaders.h11
3 files changed, 39 insertions, 23 deletions
diff --git a/src/mesa/es/main/stubs.c b/src/mesa/es/main/stubs.c
index b829543cc01..65866917150 100644
--- a/src/mesa/es/main/stubs.c
+++ b/src/mesa/es/main/stubs.c
@@ -60,29 +60,6 @@ _vbo_Materialf(GLenum face, GLenum pname, GLfloat param)
void GLAPIENTRY
-_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
- GLint* range, GLint* precision)
-{
- NEED_IMPLEMENT();
-}
-
-
-void GLAPIENTRY
-_mesa_ReleaseShaderCompiler(void)
-{
- NEED_IMPLEMENT();
-}
-
-
-void GLAPIENTRY
-_mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
- const void* binary, GLint length)
-{
- NEED_IMPLEMENT();
-}
-
-
-void GLAPIENTRY
_vbo_VertexAttrib1f(GLuint indx, GLfloat x)
{
_vbo_VertexAttrib4f(indx, x, 0.0, 0.0, 1.0f);
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index f382680b443..f877320d699 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -739,3 +739,31 @@ _mesa_ValidateProgramARB(GLhandleARB program)
ctx->Driver.ValidateProgram(ctx, program);
}
+#ifdef FEATURE_ES2
+
+void GLAPIENTRY
+_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
+ GLint* range, GLint* precision)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+}
+
+
+void GLAPIENTRY
+_mesa_ReleaseShaderCompiler(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+}
+
+
+void GLAPIENTRY
+_mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
+ const void* binary, GLint length)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+}
+
+#endif
diff --git a/src/mesa/main/shaders.h b/src/mesa/main/shaders.h
index 17339ccf623..6ab6d6bfeaf 100644
--- a/src/mesa/main/shaders.h
+++ b/src/mesa/main/shaders.h
@@ -232,5 +232,16 @@ extern void GLAPIENTRY
_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value);
+/* GLES 2.0 */
+extern void GLAPIENTRY
+_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
+ GLint* range, GLint* precision);
+
+extern void GLAPIENTRY
+_mesa_ReleaseShaderCompiler(void);
+
+extern void GLAPIENTRY
+_mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
+ const void* binary, GLint length);
#endif /* SHADERS_H */