[Mesa-dev] [PATCH 2/3] mesa: Don't allow GL_TEXTURE_BORDER queries outside compat profile

Brian Paul brianp at vmware.com
Tue Jun 17 06:42:29 PDT 2014


On 06/16/2014 07:34 PM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> There are no texture borders in any version of OpenGL ES or desktop
> OpenGL core profile.
>
> Fixes piglit's gl-3.2-texture-border-deprecated.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: "10.2 <mesa-stable at lists.freedesktop.org>
> ---
>   src/mesa/main/texparam.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
> index 565c1d6..f67745b 100644
> --- a/src/mesa/main/texparam.c
> +++ b/src/mesa/main/texparam.c
> @@ -1061,7 +1061,11 @@ get_tex_level_parameter_image(struct gl_context *ctx,
>      case GL_TEXTURE_HEIGHT:
>      case GL_TEXTURE_DEPTH:
>      case GL_TEXTURE_INTERNAL_FORMAT:
> +      break;
>      case GL_TEXTURE_BORDER:
> +      if (ctx->API != API_OPENGL_COMPAT)
> +         goto invalid_pname;
> +      break;
>      case GL_TEXTURE_RED_SIZE:
>      case GL_TEXTURE_GREEN_SIZE:
>      case GL_TEXTURE_BLUE_SIZE:
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list