added per-device constant memory and transfer to it