Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
See Design task T68277, and patch D5423.
This commit includes edits by @ideasman42 to patch in
branch temp-D5423-update, plus responses to his comments.
|
|
There isn't anything specific to text data with these functions.
|
|
Nearly all byte-color functions use 'uchar'
causing casts when then colors were passed in.
Declare as uchar to remove the need for casts.
|
|
|
|
Creates a projection matrix for a small region of the viewport.
Reviewers: campbellbarton, brecht
Differential Revision: https://developer.blender.org/D5412
|
|
Improve the area calculation method for better precision,
so faces offset from the center don't have a less precise area.
|
|
Perform with unsigned int instead of signed int.
Differential Revision: https://developer.blender.org/D5402
|
|
Own error in recent code de-duplication: a345f56ce3331
causing issues on Windows.
Flipped argument for reading the exact size.
|
|
T68035 by @luzpaz
|
|
Differential Revision: https://developer.blender.org/D3744
|
|
TLS and Settings can be used by other types of parallel 'for loops', so
removing 'Range' from their names.
No functional changes expected here.
|
|
Previously we were setting it to 1 (aka no 'chunking'), to follow
previous behavior. However, this is far from optimal, especially with
CPUs that can have tens of threads nowadays.
Now taking an heuristic approach (inspired from the one already existing
for `BLI_task_parallel_listbase()`, which tries to guesstimate best
chunk sizes based on several factors (amount of threads/parallel tasks,
total number of items, ...).
Think this is a reasonable base ground, more optimization here would of
course be possible.
Note that code that was already explicitely settings some value here
won't be affected at all by that change.
|
|
Also remove goto's.
|
|
And remove redundant add operation.
|
|
|
|
Reading a directory as a file on Linux was attempting to allocate LONG_MAX,
this happens in template file lists (fix for that coming next).
|
|
|
|
|
|
|
|
|
|
clang does not seem support the static_assert with
message overload.
|
|
Function would not clear the static scheduler pointer, which lead to
crash (mem use after free) when trying to re-init and use the task API
again. Should not happen in Blender itself, but could in other cases
(like some future gtests ;) ).
|
|
This greatly improves the error message
|
|
|
|
Automated using clang-tidy.
|
|
|
|
|
|
Still needs a proper solution for older compilers with custom static assert.
macro that can conflict when there is an assert on the same line in multiple
files.
|
|
Some versions of the Windows SDK headers have a dbghelp.h that will emit
C4091 warnings, repress them just this once, since the warn can be helpful
in other places.
|
|
This patch makes BLI_task_scheduler_create wait for all worker threads to have started before
returning to caller. For very short workloads (BLI_taks_test) there is the chance that the
worker threads have not fully started yet, and the main thread is calling pthread_join at
the same time as pthread_setspecific is being called on the worker threads which causes a
deadlock on pthreads4w.
Differential Revision: https://developer.blender.org/D4936
Reviewed By: mont29, sergey, brecht
|
|
The declaration and implementation of BLI_path_name_at_index were
out of sync leading to build warning
C4028: formal parameter 1/3/4 different from declaration
|
|
Wrong printf format specifier was used leading to warning C4477
|
|
|
|
Without this any functions declared that take BLI_Buffer
also needed to include the header.
|
|
Remove the clear allocation flag as it has little impact since there should
be very few allocation per redraw.
Make BLI_memblock_alloc and BLI_memblock_iterstep much more cache efficient
removing them almost entirely from performance profiles.
|
|
|
|
Allows app-templates to define their own adjustments to preferences.
This matches `load_factory_startup_post`, use when loading preferences.
|
|
- Use min/max instead of bottom/top
(in keeping with the rest of the BLI_rect API).
- Swap args (was passing in max, min).
|
|
|
|
very straightforward: initialize default to the same hard limit as the
RNA properties.
Annoying part is that it's not trivial to make RNA to use same BLI functions,
so leaving that behind for now.
|
|
|
|
Use the Blender RNG instead of rand() to solve it.
|
|
- Use int instead of uint for safety and less conversions.
- Add free callback
- Add cleared alloc option
|
|
This is really close to BLI_mempool but uses an array to keep track of the
chunks of memory. There is no tagging necessary to clear the whole
structure so reuse is fast.
Naturally supports iteration but does not support freeing.
|
|
|
|
matrix inversion was changed in rB01c75c3765eb from own code to EIGEN
for performance reasons. EIGEN would return a zero matrix on failure
(resulting in the pivot always being at the object origin).
This brings back the "old" matrix inversion code (which has the benifit
of providing a partial solution which makes the local transform center
appear correct)
Reviewers: campbellbarton
Maniphest Tasks: T57767
Differential Revision: https://developer.blender.org/D4804
|
|
Unlike location and rotation, there is a meaningful definition of
overall/average scaling via the total change in the volume. This
adds an option to retrieve that via a single driver variable,
instead of having to use three and an expression.
Using the determinant to compute the volume scaling also allows
detecting flipping due to negative scale - this is impossible
to do via the three variable approach.
The volume_scale functions are added purely for code readability:
'volume scale factor' is easier to understand than determinant.
Differential Revision: https://developer.blender.org/D4803
|