[PATCH weston] gl-renderer: Force call to glUseProgram() when activating debug binding

Ander Conselvan de Oliveira ander.conselvan.de.oliveira at intel.com
Mon Dec 3 07:08:11 PST 2012


When redrawing surfaces, use_shader() checks if the desired shader is
already in use to avoid a call to glUseProgram(). However, once the
debug binding is activated, that same check would prevent the usage of
the recompiled shaders until something cause a different shader to be
passed to use_shader().
---
 src/gl-renderer.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index 664f395..d459c21 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -1808,6 +1808,10 @@ fragment_debug_binding(struct wl_seat *seat, uint32_t time, uint32_t key,
 
 	compile_shaders(ec);
 
+	/* Force use_shader() to call glUseProgram(), since we need to use
+	 * the recompiled version of the shader. */
+	gr->current_shader = NULL;
+
 	wl_list_for_each(output, &ec->output_list, link)
 		weston_output_damage(output);
 }
-- 
1.7.10.4



More information about the wayland-devel mailing list