[Piglit] [PATCH] glean/pixelformats: restrict GL_ABGR_EXT format test to the types in the spec
Samuel Iglesias Gonsalvez
siglesias at igalia.com
Tue Jan 13 23:49:27 PST 2015
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.
+ if (format == GL_ABGR_EXT && IsPackedType(datatype))
+ return false;
+
if (format == GL_RG && !haveRG)
return false;
--
2.1.0
More information about the Piglit
mailing list