Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-30BLI_task: Add new generic `BLI_task_parallel_iterator()`.Bastien Montagne
This new function is part of the 'parallel for loops' functions. It takes an iterator callback to generate items to be processed, in addition to the usual 'process' func callback. This allows to use common code from BLI_task for a wide range of custom iteratiors, whithout having to re-invent the wheel of the whole tasks & data chuncks handling. This supports all settings features from `BLI_task_parallel_range()`, including dynamic and static (if total number of items is knwon) scheduling, TLS data and its finalize callback, etc. One question here is whether we should provide usercode with a spinlock by default, or enforce it to always handle its own sync mechanism. I kept it, since imho it will be needed very often, and generating one is pretty cheap even if unused... ---------- Additionaly, this commit converts (currently unused) `BLI_task_parallel_listbase()` to use that generic code. This was done mostly as proof of concept, but performance-wise it shows some interesting data, roughly: - Very light processing (that should not be threaded anyway) is several times slower, which is expected due to more overhead in loop management code. - Heavier processing can be up to 10% quicker (probably thanks to the switch from dynamic to static scheduling, which reduces a lot locking to fill-in the per-tasks chunks of data). Similar speed-up in non-threaded case comes as a surprise though, not sure what can explain that. While this conversion is not really needed, imho we should keep it (instead of existing code for that function), it's easier to have complex handling logic in as few places as possible, for maintaining and for improving it. Note: That work was initially done to allow for D5372 to be possible... Unfortunately that one proved to be not better than orig code on performances point of view. Reviewed By: sergey Differential Revision: https://developer.blender.org/D5371
2019-10-22Merge branch 'blender-v2.81-release'Campbell Barton
2019-10-22BLI_math: support MATH_STANDALONE without EigenCampbell Barton
2019-10-20Shrinkwrap: improve numerical stability of Target Normal Project.Alexander Gavrilov
* Add proper adjustment for scale in the solver epsilon computation. * Run at least one full iteration of the solver, even if the initial state meets the epsilon requirement. * When applying offset, blend normal into the offset direction as the initial point moves very close to the target mesh. Also random improvements to debug trace output in the console.
2019-10-15Merge branch 'blender-v2.81-release'Dalai Felinto
2019-10-15Cleanup: Fix warningsDalai Felinto
2019-10-12Cleanup: clang-formatCampbell Barton
2019-10-12Cleanup: warningsCampbell Barton
2019-10-10File Browser: add back Delete, which now moves files to the trashRobert Guetzkow
In Blender 2.7 delete would permanently delete files, now this function is back but using more standard behavior. This patch includes code contributed by Kris (Metricity). Differential Revision: https://developer.blender.org/D4585
2019-10-10Cleanup: clang-format, spellingCampbell Barton
2019-10-09Fix Delaunay 2d valid bmesh mode bug.Howard Trickey
Wasn't checking for repeated vertices. Also, made choices of edges to keep more aesthetically pleasing.
2019-10-09Fix T70594: mathutils.geometry.tessellate_polygon flips trianglesmano-wii
Some scripts will need to be updated to support this.
2019-10-08CTest: Fix failing test BLI_expr_pylike_eval_test on clang/windowsRay Molenkamp
clang got a little to aggressive discarding unused variables see D6012 for details. Differential Revision: https://developer.blender.org/D6012 Reviewers: brecht, sergey, angavrilov
2019-10-03Cleanup: unused structs, struct membersCampbell Barton
2019-10-03Cleanup: argument naming, redundant NULL checksCampbell Barton
2019-10-01Cleanup: convert some macros to functionsBrecht Van Lommel
2019-10-01BLI: optimize GSQueue implementation to allocate in chunks, like BLI_StackBrecht Van Lommel
2019-09-30Cleanup: spellingCampbell Barton
2019-09-30Revert "macOS: Replaced OSSpinLock with os_unfair_lock."Stefan Werner
This reverts commit 9d282d7a8d689a17ae58e94453ae99a41e91b701. os_unfair_lock requires macOS 10.12 or newer.
2019-09-29Fix T69935: Silence Win32 OS Error DialogsHarley Acheson
Call SetErrorMode() at startup to prevent error mode dialogs. Differential Revision: https://developer.blender.org/D5941 Reviewed by Brecht Van Lommel
2019-09-27Cleanup: clang-formatCampbell Barton
2019-09-21Fix build error in debug build on macOSBrecht Van Lommel
NDEBUG is the standard define, not DEBUG.
2019-09-19Cleanup: spellingCampbell Barton
2019-09-18BLI_tasks: simplify/generalize heuristic computing default chunk size.Bastien Montagne
That code is simpler and more general (not limited to some specific values of thread numbers). It still gives similar default chunk size as what we had before, but handles smoother increase steps, and higher number of threads, by keeping increasing the chunk size. No functional change expected from that commit.
2019-09-17DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-09-14macOS: Replaced OSSpinLock with os_unfair_lock.Stefan Werner
OSSplinLock is a deprecated API, os_unfair_lock is its successor. This reduces the number of warnings when building on macOS.
2019-09-14MSVC: Fix macro collision with MSVC HeadersRay Molenkamp
Picked up while investigating a build error on the functions branch which seems to use this specific header in a way master doesn't. The problem: The MSVC headers define a `_CONCAT` macro, so does BLI_kdtree_imp.h however at the end `BLI_kdtree_imp.h` undefines the macro making the MS headers that still rely on it "unhappy". Who's fault is this: Ours, C99 Spec says ``` 7.1.3 Reserved identifiers - All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use. ... if the program removes (with #undef) any macro definition of an identifier in the first group listed above, the behavior is undefined. ``` So we should not have defined it, and we definitely should not have undefined it. We have *tons* of these violations, although fixing them would be great at one point lots of them are in /extern or in the 3rd party deps, I'd rather deal with them on a case by case basis when it actually causes issues. Differential Revision: https://developer.blender.org/D5790 Reviewers: campbellbarton, JacquesLucke
2019-09-14BLI: make Map.add_or_modify more powerfulJacques Lucke
The function now allows custom return types defined by the callbacks. This can be useful when a user of the data structure has to implement some custom behavior.
2019-09-14BLI: add utility to print VectorSet statsJacques Lucke
2019-09-14BLI: speedup adding to VectorSet by removing a checkJacques Lucke
2019-09-14BLI: remove non const accessors in VectorSetJacques Lucke
With this the values could have been changed without updating the hash table.
2019-09-14BLI: add missing includeJacques Lucke
2019-09-14BLI: rename SetVector to VectorSetJacques Lucke
The structure is a set built on top of a vector and not the other way around.
2019-09-14BLI: Improve forwarding semantics of some data structuresJacques Lucke
This makes it possible to use e.g. `std::unique_ptr` in a map.
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-09-14Revert "DRW: Refactor to support draw call batching"Clément Foucault
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
2019-09-13DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-09-13Fix `BLI_bvhtree_overlap_ex` assertmano-wii
2019-09-13Cleanup: use header guardsCampbell Barton
2019-09-13BLI: add non-const lookup methods for StringMapJacques Lucke
2019-09-13BLI: add some missing methods to Map and SetVectorJacques Lucke
2019-09-13BLI: make more integer type conversions explicitJacques Lucke
2019-09-13BLI: fix some integer conversionsJacques Lucke
2019-09-13BLI: new C++ hash table data structuresJacques Lucke
This commit adds some new hashing based data structures to blenlib. All of them use open addressing with probing currently. Furthermore, they support small object optimization, but it is not customizable yet. I'll add support for this when necessary. The following main data structures are included: **Set** A collection of values, where every value must exist at most once. This is similar to a Python `set`. **SetVector** A combination of a Set and a Vector. It supports fast search for elements and maintains insertion order when there are no deletes. All elements are stored in a continuous array. So they can be iterated over using a normal `ArrayRef`. **Map** A set of key-value-pairs, where every key must exist at most once. This is similar to a Python `dict`. **StringMap** A special map for the case when the keys are strings. This case is fairly common and allows for some optimizations. Most importantly, many unnecessary allocations can be avoided by storing strings in a single buffer. Furthermore, the interface of this class uses `StringRef` to avoid unnecessary conversions. This commit is a continuation of rB369d5e8ad2bb7.
2019-09-12Fix build error on WindowsBrecht Van Lommel
2019-09-12BLI: fix illegal zero sized arrayJacques Lucke
2019-09-12BMesh: New tool `BM_mesh_intersect_edges`mano-wii
Along with the new utility `BM_vert_weld_linked_wire_edges_into_linked_faces`
2019-09-12BLIKdopBVH: New `BLI_bvhtree_overlap_ex` utilitymano-wii
2019-09-12Fix: missing atomic includeJacques Lucke
2019-09-12BLI: new StringRef and StringRefNull data structuresJacques Lucke
These two data structures reference strings somewhere in memory. They do not own the referenced string. The string is considered const. A string referenced by StringRefNull can be expected to be null-terminated. That is not the case for StringRef. This commit is a continuation of rB369d5e8ad2bb7c2.