From: Dave Airlie <airl...@redhat.com> since 1ad305b612f389fb04c6d51847427d5ec72fae03 Brian Paul <bri...@vmware.com> Date: Tue Jul 21 18:35:38 2015 -0600
mesa: plumb offset/size parameters through GetTexSubImage code I found this testing virgl which exercises a bunch of these in it's fallbacks. Signed-off-by: Dave Airlie <airl...@redhat.com> --- src/mesa/main/texgetimage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 682b727..b4321fb 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -91,9 +91,10 @@ get_tex_depth(struct gl_context *ctx, GLuint dimensions, if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) { depth = height; height = 1; - } + assert(zoffset + depth <= texImage->Height); + } else + assert(zoffset + depth <= texImage->Depth); - assert(zoffset + depth <= texImage->Depth); for (img = 0; img < depth; img++) { GLubyte *srcMap; GLint srcRowStride; -- 2.4.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev