[Mesa-dev] [PATCH 4/6] mesa/es3.1 : Correct error code for defect texture target
Erik Faye-Lund
kusmabite at gmail.com
Tue Jun 23 06:25:53 PDT 2015
On Tue, Jun 23, 2015 at 2:23 PM, Marta Lofstedt
<marta.lofstedt at linux.intel.com> wrote:
> From: Marta Lofstedt <marta.lofstedt at intel.com>
>
> According to GLES 3.1 CTS test:
> ES31-CTS.texture_storage_multisample.
> APIGLGetTexLevelParameterifv.
> invalid_texture_target_rejected:
>
> GL_INVALID_ENUM should be generated when
> glGetTexLevelParameteriv is called with a defect
> texture target.
>
Again, this is defined by the spec, not the CTS, section 8.10.3:
"An INVALID_ENUM error is generated if target is not one of the
texture targets described above"
But The OpenGL 4.5 spec defines the exact same error, so I don't think
we should check for gles3.1 here.
> Signed-off-by: Marta Lofstedt <marta.lofstedt at linux.intel.com>
> ---
> src/mesa/main/texobj.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
> index c563f1e..c239deb 100644
> --- a/src/mesa/main/texobj.c
> +++ b/src/mesa/main/texobj.c
> @@ -222,6 +222,17 @@ _mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
> return ctx->Extensions.ARB_texture_multisample
> ? ctx->Texture.ProxyTex[TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX] : NULL;
> default:
> + if(_mesa_is_gles31(ctx))
> + {
> + /*
> + * According to OpenGL ES 3.1 CTS:
> + * ES31-CTS.texture_storage_multisample.APIGLGetTexLevelParameterifv.
> + * invalid_value_argument_rejected
> + * es31cTextureStorageMultisampleGetTexLevelParameterifvTests.cpp:1277
> + * INVALID_ENUM should be reported for bad targets.
> + */
> + _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", __func__);
> + }
> _mesa_problem(NULL, "bad target in _mesa_get_current_tex_object()");
> return NULL;
> }
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list