[Mesa-dev] [PATCH 1/4] meta: In CopyTexSubImage, use matching format for Z32_FLOAT_X24S8 textures.
Paul Berry
stereotype441 at gmail.com
Mon Jun 3 09:40:23 PDT 2013
On 3 June 2013 09:02, Eric Anholt <eric at anholt.net> wrote:
> Paul Berry <stereotype441 at gmail.com> writes:
>
> > 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
>
> I think the version of this patch I sent out on Thursday is better.
>
Do you mean "[PATCH 2/2] meta: Fix temporary image type for float
depth/stencil."? I'm ok going with your version instead. It looks like it
got a positive review on Thrusday--when are you planning to push it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130603/1d083497/attachment.html>
More information about the mesa-dev
mailing list