glamor: Drop dead fbo handling from GLAMOR_MEMORY pict uploads.
The previous commit asserts that we don't have one. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
		
							parent
							
								
									ee7ca670b1
								
							
						
					
					
						commit
						1bed5ef2b8
					
				| 
						 | 
					@ -734,27 +734,10 @@ glamor_pixmap_upload_prepare(PixmapPtr pixmap, GLenum format, int no_alpha,
 | 
				
			||||||
                             int revert, int swap_rb)
 | 
					                             int revert, int swap_rb)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int flag = 0;
 | 
					    int flag = 0;
 | 
				
			||||||
    glamor_pixmap_private *pixmap_priv;
 | 
					    glamor_screen_private *glamor_priv =
 | 
				
			||||||
    glamor_screen_private *glamor_priv;
 | 
					        glamor_get_screen_private(pixmap->drawable.pScreen);
 | 
				
			||||||
    glamor_pixmap_fbo *fbo;
 | 
					 | 
				
			||||||
    GLenum iformat;
 | 
					    GLenum iformat;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pixmap_priv = glamor_get_pixmap_private(pixmap);
 | 
					 | 
				
			||||||
    glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (pixmap_priv->gl_fbo != GLAMOR_FBO_UNATTACHED)
 | 
					 | 
				
			||||||
        return 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (pixmap_priv->fbo
 | 
					 | 
				
			||||||
        && (pixmap_priv->fbo->width < pixmap->drawable.width
 | 
					 | 
				
			||||||
            || pixmap_priv->fbo->height < pixmap->drawable.height)) {
 | 
					 | 
				
			||||||
        fbo = glamor_pixmap_detach_fbo(pixmap_priv);
 | 
					 | 
				
			||||||
        glamor_destroy_fbo(glamor_priv, fbo);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (pixmap_priv->fbo && pixmap_priv->fbo->fb)
 | 
					 | 
				
			||||||
        return 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (!(no_alpha || (revert == REVERT_NORMAL)
 | 
					    if (!(no_alpha || (revert == REVERT_NORMAL)
 | 
				
			||||||
          || (swap_rb != SWAP_NONE_UPLOADING))) {
 | 
					          || (swap_rb != SWAP_NONE_UPLOADING))) {
 | 
				
			||||||
        /* We don't need a fbo, a simple texture uploading should work. */
 | 
					        /* We don't need a fbo, a simple texture uploading should work. */
 | 
				
			||||||
| 
						 | 
					@ -762,10 +745,6 @@ glamor_pixmap_upload_prepare(PixmapPtr pixmap, GLenum format, int no_alpha,
 | 
				
			||||||
        flag = GLAMOR_CREATE_FBO_NO_FBO;
 | 
					        flag = GLAMOR_CREATE_FBO_NO_FBO;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((flag == GLAMOR_CREATE_FBO_NO_FBO
 | 
					 | 
				
			||||||
         && pixmap_priv->fbo && pixmap_priv->fbo->tex))
 | 
					 | 
				
			||||||
        return 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP)
 | 
					    if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP)
 | 
				
			||||||
        iformat = gl_iformat_for_pixmap(pixmap);
 | 
					        iformat = gl_iformat_for_pixmap(pixmap);
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue