Resource IDs and tile shfits often meant buffers were accessed outside of their valid range. Patch ensures resource IDs are unpacked and shift ranges are shifted into the positive range to avoid inconsistent behaviour with negative modulo operations. Authored by Apple: Michael Parkin-White Pull Request: https://projects.blender.org/blender/blender/pulls/111808