I may be wrong, but IIRC, Carmack used a property of the BSP which is that each each leaf of the tree represents a convex volume. A nice property of the BSP makes it easy to locate in which of these convex volume you're inside. A second step is to compute which surfaces are visible from that volume (you compute that off line). So, each convex volume is associated with a list of visible surfaces. So when you're inside a convex volume, you know which part of the world you're in. The fortunate thing is that these lists are rather short, so the whole structure fits in memory.
And that was very clever (dunno if that was invented by Carmack though)
And that was very clever (dunno if that was invented by Carmack though)