Skip to content
  • Paul Kocialkowski's avatar
    glamor: Propagate FBO allocation failure for picture to texture upload · c98c7709
    Paul Kocialkowski authored
    
    
    When uploading a picture to a texture, glamor_upload_picture_to_texture
    calls glamor_pixmap_ensure_fbo to ensure that there is backing FBO.
    The FBO will be allocated if the picture's drawable pixmap does not have
    one already, which can fail when there is no GL memory left.
    
    glamor_upload_picture_to_texture checks that the call succeeded and will
    enter the failure path if it did not. However, unlike many other
    functions in glamor, this one has ret set to TRUE initially, so it needs
    to be set to FALSE when a failure happens.
    
    Otherwise, the error is not propagated and the failure path return TRUE.
    This leads to a fault when trying to access the FBO pointer later on.
    
    Signed-off-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
    c98c7709