glamor_trapezoid: workaround a glsl like problem.
It seems that the following statement cann't run as expected on SNB. bool trap_left_vertical = (abs(trap_left_vertical_f - 1.0) <= 0.0001); Have to rewrite it to another style to let the vertical edge trapezoid to be rendered correctly. Reviewed-by: Junyan He <junyan.he@linux.intel.com> Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
5512c14e34
commit
e7af7cb76d
|
@ -1068,8 +1068,6 @@ glamor_init_trapezoid_shader(ScreenPtr screen)
|
|||
"varying float trap_right_vertical_f; \n"
|
||||
"float x_per_pix = 1.0;"
|
||||
"float y_per_pix = 1.0;"
|
||||
"bool trap_left_vertical = (abs(trap_left_vertical_f - 1.0) <= 0.0001);\n"
|
||||
"bool trap_right_vertical = (abs(trap_right_vertical_f - 1.0) <= 0.0001);\n"
|
||||
"\n"
|
||||
"float get_alpha_val() \n"
|
||||
"{ \n"
|
||||
|
@ -1077,6 +1075,16 @@ glamor_init_trapezoid_shader(ScreenPtr screen)
|
|||
" float x_bottom_cut_left; \n"
|
||||
" float x_up_cut_right; \n"
|
||||
" float x_bottom_cut_right; \n"
|
||||
" bool trap_left_vertical;\n"
|
||||
" bool trap_right_vertical;\n"
|
||||
" if (abs(trap_left_vertical_f - 1.0) <= 0.0001)\n"
|
||||
" trap_left_vertical = true;\n"
|
||||
" else\n"
|
||||
" trap_left_vertical = false;\n"
|
||||
" if (abs(trap_right_vertical_f - 1.0) <= 0.0001)\n"
|
||||
" trap_right_vertical = true;\n"
|
||||
" else\n"
|
||||
" trap_right_vertical = false;\n"
|
||||
" \n"
|
||||
" if(trap_left_vertical == true) { \n"
|
||||
" x_up_cut_left = trap_left_x; \n"
|
||||
|
|
Loading…
Reference in New Issue
Block a user