mesa: Add OES_EGL_image to extension list.
authorChia-I Wu <olv@lunarg.com>
Tue, 6 Apr 2010 09:46:17 +0000 (17:46 +0800)
committerChia-I Wu <olv@lunarg.com>
Tue, 6 Apr 2010 10:01:41 +0000 (18:01 +0800)
src/mesa/drivers/dri/intel/intel_extensions.c
src/mesa/es/main/specials_es1.c
src/mesa/es/main/specials_es2.c
src/mesa/main/extensions.c
src/mesa/main/fbobject.c
src/mesa/main/mtypes.h
src/mesa/main/teximage.c
src/mesa/state_tracker/st_extensions.c

index a1aac699c91a667580da60ddf5d03b504d90c353..9c2083873a192cf9e27c735f90b78dec8afd6308 100644 (file)
@@ -63,6 +63,7 @@
 #define need_GL_ATI_envmap_bumpmap
 #define need_GL_NV_point_sprite
 #define need_GL_NV_vertex_program
+#define need_GL_OES_EGL_image
 #define need_GL_VERSION_2_0
 #define need_GL_VERSION_2_1
 
@@ -130,6 +131,9 @@ static const struct dri_extension card_extensions[] = {
    { "GL_NV_vertex_program",              GL_NV_vertex_program_functions },
    { "GL_NV_vertex_program1_1",           NULL },
    { "GL_SGIS_generate_mipmap",           NULL },
+#if FEATURE_OES_EGL_image
+   { "GL_OES_EGL_image",                  GL_OES_EGL_image_functions },
+#endif
    { NULL, NULL }
 };
 
index c842007c22ec92a48ac87110060385edd56586d4..92e24a03fe50fdd6030438e790453321a2a14a95 100644 (file)
@@ -153,6 +153,11 @@ make_extension_string(const GLcontext *ctx, char *str)
    if (ctx->Extensions.EXT_multi_draw_arrays)
       len += append_extension(&str, "GL_EXT_multi_draw_arrays");
 
+#if FEATURE_OES_EGL_image
+   if (ctx->Extensions.OES_EGL_image)
+      len += append_extension(&str, "GL_OES_EGL_image");
+#endif
+
    return len;
 }
 
index 10b4f25e0f0cf2b861378e13846d77db1372ecb2..046cda6fc18ffb474a6ec4deeeea071952ef227c 100644 (file)
@@ -124,6 +124,11 @@ make_extension_string(const GLcontext *ctx, char *str)
    if (ctx->Extensions.EXT_multi_draw_arrays)
       len += append_extension(&str, "GL_EXT_multi_draw_arrays");
 
+#if FEATURE_OES_EGL_image
+   if (ctx->Extensions.OES_EGL_image)
+      len += append_extension(&str, "GL_OES_EGL_image");
+#endif
+
    return len;
 }
 
index 5fa3f3b00b09dfef9b0be32cca813caaa54f11a3..208069c1db5a4bd33ba1bdf71057ad6c217cc514 100644 (file)
@@ -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 */
index e3e006bb948d0d0d5e9026a11ee8007bbf64b1f1..8d44246618702de05c6eca96c694ffb224bf6806 100644 (file)
@@ -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;
index 889c4801af2ca1cdfa8687783c2545861c9cabf2..688172a2c018e3851b06f84be24499e5e7602929 100644 (file)
@@ -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 */
index d72e91b3a3b317e760c81afaf758614c2a382a21..edb80b18e981a73b5aeaf0fd1e5ef232ebedb9c9 100644 (file)
@@ -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);
index ae5e62bd6c66234dfcd2e1d25eda778b7add7ded..affb054866a60ccc963bc7f57608cbf2ca23af1d 100644 (file)
@@ -210,6 +210,9 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.NV_vertex_program1_1 = GL_TRUE;
 #endif
 
+#if FEATURE_OES_EGL_image
+   ctx->Extensions.OES_EGL_image = GL_TRUE;
+#endif
 #if FEATURE_OES_draw_texture
    ctx->Extensions.OES_draw_texture = GL_TRUE;
 #endif