This prevents the test from trying to copy compressed formats to depth
textures and vice-versa.

Signed-off-by: Ilia Mirkin <[email protected]>
---
 tests/spec/arb_copy_image/formats.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/spec/arb_copy_image/formats.c 
b/tests/spec/arb_copy_image/formats.c
index 8aa3658..a4c027e 100644
--- a/tests/spec/arb_copy_image/formats.c
+++ b/tests/spec/arb_copy_image/formats.c
@@ -273,6 +273,9 @@ are_formats_compatible(struct texture_format *f1, struct 
texture_format *f2)
        if (f1 == f2)
                return true;
 
+       if (!f1->can_be_reinterpreted || !f2->can_be_reinterpreted)
+               return false;
+
        if (is_format_compressed(f1)) {
                if (is_format_compressed(f2))
                        /* Compressed-to-compressed copies are not supported */
@@ -282,8 +285,7 @@ are_formats_compatible(struct texture_format *f1, struct 
texture_format *f2)
        } 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;
+               return f1->bytes == f2->bytes;
        }
 }
 
-- 
2.4.10

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

Reply via email to