Fix surface buffer uploading
The patch from #100 (closed). I only tested this with the wayland backend (where it works now), gnome-calculator seems to still crash on the drm backend i noticed (due to something else though). There is no gl error anymore. I would be still ok with not merging this yet, maybe someone else comes up with something better (or finds the new reason for the crash).