Use global memory to keep temporary buffers (not useful revert).
Revert previous commit.