drisw: use shared memory when possible