intel/brw: intel/elk: Fix a bunch of UB discoverd by -fsanitize=shift
I don't even recall the reason, but some time ago I started including -fsanitize=shift
in my debug builds. A recent change on one of my systems caused this to generate ninja test
failures. This MR fixes the things that come up in ninja test
and a normal shader-db or fossil-db run.
One of these issues, fixed by the first commit, appears to be an actual bug.