Jonathan
781a772d8a
move immediately instead of splicing after construction (probably compiles to the same code but whatever)
...
don't add all of the `result_portals_onnode` one at a time; just directly copy-elision the result.
2022-08-14 07:33:41 -04:00
Jonathan
de7c8b42b4
fix hybrid at()
2022-08-13 20:57:58 -04:00
Jonathan
3c44eb58e7
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-13 20:31:02 -04:00
Jonathan
40b04b9518
use alloca instead of thread-local static
2022-08-13 20:30:51 -04:00
Eric Wasylishen
46ee6eb932
ci: switch from macos-10.15 to macos-11
2022-08-13 13:51:37 -06:00
Eric Wasylishen
9baf161fc0
work around macos bug (std::atomic_size_t::value_type missing)
2022-08-13 13:12:23 -06:00
Eric Wasylishen
1844f0810f
fix linux build
2022-08-13 12:40:11 -06:00
Jonathan
da5b40ce73
since buildportal_t is small and being stored in an std::list (which already stores them in nodes that require allocation & non-moving locations) we don't need to wrap them in unique_ptr; this saves a malloc/free per buildportal_t
2022-08-13 08:24:13 -04:00
Jonathan
2059835a47
use a more optimized version of SplitBrush for CheckPlaneAgainstVolume that doesn't require allocating/freeing a lot of memory
2022-08-13 06:39:30 -04:00
Jonathan
6d66e6d5cf
group together # of clipped faces, to reduce console spam of Q1 maps
...
always allow midplane split for hulls
2022-08-12 21:38:41 -04:00
Jonathan
e7647f5ca7
fix decompile
2022-08-12 20:12:35 -04:00
Eric Wasylishen
06a116670b
winding_t: make non-copyable
2022-08-12 02:06:23 -06:00
Jonathan
8b9c1bd784
fix missing includes
2022-08-12 02:42:52 -04:00
Jonathan
ea38e5eeb7
fix missing move
...
fix clip_back causing extra copies
2022-08-12 02:03:00 -04:00
Jonathan
bf162c7a86
allow explicit calling of percent_clock so it can be simplified a bit
...
add more timers in a few spots
by default, display percent timers but don't display elapsed for non-verbose stuff (bmodels); this is so it still shows that it's "working" instead of just showing blank for large maps, give user an idea on progress for certain stuff
merge all "side not found"s into a single line
time `FillOutside`
time `ProcessMapBrushes`
time `Brush_LoadEntity`
2022-08-12 01:30:04 -04:00
Jonathan
4bf2ab338c
allowing logging::percent to handle indeterminate values
...
fix logging::percent getting stomped in multi-threaded operations
add new stats facility to make creating lists of single-use stats easier to manage
fix SplitBrush storing a bunch of extra stats for ChopBrushes
2022-08-11 20:33:12 -04:00
Jonathan
c2378dc38c
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-11 02:58:58 -04:00
Jonathan
f851fac655
speed up compilation - we don't need to make a copy of node->volume going into SplitBrush now
2022-08-11 02:58:49 -04:00
Eric Wasylishen
afc8d74873
build fix
2022-08-10 23:59:02 -06:00
Jonathan
f17ce185f6
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-11 00:27:36 -04:00
Jonathan
0db1e0fc01
add chop control to settings
...
only chop if desired or if hull is -1 or > 0 since those can be chopped without affecting visuals
farewell, shared_lock
fix brush contents issue
2022-08-11 00:27:28 -04:00
Eric Wasylishen
1f3bf6edbc
qbsp: log BrushBSP function name
2022-08-10 21:45:08 -06:00
Jonathan
129dedb268
reset onnode between BrushBSP passes
2022-08-10 23:28:16 -04:00
Jonathan
4b4a1738fd
more partial revert
2022-08-10 23:06:37 -04:00
Jonathan
02e80645e6
partial revert of 097b564cc6
2022-08-10 22:43:42 -04:00
Jonathan
eb7c65362c
fix typo
...
assume non-sourced sides are non-visible
2022-08-10 22:27:40 -04:00
Jonathan
6ab037b03a
implement ChopBrushes
2022-08-10 22:12:23 -04:00
Jonathan
097b564cc6
remove bspbrush_t::original; it is no longer required since mapbrush_t is what the output is being written to
...
use some explicit types (bspbrush_t::ptr for pointer, bspbrush_t::container for container of pointers, and bspbrush_t::make_ptr to create one) so that we can swap it out with different pointers easier later
swap out bspbrush_t::ptr from unique_ptr to shared_ptr; it's not important yet, but it does not increase compilation time and will allow us to pass things to functions like SplitBrush without destroying the original as long as we still have a reference to it somewhere (important for ChopBrushes)
add get_positive_plane to mapface_t
instead of creating a whole copy of the bspbrush_t list, BrushBSP now just creates copies of the shared_ptrs which are then filtered down the tree; the originals are never modified by SplitBrushList and friends, only split into new brushes, so this is safe from what I can tell
portals now directly reference the mapface_ts
original_brushes now directly reference the mapbrush_ts
early exit in `BrushBSP` if brush list is empty (moved to top)
2022-08-10 16:02:16 -04:00
Jonathan
faf9173f10
remove file_order; we can infer this from the pointers now
...
remove unnecessary early microbrush check, use microbrush option value on later one
2022-08-10 02:22:32 -04:00
Jonathan
bca6bda7c3
move `visible` to mapface_t since we only need to store one boolean for it
2022-08-10 01:29:34 -04:00
Jonathan
f8f0e903a2
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-10 01:14:59 -04:00
Eric Wasylishen
c9a1d9f096
qbsp: don't store leafnode->volume once the leaf is created
2022-08-09 23:14:20 -06:00
Jonathan
74dcb1454e
remove mapface_t::visible, it's unused
2022-08-10 00:55:10 -04:00
Jonathan
834838ed72
move lmshift to mapface_t
...
store original mapface_t that a face_t was generated from
2022-08-10 00:53:58 -04:00
Jonathan
70f015a36c
move func_areaportal and lmshift from bspbrush_t to mapbrush_t
2022-08-10 00:48:55 -04:00
Jonathan
c0cec4e1ba
Rewrite of 697e3325f8
2022-08-10 00:11:17 -04:00
Jonathan
44eff2d7b1
throw in percent logging for MakeTreePortals
...
when node_t converts to leaf, destroy anything on it by re-initializing it
2022-08-09 20:33:49 -04:00
Jonathan
d6411cef01
remove AssertNoPortals - it's impossible for it to ever hit, and it's kind of expensive (~150ms for 60k portals)
2022-08-09 19:22:42 -04:00
Jonathan
ffeecd550f
clear tree when it's no longer required
2022-08-09 17:02:59 -04:00
Jonathan
697e3325f8
go back to vector for brush lists
2022-08-09 16:00:51 -04:00
Jonathan
b37917c9ca
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-09 14:57:46 -04:00
Jonathan
5e6dc9d274
parallelize free
2022-08-09 14:57:42 -04:00
Eric Wasylishen
67a376ad18
qbsp: BuildTree_r: avoid copying node->volume
2022-08-09 00:51:18 -06:00
Eric Wasylishen
55bdc88f9d
polylib: use tbb::scalable_allocator for winding std::vector storage
2022-08-09 00:23:43 -06:00
Eric Wasylishen
f3b9de57c6
build: add tbbmalloc
2022-08-09 00:19:39 -06:00
Eric Wasylishen
30b529b70f
qbsp: keep a pool of node_t's in tree_t in a tbb::concurrent_vector
...
rather than using std::unique_ptr recursively in nodes
2022-08-08 23:43:36 -06:00
Jonathan
189f70ca30
add in-place versions of union and expand to help with inlining
2022-08-08 22:43:10 -04:00
Jonathan
1c6b2e5a95
fix duplicate plane test
2022-08-08 21:27:42 -04:00
Jonathan
426668701e
clip_back/clip_front to match ChopWindingInPlace
...
simplify constructors for winding heap
use std::vector again for mapentity_t since it's being copied because of the std::list
2022-08-08 21:08:27 -04:00
Jonathan
8b7a1c21c9
use vector instead of raw heap for winding_storage_heap_t
2022-08-08 20:09:41 -04:00