OpenGL 4.3 and program_query_interface allows you to query which shader stage references variables, even PROGRAM_INPUT/OUTPUT variables. All except for transform feedback variables.
This seems to be missing functionality.
We discussed this and someone commented that the referenced-by query
can be done for all the things that can be referenced by multiple program
stages, while transform feedback variables can only be referenced by one
We'll consider this as a feature request going forward, but people asked
what your use case is.
Closing for lack of use cases that might motivate support for