Commit graph

13 commits

Author SHA1 Message Date
Randy Heit
6a1a0e007a - Added runtime detection of SSE2 so that ZDBSP can select either the regular
ClassifyLine routine or a version compiled with SSE2 optimizations. This
  pretty much removes any reason to do a separate SSE2 build, since most of
  the time is spent in ClassifyLine, so using SSE2 in just that one function
  helps the most.

SVN r172 (trunk)
2006-06-06 19:15:39 +00:00
Randy Heit
0d37e97f13 - Nodebuilding is a little faster if we inline PointOnSide.
SVN r171 (trunk)
2006-06-06 05:31:53 +00:00
Randy Heit
4ce1df4aeb - Rearranged tests in ClassifyLine, making it slightly faster.
SVN r170 (trunk)
2006-06-06 05:19:32 +00:00
Randy Heit
cf0d73b128 - Changed FEventTree into a regular binary tree, since there just aren't enough
nodes inserted into it to make a red-black tree worthwhile.
- Added more checks at the start of ClassifyLine so that it has a better chance
  of avoiding the more complicated checking, and it seems to have paid off with
  a reasonably modest performance boost.

SVN r169 (trunk)
2006-06-06 05:00:46 +00:00
Randy Heit
6d799f0a1c - Added a "vertex map" for ZDBSP's vertex selection. (Think BLOCKMAP for
vertices instead of lines.) On large maps, this can result in a very
  significant speed up. (In one particular map, ZDBSP had previously
  spent 40% of its time just scanning through all the vertices in the
  map. Now the time it spends finding vertices is immeasurable. Now 68%
  of its time on that map is spent inside ClassifyLine--because that
  routine is called more than 16 million times, which suggests that even
  a minor speedup in that routine should have a big impact--if I could
  just think of how that might happen.) On small maps, this won't make
  much of a difference, because the number of vertices to search was so
  small to begin with.

SVN r167 (trunk)
2006-06-06 02:45:48 +00:00
Randy Heit
30436092ed - Slight performance tweak to ClassifyLine, since a significant portion of
the runtime is spent in that function. I should probably write a faster
  vertex finding routine, since I currently just do a linear search through
  all the vertices. That ought to help speed up SplitSegs, the second most
  time-consuming routine. I also tried storing vertices as doubles instead
  of fixeds, but that made performance drop across the board, so that's a
  change that didn't make it in.

  Ironically, the GCC compiled version is noticeably faster than the VC
  version for x87 math, but VC produces a marginally faster SSE2 version.

SVN r163 (trunk)
2006-06-03 04:12:33 +00:00
Randy Heit
dd6f2eab90 - Fixed writing of v5 GL segs in ZDBSP.
- Fixed ZDBSP compilation under Linux, including support
  for 64-bit architectures.


SVN r162 (trunk)
2006-06-01 17:32:32 +00:00
Randy Heit
8617f499d5 - Added code to explicitly handle outputting overlapping segs when
building GL nodes with ZDBSP, removing the check that discarded
  them early on.

SVN r157 (trunk)
2006-05-31 23:17:26 +00:00
Randy Heit
938f25e39b Added a Makefile for building ZDBSP with GCC and SSE configurations for VC.
SVN r156 (trunk)
2006-05-31 20:25:20 +00:00
Randy Heit
1a979de350 ZDBSP fixes:
- AddIntersection() should convert to doubles before subtracting the vertex
  from the node, not after, to avoid integer overflow. (See cah.wad, MAP12
  and MAP13.) A simpler dot product will also suffice for distance calculation.
- Splitters that come too close to a vertex should be avoided. (See cata.wad.)
- Red-Black Tree implementation was broken and colored every node red.
- Moved most of the code for outputting degenerate GL subsectors into another
  function.
- Removed forgotten debugging file dump from WriteSSectors2().
- Enabled reference optimization and COMDAT folding in the linker for a slightly
  smaller executable.

SVN r155 (trunk)
2006-05-31 15:39:58 +00:00
Randy Heit
3128c11fd1 ZDBSP fixes:
- MapSideDef.sector was declared signed but treated as unsigned.
- Degenerate (one-dimensional) subsectors could throw away segs when
  output for GL nodes depending on the seg ordering.

SVN r152 (trunk)
2006-05-29 03:07:57 +00:00
Christoph Oelckers
e601a49695 Fixed ZDBSP seg splitter. On occasion it assigned the offset to the incorrect of the two segs created by a split.
SVN r118 (trunk)
2006-05-16 09:26:54 +00:00
Randy Heit
24d4f0b45c Initial commit of zdbsp.
SVN r12 (trunk)
2006-02-24 05:17:19 +00:00