Module: Mesa Branch: master Commit: 7286a6899176a8b26aa794097288eff941f5178c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7286a6899176a8b26aa794097288eff941f5178c
Author: Neil Roberts <n...@linux.intel.com> Date: Wed Feb 25 15:33:08 2015 +0000 meta: Fix the y offset for 1D_ARRAY in _mesa_meta_pbo_TexSubImage The yoffset needs to be interpreted as a slice offset for 1D array textures. This patch implements that by moving the yoffset into zoffset similar to how it moves the height into depth. Reviewed-by: Jason Ekstrand <jason.ekstr...@intel.com> Cc: "10.5" <mesa-sta...@lists.freedesktop.org> --- src/mesa/drivers/common/meta_tex_subimage.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c index f360d64..e29addb 100644 --- a/src/mesa/drivers/common/meta_tex_subimage.c +++ b/src/mesa/drivers/common/meta_tex_subimage.c @@ -205,8 +205,12 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims, if (tex_image->TexObject->Target == GL_TEXTURE_1D_ARRAY) { assert(depth == 1); + assert(zoffset == 0); depth = height; height = 1; + image_height = 1; + zoffset = yoffset; + yoffset = 0; } _mesa_meta_bind_fbo_image(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, @@ -322,8 +326,12 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims, if (tex_image && tex_image->TexObject->Target == GL_TEXTURE_1D_ARRAY) { assert(depth == 1); + assert(zoffset == 0); depth = height; height = 1; + image_height = 1; + zoffset = yoffset; + yoffset = 0; } /* If we were given a texture, bind it to the read framebuffer. If not, _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit