Skip to content
  • Kristian Høgsberg's avatar
    glx: Fix config chooser logic for 'mask' matching · edb5253d
    Kristian Høgsberg authored
    
    
    When matching attributes using the 'mask' matching criteria, the spec
    says that
    
      "Only GLXFBConfigs for which the set bits of attribute include all
       the bits that are set in the requested value are
       considered. (Additional bits might be set in the attribute)."
    
    The current test returns true if the two bit masks have bits in
    common, specifically it matches even if the requested value has bits
    set that are not set in the fbconfig attribute.  For example, an
    application asking for
    
      GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT | GLX_PBUFFER_BIT,
    
    as glxpbdemo does, will match fbconfigs that don't support pbuffer
    rendering, as long as they support pixmap rendering.
    
    Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
    edb5253d