panfrost: Passthrough attributes to fragment shader
When we have a vertex shader like:
attribute vec4 a_foo;
varying vec4 v_foo;
void main() {
...
v_foo = a_foo;
...
}
where the VS never touches the attribute, except to passthrough to the fragment shader, Midgard can optimize this. Noting that attributes and varyings use the same descriptors in the command stream, we can simply move the a_foo
attribute descriptor to a varying descriptor of the corresponding fragment shader, allowing for zero-copy operation, allowing one load and one store to be removed in the vertex shader, which might be a win for certain vertex-heavy scenes.