glx: Don't flush twice if we fallback to dri2CopySubBuffer
glx: Don't flush twice if we fallback to dri2CopySubBuffer

The flush extensions flush call indicates end of frame and should only
be called once per frame.  However, in the dri2SwapBuffer fallback
path, we call flush and then call dri2CopySubBuffer, which also calls
flush.  Refactor the code to only call flush once.

bkaradzic/glsl-optimizer,mapbox/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,djreep81/glsl-optimizer,mcanthony/glsl-optimizer,metora/MesaGLSLCompiler,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,metora/MesaGLSLCompiler,wolf96/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,metora/MesaGLSLCompiler,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,jbarczak/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer