[PATCH weston] gl-renderer: Force call to glUseProgram() when activating debug binding
Kristian Høgsberg
hoegsberg at gmail.com
Mon Dec 3 10:08:39 PST 2012
On Mon, Dec 03, 2012 at 05:08:11PM +0200, Ander Conselvan de Oliveira wrote:
> 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().
Looks good, commited.
Kristian
> ---
> 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
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list