On Tue, Jun 23, 2015 at 5:23 AM, Marta Lofstedt <marta.lofst...@linux.intel.com> wrote: > From: Marta Lofstedt <marta.lofst...@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. > > Signed-off-by: Marta Lofstedt <marta.lofst...@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)
Since this function is called internally from a lot of places, it's not clear to me that it's appropriate to raise a GL error here, but I'm not sure. For instance, it's called by TexSubImage, and the spec says for TexSubImage... An INVALID_VALUE error is generated by *TexSubImage* if target does not match the command, as shown in table 8.15. > return ctx->Extensions.ARB_texture_multisample > ? ctx->Texture.ProxyTex[TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX] : > NULL; > default: > + if(_mesa_is_gles31(ctx)) Not specific to ES 3.1. Commit message needs to be improved. > + { { goes on the line with the if, like the rest of Mesa. > + /* > + * 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. Like Erik says, need an actual spec citation. > + */ > + _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", __func__); > + } > _mesa_problem(NULL, "bad target in _mesa_get_current_tex_object()"); > return NULL; > } > -- _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev