In the rendering pipeline, in what coordinate space are vertices when they arrive at the primitive assembly stage? Full disclaimer, this was a test question, but I couldn't find any information online.

In my opinion, this depends on if the primitive assembly stage happens before or after perspective division. If before, then it must be in homogeneous clip space. If after, NDC space.

Which of the two is it? Or am I completely wrong and its neither?
As pointed out by Simon F, the clipping stage needs to clip against edges (and thus triangles/primitives). Thus the primitive assembly stage cannot happen after clipping, even though the Pipeline is described such that primitive assembly happens after clipping.

Slide 16 of Ohio university's Han-Wei Shen's 2010 course The OpenGL Rendering Pipeline suggests that vertices are transformed to Clip Space, then the primitive assembly happens and only afterwards is clipping actually done.



According to Khronos' wiki the primitive assembly happens after clipping, which includes the following:


  The vertex positions are transformed from clip-space to window space via the Perspective Divide and the Viewport Transform.


Window Space is described as the space after the viewport transform and that means after NDC space:


  The viewport transform defines the transformation of vertex positions from NDC space to window space. These are the coordinates that are rasterized to the output image.


Since the viewport transform includes a scaling for the width and height of the viewport, as well as a translation with the viewports position on screen, you should end up with pixel coordiantes of your screen.