• Eric Anholt's avatar
    glamor: Just set the logic op to what we want at the start of all rendering. · 6ba6cc57
    Eric 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: Eric Anholt's avatarEric Anholt <eric@anholt.net>
    Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
glamor_render.c 65.5 KB