diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-04-28 14:54:38 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-04-28 14:54:38 +0800 |
commit | 964b23a83f9367584b688b4138bd9285dd3d5573 (patch) | |
tree | d6049f2266d6578172d42e45e1bb16ba0cc1489a /src | |
parent | 925c2436f57c22a3752fb5a10da8b21c61343808 (diff) |
Fixed an uninitialized problem at gradient shader functions.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/glamor_render.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/glamor_render.c b/src/glamor_render.c index c6f9c06..b729e98 100644 --- a/src/glamor_render.c +++ b/src/glamor_render.c @@ -1651,6 +1651,8 @@ _glamor_create_radial_gradient_program(ScreenPtr screen, int stops_count, int dy return; } + dispatch = glamor_get_dispatch(glamor_priv); + if (dyn_gen && glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][2]) { dispatch->glDeleteShader( glamor_priv->radial_gradient_shaders[SHADER_GRADIENT_VS_PROG][2]); @@ -1668,8 +1670,6 @@ _glamor_create_radial_gradient_program(ScreenPtr screen, int stops_count, int dy glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][2] = 0; } - dispatch = glamor_get_dispatch(glamor_priv); - gradient_prog = dispatch->glCreateProgram(); vs_prog = glamor_compile_glsl_prog(dispatch, @@ -1883,6 +1883,7 @@ _glamor_create_linear_gradient_program(ScreenPtr screen, int stops_count, int dy return; } + dispatch = glamor_get_dispatch(glamor_priv); if (dyn_gen && glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][2]) { dispatch->glDeleteShader( glamor_priv->linear_gradient_shaders[SHADER_GRADIENT_VS_PROG][2]); @@ -1900,8 +1901,6 @@ _glamor_create_linear_gradient_program(ScreenPtr screen, int stops_count, int dy glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][2] = 0; } - dispatch = glamor_get_dispatch(glamor_priv); - gradient_prog = dispatch->glCreateProgram(); vs_prog = glamor_compile_glsl_prog(dispatch, |