Fixes and features which make more ES3.1 tests pass
This gets us closer to passing ES 3.1 tests (with the compute stuff on top). Ignore the st/mesa patch, it's part of another MR.
The dEQP GLES 3.1 tests are a good source of compute tests which are otherwise inaccessible / produce many failures.