Fixed an uninitialized problem at gradient shader functions.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
c0f75c657f
commit
33e11cd614
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user