diff options
author | Marek Olšák <[email protected]> | 2012-01-22 20:25:42 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-01-25 12:35:19 +0100 |
commit | 3363e87d7d5b3f19294fc770dc7c506c26646010 (patch) | |
tree | 42ed6d6f69ba8095c13aa77d0129a059812e3a1d /src/mesa/main/fbobject.c | |
parent | 636802f615bb1ef192e3c4c3b9ab0d1c83c5ebe0 (diff) |
mesa: allow exposing GL3 without EXT_texture_integer
Strictly speaking, it's not legal to expose EXT_texture_integer without
EXT_gpu_shader4. It might be even dangerous (apps can assume EXT_gpu_shader4
is available without checking for it).
The check in compute_version is removed as well, because that's already
covered by GLSLVersion >= 130.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index eaf2c46b8dc..79a97291fbb 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1225,7 +1225,8 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) case GL_RGBA8I_EXT: case GL_RGBA16I_EXT: case GL_RGBA32I_EXT: - return ctx->Extensions.EXT_texture_integer ? GL_RGBA : 0; + return ctx->VersionMajor >= 3 || + ctx->Extensions.EXT_texture_integer ? GL_RGBA : 0; case GL_RGB8UI_EXT: case GL_RGB16UI_EXT: @@ -1233,7 +1234,8 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) case GL_RGB8I_EXT: case GL_RGB16I_EXT: case GL_RGB32I_EXT: - return ctx->Extensions.EXT_texture_integer ? GL_RGB : 0; + return ctx->VersionMajor >= 3 || + ctx->Extensions.EXT_texture_integer ? GL_RGB : 0; case GL_R8UI: case GL_R8I: @@ -1241,8 +1243,9 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) case GL_R16I: case GL_R32UI: case GL_R32I: - return ctx->Extensions.ARB_texture_rg && - ctx->Extensions.EXT_texture_integer ? GL_RED : 0; + return ctx->VersionMajor >= 3 || + (ctx->Extensions.ARB_texture_rg && + ctx->Extensions.EXT_texture_integer) ? GL_RED : 0; case GL_RG8UI: case GL_RG8I: @@ -1250,8 +1253,9 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) case GL_RG16I: case GL_RG32UI: case GL_RG32I: - return ctx->Extensions.ARB_texture_rg && - ctx->Extensions.EXT_texture_integer ? GL_RG : 0; + return ctx->VersionMajor >= 3 || + (ctx->Extensions.ARB_texture_rg && + ctx->Extensions.EXT_texture_integer) ? GL_RG : 0; case GL_INTENSITY8I_EXT: case GL_INTENSITY8UI_EXT: |