everything up to the D3D difficult merge

I greatly improved the symbol debugging for finding culling functions.
And merged everything up to the difficult merge, plus a commit after it.