summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-09-29 11:45:57 +1000
committerMatthew Waters <matthew@centricular.com>2016-10-05 12:20:52 +1100
commitd37a2f13eeb67fffe8df99a24bf5ba1d69f1a7b2 (patch)
treee04cda2be8a4fb5b27c9e6b62741c62820706fae /tests
parente20dab09ea39e4a392b1c54e55ed7e924d4cccf8 (diff)
tests/gl: make sure all GL commands are executed on the GL thread
e.g. the final glGetError() must also be completed on the GL thread
Diffstat (limited to 'tests')
-rw-r--r--tests/check/libs/gstglcolorconvert.c9
-rw-r--r--tests/check/libs/gstglupload.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/tests/check/libs/gstglcolorconvert.c b/tests/check/libs/gstglcolorconvert.c
index d891c8bb0..98ec48ff9 100644
--- a/tests/check/libs/gstglcolorconvert.c
+++ b/tests/check/libs/gstglcolorconvert.c
@@ -85,14 +85,21 @@ setup (void)
}
static void
-teardown (void)
+_check_gl_error (GstGLContext * context, gpointer data)
{
GLuint error = context->gl_vtable->GetError ();
fail_if (error != GL_NONE, "GL error 0x%x encountered during processing\n",
error);
+}
+static void
+teardown (void)
+{
gst_object_unref (convert);
gst_object_unref (window);
+
+ gst_gl_context_thread_add (context, (GstGLContextThreadFunc) _check_gl_error,
+ NULL);
gst_object_unref (context);
gst_object_unref (display);
}
diff --git a/tests/check/libs/gstglupload.c b/tests/check/libs/gstglupload.c
index 7c52a858a..707adb62c 100644
--- a/tests/check/libs/gstglupload.c
+++ b/tests/check/libs/gstglupload.c
@@ -86,14 +86,21 @@ setup (void)
}
static void
-teardown (void)
+_check_gl_error (GstGLContext * context, gpointer data)
{
GLuint error = context->gl_vtable->GetError ();
fail_if (error != GL_NONE, "GL error 0x%x encountered during processing\n",
error);
+}
+static void
+teardown (void)
+{
gst_object_unref (upload);
gst_object_unref (window);
+
+ gst_gl_context_thread_add (context, (GstGLContextThreadFunc) _check_gl_error,
+ NULL);
gst_object_unref (context);
gst_object_unref (display);
if (shader)