tests/cogl: Migrate texture rg test
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555>
This commit is contained in:
parent
e7f535a21d
commit
2b43ff5963
@ -1,6 +1,5 @@
|
|||||||
cogl_test_conformance_sources = [
|
cogl_test_conformance_sources = [
|
||||||
'test-conform-main.c',
|
'test-conform-main.c',
|
||||||
'test-texture-rg.c',
|
|
||||||
'test-fence.c',
|
'test-fence.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -74,8 +74,6 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
ADD_TEST (test_fence, TEST_REQUIREMENT_FENCE, 0);
|
ADD_TEST (test_fence, TEST_REQUIREMENT_FENCE, 0);
|
||||||
|
|
||||||
ADD_TEST (test_texture_rg, TEST_REQUIREMENT_TEXTURE_RG, 0);
|
|
||||||
|
|
||||||
g_printerr ("Unknown test name \"%s\"\n", argv[1]);
|
g_printerr ("Unknown test name \"%s\"\n", argv[1]);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -9,6 +9,5 @@ void test_gles2_context (void);
|
|||||||
void test_gles2_context_fbo (void);
|
void test_gles2_context_fbo (void);
|
||||||
void test_gles2_context_copy_tex_image (void);
|
void test_gles2_context_copy_tex_image (void);
|
||||||
void test_fence (void);
|
void test_fence (void);
|
||||||
void test_texture_rg (void);
|
|
||||||
|
|
||||||
#endif /* COGL_TEST_DECLARATIONS_H */
|
#endif /* COGL_TEST_DECLARATIONS_H */
|
||||||
|
@ -37,6 +37,7 @@ cogl_tests = [
|
|||||||
[ 'test-pipeline-cache-unrefs-texture', [] ],
|
[ 'test-pipeline-cache-unrefs-texture', [] ],
|
||||||
[ 'test-texture-no-allocate', [] ],
|
[ 'test-texture-no-allocate', [] ],
|
||||||
[ 'test-pipeline-shader-state', [] ],
|
[ 'test-pipeline-shader-state', [] ],
|
||||||
|
[ 'test-texture-rg', [] ],
|
||||||
]
|
]
|
||||||
|
|
||||||
cogl_test_conformance_includes = [
|
cogl_test_conformance_includes = [
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "test-declarations.h"
|
#include "tests/cogl-test-utils.h"
|
||||||
#include "test-utils.h"
|
|
||||||
|
|
||||||
#define TEX_WIDTH 8
|
#define TEX_WIDTH 8
|
||||||
#define TEX_HEIGHT 8
|
#define TEX_HEIGHT 8
|
||||||
@ -29,7 +28,7 @@ make_texture (void)
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
test_texture_rg (void)
|
test_texture_rg (void)
|
||||||
{
|
{
|
||||||
CoglPipeline *pipeline;
|
CoglPipeline *pipeline;
|
||||||
@ -37,6 +36,12 @@ test_texture_rg (void)
|
|||||||
int fb_width, fb_height;
|
int fb_width, fb_height;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
|
if (!cogl_has_feature (test_ctx, COGL_FEATURE_ID_TEXTURE_RG))
|
||||||
|
{
|
||||||
|
g_test_skip ("Missing TEXTURE_RG feature");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fb_width = cogl_framebuffer_get_width (test_fb);
|
fb_width = cogl_framebuffer_get_width (test_fb);
|
||||||
fb_height = cogl_framebuffer_get_height (test_fb);
|
fb_height = cogl_framebuffer_get_height (test_fb);
|
||||||
|
|
||||||
@ -73,3 +78,7 @@ test_texture_rg (void)
|
|||||||
cogl_object_unref (pipeline);
|
cogl_object_unref (pipeline);
|
||||||
cogl_object_unref (tex);
|
cogl_object_unref (tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
COGL_TEST_SUITE (
|
||||||
|
g_test_add_func ("/texture/rg", test_texture_rg);
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user