The portal code, which also drives mirrors, is incomplete.
The way it is meant to work is that as RenderPolyScene draws the solid part of a scene from the player's viewpoint, it collects a list of portals seen (PolyDrawSectorPortal and PolyDrawLinePortal). Mirrors is a variation of the line portal, where the destination is the same line with the camera rotated (mirrored) in that line.
Once it collected the list of portals, it renders the solid part of each of them. It does this by calling PolyDrawLinePortal::Render, which then changes the ViewPos, ViewAngle, camera, and other nasty globals to convince the renderer that we are now standing in a new location. After that, it asks RenderPolyScene to draw the scene again where the output is restricted to just the pixels covered by the portal. If mirror rendering crashes it, the reason is probably something missing in PolyDrawLinePortal::SaveGlobals or RestoreGlobals.
The main thing making the portal stuff so incomplete is that it doesn't properly restrict what is viewable by a portal. A side effect of that is it often tries to draw half the world, plummeting the frame rate. It also doesn't properly track if a portal has already been seen, often causing it to recursively draw them over and over again until reaching the recursion limit.
Anyhow, to answer your question about the triangle drawer, the way to do it is to apply the mirror to the WorldToClip matrix. The rotation code already seems to be there in SaveGlobals (untested, looted from zdoom), but there might be a TriMatrix::scale(-1,0,0) missing for the matrix in PolyDrawLinePortal::Render. Note that mirroring like that changes all clockwise to counterclockwise, which means all the args.ccw values have to be negated. It is probably easiest to do that in
PolyTriangleDrawer::draw_arrays PolyTriangleDrawer::draw, as that's what all those other places end up calling.
Hope this wasn't to complex or that I skipped over too many details. Portal/mirror rendering is probably the most advanced part of the rendering process.
![Smile :)](./images/smilies/icon_smile.gif)