diff options
author | Marek Olšák <[email protected]> | 2012-12-08 22:53:23 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-12-12 13:09:54 +0100 |
commit | afa902a705b9de70902b6559a383a35f38152555 (patch) | |
tree | d3b5f0b1f3bfa1e7f8d84e5481347d1f9dcbed16 /src/mesa/main/teximage.c | |
parent | 0ac83a20010ae5fa1635866d1950f06aac15a46d (diff) |
mesa: don't advertise ARB_texture_buffer_object in legacy contexts
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 83b7e1488ec..47c4ed23590 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -791,9 +791,9 @@ _mesa_select_tex_object(struct gl_context *ctx, case GL_PROXY_TEXTURE_2D_ARRAY_EXT: return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL; case GL_TEXTURE_BUFFER: - return _mesa_is_desktop_gl(ctx) - && ctx->Extensions.ARB_texture_buffer_object - ? texUnit->CurrentTex[TEXTURE_BUFFER_INDEX] : NULL; + return ctx->API == API_OPENGL_CORE && + ctx->Extensions.ARB_texture_buffer_object ? + texUnit->CurrentTex[TEXTURE_BUFFER_INDEX] : NULL; case GL_TEXTURE_EXTERNAL_OES: return ctx->Extensions.OES_EGL_image_external ? texUnit->CurrentTex[TEXTURE_EXTERNAL_INDEX] : NULL; @@ -994,9 +994,8 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target) return ctx->Extensions.ARB_texture_cube_map_array ? ctx->Const.MaxCubeTextureLevels : 0; case GL_TEXTURE_BUFFER: - return _mesa_is_desktop_gl(ctx) - && ctx->Extensions.ARB_texture_buffer_object - ? 1 : 0; + return ctx->API == API_OPENGL_CORE && + ctx->Extensions.ARB_texture_buffer_object ? 1 : 0; case GL_TEXTURE_EXTERNAL_OES: /* fall-through */ default: @@ -3895,8 +3894,8 @@ _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (!(ctx->Extensions.ARB_texture_buffer_object - && _mesa_is_desktop_gl(ctx))) { + if (!(ctx->API == API_OPENGL_CORE && + ctx->Extensions.ARB_texture_buffer_object)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBuffer"); return; } |