u_format: Use memcpy to avoid unaligned accesses
These functions are used by gl[Get]TexImage
, which imposes no
alignment restructions on the void *pixels
parameter.
This fixes an unaligned access in GTK's "gtk:gdk / memorytexture" unit test on SPARC, which causes the test to fail.
Fixes: 45ae4434 ("util: Use bitshift arithmetic to unpack pixels.")