Take the max viewport size into account when getting the max texture size for the framebuffers