[Piglit] [PATCH] arb_copy_image: add new format swizzle test

Fredrik Höglund fredrik at kde.org
Tue Sep 1 10:14:58 PDT 2015


On Tuesday 01 September 2015, Ilia Mirkin wrote:
> On Tue, Sep 1, 2015 at 12:22 PM, Fredrik Höglund <fredrik at kde.org> wrote:
> > On Tuesday 01 September 2015, Brian Paul wrote:
> >> On 08/31/2015 05:38 PM, Ilia Mirkin wrote:
> >> > On Mon, Aug 31, 2015 at 7:29 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> >> >> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
> >> >>
> >> >> Thanks a lot for doing this! I assume that it fails with your gallium
> >> >> ARB_copy_image implementation as I predicted?
> >>
> >> Yes.  In Mesa, I added some code that checks for swizzles and uses
> >> pipe_context::blit() instead.  Seems to fix things, but I need to spend
> >> more time on it.
> >
> > This test is not sufficient though, because it's when you have a copy
> > from B8G8R8A8 to R16G16, or a similar situation, that things get really
> > interesting.
> 
> Yeah, so the thing is that you can't do this with unsized internal
> formats, since they're not part of the view classes, but you could
> (carefully) arrange for a *sized* internal format, like GL_RGBA8 to
> come out as a BGRA pipe format, and then try to copy it to RG16. And
> enjoy the fireworks :)

st/mesa uses the same rules when it selects a pipe format for
GL_RGBA8 as it does for GL_RGBA.  See find_exact_format()
in st_format.c
 
> But the test is a great start, still has my r-b.

Sure, my point is just that we are going to need additional tests for
compatible formats with different component orders.

Fredrik



More information about the Piglit mailing list