Skip to content
  • David Stevens's avatar
    virgl/gbm: improve gbm resource creation · 3f5ec0c8
    David Stevens authored and David Stevens's avatar David Stevens committed
    
    
    This change makes a set of changes to increase the range of gbm-based
    resources that can be allocated:
     - Add VIRGL_BIND_LINEAR to support linear gbm allocations.
     - Relax the bind flag argument check if VIRGL_BIND_SHARED or
       VIRGL_BIND_LINEAR is set.
     - For resources allocated from gbm, only try to create an image if one
       of the render target or sampler view bind flags is set.
     - Don't try to calculate the internal image format for external images.
    
    This change also fixes a use-after-free that could occur if external
    image creation failed.
    
    Signed-off-by: default avatarDavid Stevens <stevensd@chromium.org>
    Reviewed-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
    3f5ec0c8