Merge: gamnit: optimize the `flat` 2D api using GPU buffers