From 962ca18341e80327d7d1cf1609d184d30c8f8b71 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 28 Nov 2023 22:03:54 +0100 Subject: [PATCH] cogl/tests: Skip 10bpc tests if the pixel formats are not supported Part-of: --- .../cogl/conform/test-offscreen-texture-formats.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/tests/cogl/conform/test-offscreen-texture-formats.c b/src/tests/cogl/conform/test-offscreen-texture-formats.c index d3be06c50..fc9e83277 100644 --- a/src/tests/cogl/conform/test-offscreen-texture-formats.c +++ b/src/tests/cogl/conform/test-offscreen-texture-formats.c @@ -71,6 +71,12 @@ test_offscreen_texture_formats_store_rgb10 (void) }; int i; + if (!cogl_has_feature (test_ctx, COGL_FEATURE_ID_TEXTURE_RGBA1010102)) + { + g_test_skip ("Driver does not support 10bpc formats"); + return; + } + /* The extra fraction is there to avoid rounding inconsistencies in OpenGL * implementations. */ red = (rgb10_red / (float) ((1 << 10) - 1)) + 0.00001; @@ -302,6 +308,12 @@ test_offscreen_texture_formats_paint_rgb10 (void) }; int i; + if (!cogl_has_feature (test_ctx, COGL_FEATURE_ID_TEXTURE_RGBA1010102)) + { + g_test_skip ("Driver does not support 10bpc formats"); + return; + } + /* The extra fraction is there to avoid rounding inconsistencies in OpenGL * implementations. */ red = (rgb10_red / (float) ((1 << 10 ) - 1)) + 0.00001;