From 95d3839416cb966b60bfe37b6e9fd047f59cc861 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Sat, 8 Jun 2019 02:57:37 +1000 Subject: [PATCH] gl/tests: fix shader creation tests part 2 Continuation of 4fd7a2c783e96e5ebec513f8fd178ba34b2a527f We check the availability of the high precision floats in GLSL shaders which involves an OpenGL call and thus is required to be executed on the OpenGL thread. The tests were not respecting that and could fail on more strict drivers. Tests update for 675415bf2ea9ddc75ea5e5b6eae9ae942c19d6dc Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/590 --- tests/check/libs/gstglheaders.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/check/libs/gstglheaders.c b/tests/check/libs/gstglheaders.c index 0ec396b..56922d0 100644 --- a/tests/check/libs/gstglheaders.c +++ b/tests/check/libs/gstglheaders.c @@ -104,7 +104,6 @@ teardown (void) GST_START_TEST (test_constructors) { GstBufferPool *pool = NULL; - GstGLSLStage *stage = NULL; GstGLColorConvert *convert = NULL; GstGLOverlayCompositor *compositor = NULL; GstGLUpload *upload = NULL; @@ -113,10 +112,6 @@ GST_START_TEST (test_constructors) fail_if (pool == NULL); gst_object_unref (pool); - stage = gst_glsl_stage_new_default_fragment (context); - fail_if (stage == NULL); - gst_object_unref (stage); - convert = gst_gl_color_convert_new (context); fail_if (convert == NULL); gst_object_unref (convert); @@ -137,6 +132,7 @@ _construct_with_activated_context (GstGLContext * context, gpointer unused) { GstGLFramebuffer *framebuffer = NULL; GstGLShader *shader = NULL; + GstGLSLStage *stage = NULL; framebuffer = gst_gl_framebuffer_new (context); fail_if (framebuffer == NULL); @@ -145,6 +141,10 @@ _construct_with_activated_context (GstGLContext * context, gpointer unused) shader = gst_gl_shader_new (context); fail_if (shader == NULL); gst_object_unref (shader); + + stage = gst_glsl_stage_new_default_fragment (context); + fail_if (stage == NULL); + gst_object_unref (stage); } GST_START_TEST (test_constructors_require_activated_context) -- 2.7.4