[Piglit] [PATCH] glean/pixelformats: restrict GL_ABGR_EXT format test to the types in the spec
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Wed Jan 14 23:31:53 PST 2015
On Wednesday, January 14, 2015 10:06:00 AM Jason Ekstrand wrote:
> On Tue, Jan 13, 2015 at 11:49 PM, Samuel Iglesias Gonsalvez <
>
> siglesias at igalia.com> wrote:
> > Packed types are not explicitly allowed to work with GL_ABGR_EXT format in
> > the OpenGL spec nor GL_EXT_abgr spec.
> >
> > NVIDIA allows it but AMD doesn't and Intel driver hasn't allowed it with
> > UNSIGNED_SHORT_5_5_5_1 and UNSIGNED_INT_10_10_10_2 as of c471b09bf4.
> >
> > Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
> > ---
> >
> > tests/glean/tpixelformats.cpp | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/tests/glean/tpixelformats.cpp b/tests/glean/tpixelformats.cpp
> > index 27881bf..b040957 100644
> > --- a/tests/glean/tpixelformats.cpp
> > +++ b/tests/glean/tpixelformats.cpp
> > @@ -612,6 +612,12 @@ PixelFormatsTest::CompatibleFormatAndType(GLenum
> > format, GLenum datatype) const
> >
> > if (format == GL_ABGR_EXT && !haveABGR)
> >
> > return false;
> >
> > + // Special case: GL_ABGR_EXT can't be used with packed types
> > + // because they are not explicitely allowed by GL_ABGR_EXT spec or
> > + // OpenGL spec.
>
> I'd word this differently:
>
> ...because the packed formats specs (which were all written after the
> GL_EXT_abgr) explicitly say that the packed formats can only be used with
> GL_RGB, GL_BGR, GL_RGBA, or GL_BGRA and do not mention GL_ABGR_EXT.
>
> Either way,
> Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
>
Thanks Jason!
Sam
> > + if (format == GL_ABGR_EXT && IsPackedType(datatype))
> > + return false;
> > +
> >
> > if (format == GL_RG && !haveRG)
> >
> > return false;
> >
> > --
> > 2.1.0
> >
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150115/f18e24f0/attachment.sig>
More information about the Piglit
mailing list