Age | Commit message (Collapse) | Author |
|
Differential Revision: https://developer.blender.org/D16027
|
|
This doesn't work with path guiding, and likely other features.
|
|
GHOST_SystemWayland::getModifierKeys() now returns the correct
modifier keys held instead of guessing that both left/right modifiers
were held.
|
|
Check modifier keys using XKB_STATE_MODS_DEPRESSED which is used
to check if modifiers are physically held. In practice it's unlikely
this would have caused an error for key-maps in common use.
|
|
|
|
* Windows build fixes
* Workaround for Hydra + OpenColorIO link issue
* Bump version
|
|
Switch to target_ functions to avoid this.
|
|
Holding the OS (Windows) key on Win32 used key-repeat behavior.
While as far as I know it didn't cause user visible errors - sending
repeated modifier events isn't expected behavior and doesn't happen
on other platforms (or for other modifier keys).
|
|
Handling the OS key now match other modifiers in GHOST which detect
each key separately, making the behavior simpler to reason about since
mapping a single key to a modifier state is simpler, avoiding handling
that only applied to the OS-Key.
This means simulating key up/down events can use the correct modifier.
In the window-manager this is still only accessed accessed via KM_OSKEY.
|
|
This only affected meshes containing degenerate triangles.
|
|
|
|
|
|
|
|
Regression introduced in rBbbf87c4f7509, which now relies on OS coordinates for Drag and Drop.
These coordinates did not match on different OSs.
|
|
Caused by 410a6efb747f188da30c which didn't properly use the
smallest size between the Cycles and Blender point clouds.
|
|
|
|
Cleans up the file structure to be more similar to that of the SVM
and also makes it possible to build kernels with OSL support, but
without having to include SVM support.
This patch was split from D15902.
Differential Revision: https://developer.blender.org/D15949
|
|
|
|
Additionally, just stick to a pure error stating. Such messages
are aimed for developers and it is rather implied that oneAPI
rendering will be disabled.
|
|
A continuation of previous fix for malloc hooks which got removed
from the new glibc library.
The pre-compiled jemalloc has definitions which interpose hooks
in glibc leading to linking errors with multiple hook definitions.
A simple fix is to skip doing the workaround when using jemalloc
from pre-compiled libraries.
This will likely be revisited in the future, but for now it is
important to fix compilation errors for developers.
|
|
|
|
The pre-processor blocks contained un-balanced braces, causing a syntax
error when building with WAYLAND but not X11.
Use the same number of opening & closing braces in each pre-processor
block so changes aren't as likely to break other platforms.
Also assert when unexpected states are reached.
|
|
|
|
Starting from GLibC 2.34, deprecated `__malloc_hook` & co. have been
removed from headers, while still present in the shared library itself.
This means that it is no more possible to build Blender with USD 22.03
on recent linux systems.
While USD 22.08 has a fix to this issue, it is unlikely to be upgraded
for Blender 3.4, and definitely not for Blender 3.3.
This commit ensures Blender can build with USD 22.03 and glibc >= 2.34.
Ref.: T99618,
https://devtalk.blender.org/t/building-blender-on-linux-using-glibc-2-34-raises-linking-errors-from-the-usd-library/24185
Patch by @brecht, many thanks.
|
|
|
|
|
|
This has the advantage of being able to use information about the
existing OSL closures in various places without code duplication. In
addition, the setup code for all closures was moved to standalone
functions to avoid usage of virtual function calls in preparation for GPU
support.
This patch was split from D15902.
Differential Revision: https://developer.blender.org/D15917
|
|
attribute map
The SVM attribute map is always generated and uses a simple
linear search to lookup by an opaque ID, so can reuse that for OSL
as well and simply use the attribute name hash as ID instead of
generating a unique value separately. This works for both object
and geometry attributes since the SVM attribute map already
stores both. Simplifies code somewhat and reduces memory
usage slightly.
This patch was split from D15902.
Differential Revision: https://developer.blender.org/D15918
|
|
|
|
|
|
Though end result was still correct. Thanks to Alaska for spotting this.
|
|
|
|
- Reduce variable scope.
- Use snake-case for variables.
- Remove unnecessary counter when building file-list.
- Remove break after return.
- Use early return.
- Add missing braces.
|
|
- Use pascel-case type names, instead of snake-case with `_t` suffix.
- Use `GWL_` prefix (short for GhostWayLand), to distinguish these
types from ghost (`GHOST_*`) and wayland (`wl_*`) types.
- Rename `input` to `seat` (following wayland's own terminology).
- Use `wl_` prefix for wayland native variables which have locally
defined equivalents so `GWL_Output *output` isn't confused with
`struct wl_output *wl_output`. As the locally defined types are used
more often this is less verbose overall.
|
|
|
|
|
|
This commit is a big overhaul to the Mikktspace module, which is used
to compute tangents. I'm not calling it a rewrite since it's the
result of a lot of iterations on the original code, but pretty much
everything is reworked somehow.
Overall goal was to a) make it faster and b) make it maintainable.
Notable changes:
- Since the callbacks for requesting geometry data were a big
bottleneck before, I've ported it to C++ and made it header-only,
templating on the data source. That way, the compiler generates code
specific to the caller, which allows it to inline the data source and
specialize for some cases (e.g. subd vs. non-subd in Cycles).
- The one input parameter, an optional angle threshold, was not used
anywhere. Turns out that removing it allows for considerable
algorithmic simplification, removing a lot of the complexity in the
later stages. Therefore, I've just removed the option in the new code.
- The code computes several outputs, but only one (the tangent itself)
is ever used in Blender. Therefore, I've removed the others to
simplify the code. They could easily be brought back if needed, none
of the algorithmic simplifications are conflicting with them.
- The original code had fallback paths for many steps in case temporary
memory allocation fails, but that never actually gets used anyways
since malloc() doesn't really ever return NULL in practise, so I
removed them.
- In general, I've restructured A LOT of the code to make the
algorithms clearer and make use of some C++ features (vectors,
std::array, booleans, classes), though there's still some of cleanup
that could be done.
- Parallelized duplicate detection, neighbor detection, triangle
tangent computation, degenerate triangle handling and tangent space
accumulation.
- Replaced several algorithms with faster equivalents: Duplicate
detection uses a (concurrent) hash set now, neighbor detection uses
Radixsort and splits vertices by index pairs etc.
As for results, the exact speedup depends on the scene of course, but
let's consider the file from T97378:
- Blender 3.1 (before D14675): 6.07sec
- Blender 3.2 (with D14675): 4.62sec
- rBf0a36599007d (last nightly build): 4.42sec
- With this commit: 0.90sec
This speedup will mostly be noticed at the start of Cycles renders and,
even more importantly, in Eevee when doing something that changes the
geometry (e.g. animating) on a model using normal maps.
Differential Revision: https://developer.blender.org/D15589
|
|
The recent revert of Apple silicon inlining changes to avoid long compile times
worked on macOS 12, but in macOS 13 Beta it results in render errors. This may
be a compiler bug and perhaps get fixed in time, but try to be on the safe side
and ensure Blender 3.3.0 works regardless.
This brings part of the inlining back, which brings improved performance but
also longer compiler times again. Compile time is around 2min now, where the
previous full inlining was about 5-7min.
Patch by Michael Jones.
Differential Revision: https://developer.blender.org/D15897
|
|
Causing OptiX kernel build errors on Arch Linux.
Differential Revision: https://developer.blender.org/D15891
|
|
|
|
Differential Revision: https://developer.blender.org/D15889
|
|
|
|
sampler limit.
Enables a feature flag during OpenGL device initialisation on macOS, which increases the available number of texture samplers available for use within shaders. Enabling this flag removes purple rendering artifacts present in certain EEVEE materials, when the existing limit of 16 is exceeded.
This feature flag is supported on Apple Silicon and AMD GPUs, for devices supporting macOS 11.0+. Device initialisation first tests whether GL device creation with the flag is supported, if not, we fall back to standard initialisation.
Other solutions would not be trivial or incur additional performance overhead or feature limitations. Other workarounds, such as texture atlas's, could already be created by artists.
{F13245498}
{F13245497}
Reviewed By: jbakker
Maniphest Tasks: T57759, T63935
Differential Revision: https://developer.blender.org/D15336
|
|
For copy-on-write, we want to share attribute arrays between meshes
where possible. Mutable pointers like `Mesh.mvert` make that difficult
by making ownership vague. They also make code more complex by adding
redundancy.
The simplest solution is just removing them and retrieving layers from
`CustomData` as needed. Similar changes have already been applied to
curves and point clouds (e9f82d3dc7ee, 410a6efb747f). Removing use of
the pointers generally makes code more obvious and more reusable.
Mesh data is now accessed with a C++ API (`Mesh::edges()` or
`Mesh::edges_for_write()`), and a C API (`BKE_mesh_edges(mesh)`).
The CoW changes this commit makes possible are described in T95845
and T95842, and started in D14139 and D14140. The change also simplifies
the ongoing mesh struct-of-array refactors from T95965.
**RNA/Python Access Performance**
Theoretically, accessing mesh elements with the RNA API may become
slower, since the layer needs to be found on every random access.
However, overhead is already high enough that this doesn't make a
noticible differenc, and performance is actually improved in some
cases. Random access can be up to 10% faster, but other situations
might be a bit slower. Generally using `foreach_get/set` are the best
way to improve performance. See the differential revision for more
discussion about Python performance.
Cycles has been updated to use raw pointers and the internal Blender
mesh types, mostly because there is no sense in having this overhead
when it's already compiled with Blender. In my tests this roughly
halves the Cycles mesh creation time (0.19s to 0.10s for a 1 million
face grid).
Differential Revision: https://developer.blender.org/D15488
|
|
|
|
The fix from cefd6140f322 was for light intersection, but light sampling also
needs it.
Differential Revision: https://developer.blender.org/D15879
|
|
This was fixed in 8159e0a but accidentally reverted as part of 18b703d
|
|
|
|
This uses the same sample classification approach as used for PMJ,
because it turns out to also work equally well with Sobol-Burley.
This also implements a fallback (random classification) that should
work "okay" for other samplers, though there are no other samplers
at the moment.
Differential Revision: https://developer.blender.org/D15845
|
|
Contributed by Alaska.
Differential Revision: https://developer.blender.org/D15849
|