[Piglit] [PATCH] spec/arb_copy_image: Don't try to do compressed-to-compressed copies
Jason Ekstrand
jason at jlekstrand.net
Thu Mar 12 22:12:05 PDT 2015
On Thu, Mar 12, 2015 at 9:59 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> The bytes comparison is an approximation of what the spec says... it
> has those explicit classes. But this is probably good enough...
>
Yeah, as long as we don't add anything to the list that's not called out as
being usable with copy_image, we should be ok.
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
>
Thanks!
>
> On Fri, Mar 13, 2015 at 12:23 AM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > This isn't actually supported by the GL_ARB_copy_image spec.
> > ---
> > tests/spec/arb_copy_image/formats.c | 17 ++++++++++++++---
> > 1 file changed, 14 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/spec/arb_copy_image/formats.c
> b/tests/spec/arb_copy_image/formats.c
> > index 8a5faa7..aa9b4d3 100644
> > --- a/tests/spec/arb_copy_image/formats.c
> > +++ b/tests/spec/arb_copy_image/formats.c
> > @@ -261,10 +261,21 @@ is_format_supported(struct texture_format *format)
> > static bool
> > are_formats_compatible(struct texture_format *f1, struct texture_format
> *f2)
> > {
> > - if (f1->can_be_reinterpreted && f2->can_be_reinterpreted)
> > - return f1->bytes == f2->bytes;
> > + if (f1 == f2)
> > + return true;
> > +
> > + if (is_format_compressed(f1)) {
> > + if (is_format_compressed(f2))
> > + /* Compressed-to-compressed copies are not
> supported */
> > + return false;
> >
> > - return f1 == f2;
> > + return f1->bytes == f2->bytes;
> > + } else if (is_format_compressed(f2)) {
> > + return f1->bytes == f2->bytes;
> > + } else {
> > + return f1->can_be_reinterpreted &&
> f2->can_be_reinterpreted &&
> > + f1->bytes == f2->bytes;
> > + }
> > }
> >
> > static const float green[3] = {0.0, 1.0, 0.0};
> > --
> > 2.3.2
> >
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150312/c240f22a/attachment-0001.html>
More information about the Piglit
mailing list