[Mesa-dev] [PATCH 2/3] mesa: Fix error in target validation of glCompressedTex(ture)SubImage3D() calls
Laura Ekstrand
laura at jlekstrand.net
Mon Mar 23 11:06:59 PDT 2015
Looks correct to me.
Reviewed-by: Laura Ekstrand <laura at jlekstrand.net>
On Mon, Mar 23, 2015 at 4:30 AM, Eduardo Lima Mitev <elima at igalia.com>
wrote:
> Basically, two different target error checks are chained consecutively,
> and the
> second one is executed regardless the result of the first one. This
> produces an incorrect error if the first check fails but is overrided by
> the
> second.
>
> This patch conditions the execution of the second check to a successful
> pass
> of the first one.
>
> Fixes 1 dEQP test:
> * dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d
> ---
> src/mesa/main/teximage.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 9f7e10c..1af2896 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -4598,7 +4598,7 @@ compressed_subtexture_target_check(struct gl_context
> *ctx, GLenum target,
> * non-zero, or the effective target for the texture is not
> * TEXTURE_2D_ARRAY."
> */
> - if (target != GL_TEXTURE_2D_ARRAY) {
> + if (targetOK && target != GL_TEXTURE_2D_ARRAY) {
> bool invalidformat;
> switch (format) {
> /* These came from _mesa_is_compressed_format in glformats.c.
> */
> --
> 2.1.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150323/7d31e76d/attachment.html>
More information about the mesa-dev
mailing list