st/mesa: correctly calculate the storage offset