summaryrefslogtreecommitdiff
path: root/src/mesa/main/api_exec_es2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/api_exec_es2.c')
-rw-r--r--src/mesa/main/api_exec_es2.c73
1 files changed, 51 insertions, 22 deletions
diff --git a/src/mesa/main/api_exec_es2.c b/src/mesa/main/api_exec_es2.c
index e706bc2c32..4c53e99f22 100644
--- a/src/mesa/main/api_exec_es2.c
+++ b/src/mesa/main/api_exec_es2.c
@@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED BY THE es_generator.py SCRIPT
* API specification file: main/APIspec.xml
* GLES version: GLES2.0
- * date: 2010-12-09 17:05:11
+ * date: 2011-03-16 14:46:40
*/
@@ -403,15 +403,8 @@ static void GL_APIENTRY _es_Clear(GLbitfield mask)
extern void GL_APIENTRY _mesa_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
#define _es_ClearColor _mesa_ClearColor
-extern void GL_APIENTRY _mesa_ClearDepth(GLclampd depth);
-static void GL_APIENTRY _es_ClearDepthf(GLclampf depth)
-{
- GLclampd converted_depth;
-
- converted_depth = (GLclampd) (depth);
-
- _mesa_ClearDepth(converted_depth);
-}
+extern void GL_APIENTRY _mesa_ClearDepthf(GLclampf depth);
+#define _es_ClearDepthf _mesa_ClearDepthf
extern void GL_APIENTRY _mesa_ClearStencil(GLint s);
#define _es_ClearStencil _mesa_ClearStencil
@@ -671,17 +664,8 @@ static void GL_APIENTRY _es_DepthFunc(GLenum func)
extern void GL_APIENTRY _mesa_DepthMask(GLboolean flag);
#define _es_DepthMask _mesa_DepthMask
-extern void GL_APIENTRY _mesa_DepthRange(GLclampd zNear, GLclampd zFar);
-static void GL_APIENTRY _es_DepthRangef(GLclampf zNear, GLclampf zFar)
-{
- GLclampd converted_zNear;
- GLclampd converted_zFar;
-
- converted_zNear = (GLclampd) (zNear);
- converted_zFar = (GLclampd) (zFar);
-
- _mesa_DepthRange(converted_zNear, converted_zFar);
-}
+extern void GL_APIENTRY _mesa_DepthRangef(GLclampf zNear, GLclampf zFar);
+#define _es_DepthRangef _mesa_DepthRangef
extern void GL_APIENTRY _mesa_DetachShader(GLuint program, GLuint shader);
#define _es_DetachShader _mesa_DetachShader
@@ -1743,13 +1727,52 @@ static void GL_APIENTRY _es_TexImage2D(GLenum target, GLint level, GLint interna
}
switch(internalFormat) {
case GL_ALPHA:
+ if (format != GL_ALPHA) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_RGB:
+ if (format != GL_RGB) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_RGBA:
- case GL_BGRA_EXT:
+ if (format != GL_RGBA) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_LUMINANCE:
+ if (format != GL_LUMINANCE) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_LUMINANCE_ALPHA:
+ if (format != GL_LUMINANCE_ALPHA) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_DEPTH_COMPONENT:
+ if (format != GL_DEPTH_COMPONENT) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_DEPTH_STENCIL_OES:
+ if (format != GL_DEPTH_STENCIL_OES) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
+ case GL_BGRA_EXT:
+ if (format != GL_BGRA_EXT) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
break;
default:
_mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=%d)", internalFormat);
@@ -2095,6 +2118,12 @@ static void GL_APIENTRY _es_TexSubImage2D(GLenum target, GLint level, GLint xoff
return;
}
break;
+ case GL_BGRA_EXT:
+ if (type != GL_UNSIGNED_BYTE) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_OPERATION, "glTexSubImage2D(format=0x%x)", format);
+ return;
+ }
+ break;
default:
_mesa_error(_mesa_get_current_context(), GL_INVALID_OPERATION, "glTexSubImage2D(format=0x%x)", format);
return;