Skip to content
  • Brian Paul's avatar
    st/wgl: fix double-present on swapbuffers bug · 75d1e363
    Brian Paul authored
    
    
    The stw_st_framebuffer_present_locked() function was getting called
    twice per SwapBuffers.  First, when st_context_iface::flush() was
    called from DrvSwapBuffers() because the ST_FLUSH_FRONT flag was
    given.  Second, by stw_st_swap_framebuffer_locked() which does the
    actual SwapBuffers.
    
    Two code changes:
    1. Pass ST_FLUSH_END_OF_FRAME, instead of ST_FLUSH_FRONT.
    2. Move the implementation of stw_flush_current_locked() into
    DrvSwapBuffers() since it's not called anywhere else.
    
    Not much change in perf for benchmarks like Lightsmark, but some simple
    Mesa demos are measurably faster.
    
    Reviewed-by: default avatarJosé Fonseca <jfonseca@vmware.com>
    75d1e363