summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-06 17:46:17 +0800
committerChia-I Wu <olv@lunarg.com>2010-04-06 18:01:41 +0800
commit2002e4d06e2627241cd4af88f65b54d2101ef151 (patch)
tree65d5d632bc8fc7a90de973b94580ebc7a7803dbf /src/mesa/main
parent0942ed45b370addf4edb310d4d0f9cd0c7b18fd0 (diff)
mesa: Add OES_EGL_image to extension list.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/extensions.c3
-rw-r--r--src/mesa/main/fbobject.c6
-rw-r--r--src/mesa/main/mtypes.h3
-rw-r--r--src/mesa/main/teximage.c6
4 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 5fa3f3b00b..208069c1db 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -197,6 +197,9 @@ static const struct {
{ ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) },
{ ON, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) },
{ OFF, "GL_S3_s3tc", F(S3_s3tc) },
+#if FEATURE_OES_EGL_image
+ { OFF, "GL_OES_EGL_image", F(OES_EGL_image) },
+#endif
#if FEATURE_OES_draw_texture
{ OFF, "GL_OES_draw_texture", F(OES_draw_texture) },
#endif /* FEATURE_OES_draw_texture */
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index e3e006bb94..8d44246618 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1020,6 +1020,12 @@ _mesa_EGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (!ctx->Extensions.OES_EGL_image) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEGLImageTargetRenderbufferStorageOES(unsupported)");
+ return;
+ }
+
if (target != GL_RENDERBUFFER) {
_mesa_error(ctx, GL_INVALID_ENUM, "EGLImageTargetRenderbufferStorageOES");
return;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 889c4801af..688172a2c0 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2573,6 +2573,9 @@ struct gl_extensions
GLboolean SGIS_texture_lod;
GLboolean TDFX_texture_compression_FXT1;
GLboolean S3_s3tc;
+#if FEATURE_OES_EGL_image
+ GLboolean OES_EGL_image;
+#endif
#if FEATURE_OES_draw_texture
GLboolean OES_draw_texture;
#endif /* FEATURE_OES_draw_texture */
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index d72e91b3a3..edb80b18e9 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2457,6 +2457,12 @@ _mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ if (!ctx->Extensions.OES_EGL_image) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEGLImageTargetTexture2DOES(unsupported)");
+ return;
+ }
+
if (target != GL_TEXTURE_2D) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glEGLImageTargetTexture2D(target=%d)", target);