[Mesa-stable] [Mesa-dev] [PATCH 1/8] mesa: Add missing checks for GL_TEXTURE_CUBE_MAP_ARRAY

Dave Airlie airlied at gmail.com
Tue Nov 26 16:05:51 PST 2013


On Wed, Nov 27, 2013 at 9:54 AM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> That enum requires GL_ARB_texture_cube_map_array, and it is only
> available on desktop GL.  It looks like this has been an un-noticed
> issue since GL_ARB_texture_cube_map_array support was added in commit
> e0e7e295.
>

Looks good to me,

Reviewed-by: Dave Airlie <airlied at redhat.com>

> Since this just adds a missing error check, it's arguable that this
> should not be included in stable branches.  Opinions?

and can't see the point of stable for it.

>
>  src/mesa/main/texobj.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
> index abd30c5..c110f50 100644
> --- a/src/mesa/main/texobj.c
> +++ b/src/mesa/main/texobj.c
> @@ -1205,7 +1205,8 @@ target_enum_to_index(struct gl_context *ctx, GLenum target)
>        return _mesa_is_gles(ctx) && ctx->Extensions.OES_EGL_image_external
>           ? TEXTURE_EXTERNAL_INDEX : -1;
>     case GL_TEXTURE_CUBE_MAP_ARRAY:
> -      return TEXTURE_CUBE_ARRAY_INDEX;
> +      return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_cube_map_array
> +         ? TEXTURE_CUBE_ARRAY_INDEX : -1;
>     case GL_TEXTURE_2D_MULTISAMPLE:
>        return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_multisample
>           ? TEXTURE_2D_MULTISAMPLE_INDEX: -1;
> --
> 1.8.1.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list