piglit_rgbw_image has a special override for compressed formats to
ensure that when the size of the image is less than the size of a
block then it picks a solid color instead of using four colors. This
patch adds the BPTC formats to this list.

It also modifies piglit_get_compressed_block_size to handle the
formats.
---
 tests/util/piglit-util-gl.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 1a8ee18..3d25445 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -453,6 +453,10 @@ piglit_get_compressed_block_size(GLenum format,
        case GL_COMPRESSED_SIGNED_RG_RGTC2:
        case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT:
        case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
+       case GL_COMPRESSED_RGBA_BPTC_UNORM:
+       case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM:
+       case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:
+       case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:
                *bw = *bh = 4;
                *bytes = 16;
                return true;
@@ -2131,6 +2135,10 @@ piglit_rgbw_image(GLenum internalFormat, int w, int h,
                        case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
                        case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
                        case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
+                       case GL_COMPRESSED_RGBA_BPTC_UNORM:
+                       case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM:
+                       case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:
+                       case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:
                                if (size == 4)
                                        color = red;
                                else if (size == 2)
-- 
1.9.3

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to