Skip to content
  • Emma Anholt's avatar
    glamor: Just set the logic op to what we want at the start of all rendering. · 6ba6cc57
    Emma Anholt authored
    
    
    By dropping the unconditional logic op disable at the end of
    rendering, this fixes GL errors being thrown in GLES2 contexts (which
    don't have logic ops).  On desktop, this also means a little less
    overhead per draw call from taking one less trip through the
    glEnable/glDisable switch statement of doom in Mesa.
    
    The exchange here is that we end up taking a trip through it in the
    XV, Render, and gradient-generation paths.  If the glEnable() is
    actually costly, we should probably cache our logic op state in our
    screen, since there's no way the GL could make that switch statement
    as cheap as the caller caching it would be.
    
    v2: Don't forget to set the logic op in Xephyr's drawing.
    
    Signed-off-by: default avatarEric Anholt <eric@anholt.net>
    Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
    6ba6cc57