v3dv: make sure we emit vertex attributes in location order

The order in which we emit the attributes is relevant, since
GL_SHADER_STATE_ATTRIBUTE_RECORD packets don't include an explicit
attribute index. This means that we need to emit them in driver
location order, since the compiler uses that location to compute
attribute offsets in the VPM.

Fixes ~1300 CTS tests in:
dEQP-VK.pipeline.vertex_input.multiple_attributes.out_of_order.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
3 files changed