diff options
author | Ian Romanick <[email protected]> | 2016-08-18 11:11:04 +0100 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-08-26 15:03:15 -0700 |
commit | 87fa462ffd6754144f89163a2692eff005beef9c (patch) | |
tree | 8563fe5124dcd47b2da3c8308b77c791e6c5592f /src/mesa/main/teximage.c | |
parent | 66b988d09af1a505b428cf2a32c7ee11fb832982 (diff) |
mesa: Add and use _mesa_has_texture_cube_map_array helper
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index efde1140126..3f3d4307235 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -502,7 +502,7 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target) ? ctx->Const.MaxTextureLevels : 0; case GL_TEXTURE_CUBE_MAP_ARRAY: case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: - return ctx->Extensions.ARB_texture_cube_map_array + return _mesa_has_texture_cube_map_array(ctx) ? ctx->Const.MaxCubeTextureLevels : 0; case GL_TEXTURE_BUFFER: return (_mesa_has_ARB_texture_buffer_object(ctx) || @@ -1433,7 +1433,7 @@ _mesa_target_can_be_compressed(const struct gl_context *ctx, GLenum target, */ if (layout == MESA_FORMAT_LAYOUT_ETC2 && _mesa_is_gles3(ctx)) return write_error(error, GL_INVALID_OPERATION); - target_can_be_compresed = ctx->Extensions.ARB_texture_cube_map_array; + target_can_be_compresed = _mesa_has_texture_cube_map_array(ctx); break; case GL_TEXTURE_3D: switch (layout) { @@ -1523,7 +1523,7 @@ legal_teximage_target(struct gl_context *ctx, GLuint dims, GLenum target) return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array; case GL_TEXTURE_CUBE_MAP_ARRAY: case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: - return ctx->Extensions.ARB_texture_cube_map_array; + return _mesa_has_texture_cube_map_array(ctx); default: return GL_FALSE; } @@ -1575,7 +1575,7 @@ legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target, || _mesa_is_gles3(ctx); case GL_TEXTURE_CUBE_MAP_ARRAY: case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: - return ctx->Extensions.ARB_texture_cube_map_array; + return _mesa_has_texture_cube_map_array(ctx); /* Table 8.15 of the OpenGL 4.5 core profile spec * (20141030) says that TEXTURE_CUBE_MAP is valid for TextureSubImage3D @@ -1673,7 +1673,7 @@ _mesa_legal_texture_base_format_for_target(struct gl_context *ctx, || (ctx->API == API_OPENGLES2 && ctx->Extensions.OES_depth_texture_cube_map))) && !((target == GL_TEXTURE_CUBE_MAP_ARRAY || target == GL_PROXY_TEXTURE_CUBE_MAP_ARRAY) && - ctx->Extensions.ARB_texture_cube_map_array)) { + _mesa_has_texture_cube_map_array(ctx))) { return false; } } @@ -4317,7 +4317,7 @@ compressed_subtexture_target_check(struct gl_context *ctx, GLenum target, (_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array); break; case GL_TEXTURE_CUBE_MAP_ARRAY: - targetOK = ctx->Extensions.ARB_texture_cube_map_array; + targetOK = _mesa_has_texture_cube_map_array(ctx); break; case GL_TEXTURE_3D: targetOK = GL_TRUE; |