From 20f3f885473309d6bf7474c5ca0341a237fb7414 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 31 Oct 2015 21:37:50 +0100 Subject: [PATCH] Add some more check_error() calls, for debugging Mesa fence issues. --- glwidget.cpp | 5 +++++ mixer.cpp | 1 + 2 files changed, 6 insertions(+) diff --git a/glwidget.cpp b/glwidget.cpp index 3cd6358..daadaf2 100644 --- a/glwidget.cpp +++ b/glwidget.cpp @@ -71,12 +71,17 @@ void GLWidget::paintGL() Mixer::DisplayFrame frame; if (!global_mixer->get_display_frame(output, &frame)) { glClearColor(0.0f, 1.0f, 0.0f, 1.0f); + check_error(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + check_error(); return; } + check_error(); glWaitSync(frame.ready_fence.get(), /*flags=*/0, GL_TIMEOUT_IGNORED); + check_error(); frame.setup_chain(); + check_error(); frame.chain->render_to_screen(); check_error(); } diff --git a/mixer.cpp b/mixer.cpp index 5570749..0d88f04 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -426,6 +426,7 @@ void Mixer::thread_func() GLuint cbcr_full_tex = resource_pool->create_2d_texture(GL_RG8, WIDTH, HEIGHT); GLuint rgba_tex = resource_pool->create_2d_texture(GL_RGB565, WIDTH, HEIGHT); // Saves texture bandwidth, although dithering gets messed up. GLuint fbo = resource_pool->create_fbo(y_tex, cbcr_full_tex, rgba_tex); + check_error(); chain->render_to_fbo(fbo, WIDTH, HEIGHT); resource_pool->release_fbo(fbo); -- 2.39.2