We can read the output of Vertex shading stage by using PrimitiveIDs in the geometry shader (reference: Does Vulkan have a TransformFeedback equivalent - Stack Overflow).
We can also read the output of Fragment shading state by reading the Frame buffer with some APIs.
So, can we read the output of other pipeline stages, such as Primitive assembly stage and Rasterization stage?
Vulkan does not support “reading out the output” of any pipeline stage.
Geometry shaders take as input the output of the previous active shader stage, aggregated into primitives. But that’s the nature of the GS as a concept; what you do with that information is up to you. Also, you’re not reading the output of the VS; a tessellation shader can execute between them, and a GS would see the outputs of that process. Similarly, you’re not reading the output of the fragment shader stage; you’re reading an image that has been written to. That’s not the same thing (especially since there are several stages between the FS and the image that can modify the data).
Can you cleverly use various Vulkan constructs to have the effect of storing the output of certain pipeline operations? Yes. But this is not a specific function of Vulkan, and it certainly does not mean that you can do so for arbitrary parts of the pipeline.