mesa: Fix error validating args for TexSubImage3D
authorEduardo Lima Mitev <elima@igalia.com>
Mon, 2 Feb 2015 17:14:47 +0000 (18:14 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Tue, 24 Feb 2015 07:58:53 +0000 (08:58 +0100)
The zoffset and depth values were not being considered when calling
error_check_subtexture_dimensions().

Fixes 2 dEQP tests:
* dEQP-GLES3.functional.negative_api.texture.texsubimage3d_neg_offset
* dEQP-GLES3.functional.negative_api.texture.texsubimage3d_invalid_offset

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedestkop.org>
src/mesa/main/teximage.c

index f73edc3fff590e5b45168c6dcd7fcaa8b1266d16..c65d6ab7e9e7d1f9b88ab9d56deca868c91f7fc6 100644 (file)
@@ -2491,8 +2491,8 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
    }
 
    if (error_check_subtexture_dimensions(ctx, dimensions,
-                                         texImage, xoffset, yoffset, 0,
-                                         width, height, 1,
+                                         texImage, xoffset, yoffset, zoffset,
+                                         width, height, depth,
                                          dsa ? "glTextureSubImage" :
                                          "glTexSubImage")) {
       return GL_TRUE;