The meta path for CopyTexSubImage operates by reading the source image to a temporary buffer using glReadPixels and then uploading it to the texture using TexSubImage. This patch ensures that when the texture format is MESA_FORMAT_Z32_FLOAT_X24S8, we use the proper image type for the temporary buffer (GL_FLOAT_32_UNSIGNED_INT_24_8_REV).
Fixes some failures with piglit tests "copyteximage {1D,2D,CUBE,RECT,2D_ARRAY}". --- src/mesa/drivers/common/meta.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index ca5f5a1..637ec70 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -3767,7 +3767,10 @@ get_temp_image_type(struct gl_context *ctx, gl_format format) case GL_DEPTH_COMPONENT: return GL_UNSIGNED_INT; case GL_DEPTH_STENCIL: - return GL_UNSIGNED_INT_24_8; + if (format == MESA_FORMAT_Z32_FLOAT_X24S8) + return GL_FLOAT_32_UNSIGNED_INT_24_8_REV; + else + return GL_UNSIGNED_INT_24_8; default: _mesa_problem(ctx, "Unexpected format %d in get_temp_image_type()", baseFormat); -- 1.8.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev