mesa: Move GLES2 shader stubs to main/shaders.c
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 23 Apr 2010 00:34:33 +0000 (20:34 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 27 Apr 2010 23:28:10 +0000 (19:28 -0400)
src/mesa/es/main/stubs.c
src/mesa/main/shaders.c
src/mesa/main/shaders.h

index b829543cc01f45e76e478d9904a87355ef45a2ec..65866917150a5056e7dd376ea180585e79c0b1ff 100644 (file)
@@ -59,29 +59,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)
 {
index f382680b4435aab9e269e92f6285eac6bf54885f..f877320d699b59ba978bb87ff12b90d96742a61b 100644 (file)
@@ -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
index 17339ccf623d0f2d8c2f683c15c1a30390ed1351..6ab6d6bfeaf3f19140b2147648bd86cd223e6e40 100644 (file)
@@ -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 */