don't put pointers on device
make sure to not write outside pixel boundary