Merge branch 'gx-optimization' This branch reduces the number of useless state flushes in the video emulation layer by checking whether a BP/XF change will have an effect or not. Greatly reduces the number of GL calls per frame. Thanks to degasus for his help!