- Use FunctionRef to avoid passing a separate user_data pointer
- Use std::string in arguments struct
- Add search items in one loop after gathering search items
- Use Vector of unique_ptr for search items instead of linked list
Span is preferrable since it's agnostic of the source container,
makes it clearer that there is no ownership, is 8 bytes smaller,
and can be passed by value.
It is not required to hold the lock of DST when performing
compositing on GPU, as the compositor implementation uses the
GPU module directly, bypassing the draw manager.
However, currently this is known to cause issues on macOS,
and is not yet tested on Windows.
On Linux it works correctly, and avoids lock while compositor
is running.
There could still be a small locking hiccup, when the GPU
context is created and disposed. This needs to be looked
into.
Pull Request: https://projects.blender.org/blender/blender/pulls/118286
The `object_to_world` and `world_to_object` matrices are set during
depsgraph evaluation, calculated from the object's animated location,
rotation, scale, parenting, and constraints. It's confusing and
unnecessary to store them with the original data in DNA.
This commit moves them to `ObjectRuntime` and moves the matrices to
use the C++ `float4x4` type, giving the potential for simplified code
using the C++ abstractions. The matrices are accessible with functions
on `Object` directly since they are used so commonly. Though for write
access, directly using the runtime struct is necessary.
The inverse `world_to_object` matrix is often calculated before it's
used, even though it's calculated as part of depsgraph evaluation.
Long term we might not want to store this in `ObjectRuntime` at all,
and just calculate it on demand. Or at least we should remove the
redundant calculations. That should be done separately though.
Pull Request: https://projects.blender.org/blender/blender/pulls/118210
The tiled compositor code is mainly still around, which is only
expected to be a short-lived period. Eventually it will also be
removed.
The OpenCL, Group Buffers, and Chunk size options are already removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/118010
Caused by previous change for full-frame compositor.
The determine_canvas() is still used by the tiled compositor,
so restore it to the state which makes both compositors to work.
Pull Request: https://projects.blender.org/blender/blender/pulls/118254
This aligns the node behavior to GPU compositor.
The implementation is a bit of a stretch of the full-frame
constant-foldable operations, but this is as good as it can
get in a short time.
The alternative could be to somehow inject a SetValue
operation, but since it expects ahead-of-time known value it
is not as straight forward.
Pull Request: https://projects.blender.org/blender/blender/pulls/118248
The convex hull tests included a reference AABB-fitting function for
comparison which was used to validate the optimized implementation.
This wasn't great as it depended on matching exact return values and
didn't test the logic of AABB-fitting worked usefully.
Replace this with a more general test that creates random polygons with
known bounds, apply a random rotation & translation, then use
AABB-fitting to un-rotate the points, passing when the bounds are no
larger than the size of the generated input.
Details:
- Make BLI_convexhull_aabb_fit_hull_2d a static function again as it was
only exposed for tests. Use BLI_convexhull_aabb_fit_points_2d instead.
- Remove brute force reference implementation from tests,
moving this to an assertion within convexhull_2d
(disabled by default since it's quite slow).
The lack of these functions in the "single trivial value" and "sliced
GVArray" implementations caused some code to call fack to the base
class functions. Those are much slower since they involve a virtual
function call per element. For example, this changed the runtime of
creating a new boolean attribute set to "true" on one million faces
from 3.4 ms to 0.35 ms.
Pull Request: https://projects.blender.org/blender/blender/pulls/118161