mesa: Add OES_EGL_image to extension list.

This commit is contained in:
Chia-I Wu 2010-04-06 17:46:17 +08:00 committed by Kristian Høgsberg
parent 34e4091a44
commit a2dcd67c39
6 changed files with 25 additions and 0 deletions

View 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 }
};

View file

@ -194,6 +194,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 */

View file

@ -1016,6 +1016,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;

View file

@ -2529,6 +2529,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 */

View file

@ -2458,6 +2458,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);

View file

@ -197,6 +197,9 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.NV_texgen_reflection = GL_TRUE;
ctx->Extensions.NV_texture_env_combine4 = GL_TRUE;
#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