glamor: Remove shader-based trapezoid implementation. Fixes Bug 76213.
I can't find any performance benefit to using the GL path and the code renders this trapezoid incorrectly: top: FIXED 29.50 bottom: FIXED 30.00 left top: POINT 0.00, 29.50 left bottom: POINT 0.00, 30.50 right top: POINT -127.50, 29.50 right bottom: POINT 52.50, 30.00 This should render a solid line from 0,30 to 52,30 but draws nothing. The code also uses an area computation for trapezoid coverage which does not conform to the Render specification which requires a specific point sampling technique. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
		
							parent
							
								
									b2452311bd
								
							
						
					
					
						commit
						7e6bd54684
					
				|  | @ -515,9 +515,6 @@ glamor_init(ScreenPtr screen, unsigned int flags) | ||||||
| 
 | 
 | ||||||
|     glamor_init_vbo(screen); |     glamor_init_vbo(screen); | ||||||
|     glamor_init_pixmap_fbo(screen); |     glamor_init_pixmap_fbo(screen); | ||||||
| #ifdef GLAMOR_TRAPEZOID_SHADER |  | ||||||
|     glamor_init_trapezoid_shader(screen); |  | ||||||
| #endif |  | ||||||
|     glamor_init_finish_access_shaders(screen); |     glamor_init_finish_access_shaders(screen); | ||||||
| #ifdef GLAMOR_GRADIENT_SHADER | #ifdef GLAMOR_GRADIENT_SHADER | ||||||
|     glamor_init_gradient_shader(screen); |     glamor_init_gradient_shader(screen); | ||||||
|  | @ -546,9 +543,6 @@ glamor_release_screen_priv(ScreenPtr screen) | ||||||
| #endif | #endif | ||||||
|     glamor_fini_vbo(screen); |     glamor_fini_vbo(screen); | ||||||
|     glamor_fini_pixmap_fbo(screen); |     glamor_fini_pixmap_fbo(screen); | ||||||
| #ifdef GLAMOR_TRAPEZOID_SHADER |  | ||||||
|     glamor_fini_trapezoid_shader(screen); |  | ||||||
| #endif |  | ||||||
|     glamor_fini_finish_access_shaders(screen); |     glamor_fini_finish_access_shaders(screen); | ||||||
| #ifdef GLAMOR_GRADIENT_SHADER | #ifdef GLAMOR_GRADIENT_SHADER | ||||||
|     glamor_fini_gradient_shader(screen); |     glamor_fini_gradient_shader(screen); | ||||||
|  |  | ||||||
|  | @ -306,9 +306,6 @@ typedef struct glamor_screen_private { | ||||||
|     int linear_max_nstops; |     int linear_max_nstops; | ||||||
|     int radial_max_nstops; |     int radial_max_nstops; | ||||||
| 
 | 
 | ||||||
|     /* glamor trapezoid shader. */ |  | ||||||
|     GLint trapezoid_prog; |  | ||||||
| 
 |  | ||||||
|     PixmapPtr *back_pixmap; |     PixmapPtr *back_pixmap; | ||||||
|     int screen_fbo; |     int screen_fbo; | ||||||
|     struct glamor_saved_procs saved_procs; |     struct glamor_saved_procs saved_procs; | ||||||
|  | @ -745,8 +742,6 @@ void glamor_composite_glyph_rects(CARD8 op, | ||||||
| void glamor_composite_rects(CARD8 op, | void glamor_composite_rects(CARD8 op, | ||||||
|                             PicturePtr pDst, |                             PicturePtr pDst, | ||||||
|                             xRenderColor *color, int nRect, xRectangle *rects); |                             xRenderColor *color, int nRect, xRectangle *rects); | ||||||
| void glamor_init_trapezoid_shader(ScreenPtr screen); |  | ||||||
| void glamor_fini_trapezoid_shader(ScreenPtr screen); |  | ||||||
| PicturePtr glamor_convert_gradient_picture(ScreenPtr screen, | PicturePtr glamor_convert_gradient_picture(ScreenPtr screen, | ||||||
|                                            PicturePtr source, |                                            PicturePtr source, | ||||||
|                                            int x_source, |                                            int x_source, | ||||||
|  | @ -1089,7 +1084,6 @@ void glamor_xv_render(glamor_port_private *port_priv); | ||||||
| 
 | 
 | ||||||
| #define GLAMOR_PIXMAP_DYNAMIC_UPLOAD | #define GLAMOR_PIXMAP_DYNAMIC_UPLOAD | ||||||
| #define GLAMOR_GRADIENT_SHADER | #define GLAMOR_GRADIENT_SHADER | ||||||
| #define GLAMOR_TRAPEZOID_SHADER |  | ||||||
| #define GLAMOR_TEXTURED_LARGE_PIXMAP 1 | #define GLAMOR_TEXTURED_LARGE_PIXMAP 1 | ||||||
| #define WALKAROUND_LARGE_TEXTURE_MAP | #define WALKAROUND_LARGE_TEXTURE_MAP | ||||||
| #if 0 | #if 0 | ||||||
|  |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue