Fix wrong size generated of FBO for some games which uses it as render-to-texture
Reference and modified code from @arnastia
Merge remote-tracking branch 'upstream/master' into patch-13
Merge pull request #3108 from raven02/patch-13

Fix wrong size generated FB which uses for render-to-texture