diff options
author | Markus Wick <markus@selfnet.de> | 2014-03-13 11:17:39 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-03-17 14:30:58 -0700 |
commit | 9999a660135fafe5f1fdf9452e5ca74ffb069dc2 (patch) | |
tree | 2429fd65ef8ea72f509477b94972193e846231a7 /glamor/glamor_gradient.c | |
parent | aa2635b804e7d28322f62d802190bdf0bb799634 (diff) |
glamor: don't reset the GLSL program
We don't use fixed function rendering, so there is no need to reset
the program at all. This lets the driver avoid checking for state
changes between draw calls when we rebind the same program.
Improves xephyr x11perf -f8text performance by 6.03062% +/- 1.64928%
(n=20)
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'glamor/glamor_gradient.c')
-rw-r--r-- | glamor/glamor_gradient.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/glamor/glamor_gradient.c b/glamor/glamor_gradient.c index 0769eaeaa..f77d6a8e3 100644 --- a/glamor/glamor_gradient.c +++ b/glamor/glamor_gradient.c @@ -379,8 +379,6 @@ _glamor_create_radial_gradient_program(ScreenPtr screen, int stops_count, glamor_link_glsl_prog(screen, gradient_prog, "radial gradient"); - glUseProgram(0); - if (dyn_gen) { index = 2; glamor_priv->radial_max_nstops = stops_count; @@ -592,8 +590,6 @@ _glamor_create_linear_gradient_program(ScreenPtr screen, int stops_count, glamor_link_glsl_prog(screen, gradient_prog, "linear gradient"); - glUseProgram(0); - if (dyn_gen) { index = 2; glamor_priv->linear_max_nstops = stops_count; @@ -1169,7 +1165,6 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen, glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); - glUseProgram(0); glamor_put_context(glamor_priv); return dst_picture; @@ -1191,7 +1186,6 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen, glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); - glUseProgram(0); glamor_put_context(glamor_priv); return NULL; } @@ -1522,7 +1516,6 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen, glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); - glUseProgram(0); glamor_put_context(glamor_priv); return dst_picture; @@ -1544,7 +1537,6 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen, glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); - glUseProgram(0); glamor_put_context(glamor_priv); return NULL; } |