mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 21:02:14 +00:00
cogl/tests: Skip 10bpc tests if the pixel formats are not supported
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3429>
This commit is contained in:
parent
7f943613a8
commit
962ca18341
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user