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/texformat.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/texformat.c')
-rw-r--r-- | src/mesa/main/texformat.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index 259eb90444d..5fdc2ab1f79 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -706,6 +706,12 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT32); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); break; + } + } + + if (ctx->VersionMajor >= 3 || + ctx->Extensions.EXT_texture_integer) { + switch (internalFormat) { case GL_RGB8UI_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT8); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); @@ -822,7 +828,9 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, } } - if (ctx->Extensions.ARB_texture_rg && ctx->Extensions.EXT_texture_integer) { + if (ctx->VersionMajor >= 3 || + (ctx->Extensions.ARB_texture_rg && + ctx->Extensions.EXT_texture_integer)) { switch (internalFormat) { case GL_R8UI: RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT8); |