Commit Graph

111742 Commits

Author SHA1 Message Date
Campbell Barton cea588b9ef Cleanup: spelling in comments, C++ style comments for disabled code
Also ensure space at end of comment.
2022-01-14 11:23:46 +11:00
Campbell Barton 7a0cf2c72f Fix crash caused by exception in Python gizmo target get handler 2022-01-14 10:18:52 +11:00
Hans Goudey 1bd0a87384 Cleanup: Clang tidy
- modernize-deprecated-headers
- modernize-use-using
- modernize-use-nullptr
- modernize-use-bool-literals
2022-01-13 17:11:38 -06:00
Campbell Barton 8b3d798374 CMake: add WITH_LINKER_MOLD option for GCC/Clang Unix platforms
Can give considerably faster linking, especially on system with many
cores.

The mold linker recently reached 1.0, see:
https://github.com/rui314/mold

The current stable release of GCC can't use this linker via
-fuse-ld=mold, so this patch uses the "-B" argument to add a binary
directory containing an alternate "ld" command that points to
"mold" (which is part of the default mold installation).

Some timing tests for linking full builds for AMD TR 3970X:

- BFD: 20.78 seconds.
- LLD: 12.16 seconds.
- GOLD: 7.21 seconds.
- MOLD: 2.53 seconds.

Ref D13807

Reviewed by: sergey, brecht
2022-01-14 09:44:58 +11:00
Hans Goudey 0c5ccae79d Fix: Incorrect logic in mesh validation for removing layers
The mask is only used if it's not zero. Adding the normal mask made
it not zero, but it didn't include anything else, so all custom data
layers except normals were removed. The fix is to only add normals
to the mask when it should be used.
2022-01-13 16:36:50 -06:00
Hans Goudey cfa53e0fbe Refactor: Move normals out of MVert, lazy calculation
As described in T91186, this commit moves mesh vertex normals into a
contiguous array of float vectors in a custom data layer, how face
normals are currently stored.

The main interface is documented in `BKE_mesh.h`. Vertex and face
normals are now calculated on-demand and cached, retrieved with an
"ensure" function. Since the logical state of a mesh is now "has
normals when necessary", they can be retrieved from a `const` mesh.

The goal is to use on-demand calculation for all derived data, but
leave room for eager calculation for performance purposes (modifier
evaluation is threaded, but viewport data generation is not).

**Benefits**
This moves us closer to a SoA approach rather than the current AoS
paradigm. Accessing a contiguous `float3` is much more efficient than
retrieving data from a larger struct. The memory requirements for
accessing only normals or vertex locations are smaller, and at the
cost of more memory usage for just normals, they now don't have to
be converted between float and short, which also simplifies code

In the future, the remaining items can be removed from `MVert`,
leaving only `float3`, which has similar benefits (see T93602).

Removing the combination of derived and original data makes it
conceptually simpler to only calculate normals when necessary.
This is especially important now that we have more opportunities
for temporary meshes in geometry nodes.

**Performance**
In addition to the theoretical future performance improvements by
making `MVert == float3`, I've done some basic performance testing
on this patch directly. The data is fairly rough, but it gives an idea
about where things stand generally.
 - Mesh line primitive 4m Verts: 1.16x faster (36 -> 31 ms),
   showing that accessing just `MVert` is now more efficient.
 - Spring Splash Screen: 1.03-1.06 -> 1.06-1.11 FPS, a very slight
   change that at least shows there is no regression.
 - Sprite Fright Snail Smoosh: 3.30-3.40 -> 3.42-3.50 FPS, a small
   but observable speedup.
 - Set Position Node with Scaled Normal: 1.36x faster (53 -> 39 ms),
   shows that using normals in geometry nodes is faster.
 - Normal Calculation 1.6m Vert Cube: 1.19x faster (25 -> 21 ms),
   shows that calculating normals is slightly faster now.
 - File Size of 1.6m Vert Cube: 1.03x smaller (214.7 -> 208.4 MB),
   Normals are not saved in files, which can help with large meshes.

As for memory usage, it may be slightly more in some cases, but
I didn't observe any difference in the production files I tested.

**Tests**
Some modifiers and cycles test results need to be updated with this
commit, for two reasons:
 - The subdivision surface modifier is not responsible for calculating
   normals anymore. In master, the modifier creates different normals
   than the result of the `Mesh` normal calculation, so this is a bug
   fix.
 - There are small differences in the results of some modifiers that
   use normals because they are not converted to and from `short`
   anymore.

**Future improvements**
 - Remove `ModifierTypeInfo::dependsOnNormals`. Code in each modifier
   already retrieves normals if they are needed anyway.
 - Copy normals as part of a better CoW system for attributes.
 - Make more areas use lazy instead of eager normal calculation.
 - Remove `BKE_mesh_normals_tag_dirty` in more places since that is
   now the default state of a new mesh.
 - Possibly apply a similar change to derived face corner normals.

Differential Revision: https://developer.blender.org/D12770
2022-01-13 14:38:25 -06:00
Julian Eisel 800fc17367 Fix/workaround MSVC compile error with messag-bus
Some of the message-bus macros are not safe to use in C++. This has come
up before, but no good solution was found. Now @LazyDodo, @HooglyBoogly
and I concluded this is the best duct tape "solution" for the moment.
The message-bus API should address this.
2022-01-13 20:40:52 +01:00
Julian Eisel 1c4a1c13e0 Cleanup: Run `make format` 2022-01-13 19:56:11 +01:00
Ray Molenkamp 5ecaa9a838 Fix compilation error caused by missing target relation
compositor depends on DNA now so that it can access offsets.
2022-01-13 11:34:41 -07:00
Erik 3537abe84b Geometry Nodes: Rename String to Curves socket
Today many users seem to think the output from
this node is a single curve with multiple splines.
This patch renames the geometry output socket
from "Curves" to "Curve Instances" to avoid confusion.

Differential Revision: https://developer.blender.org/D13693
2022-01-13 19:17:03 +01:00
Ray Molenkamp 743b9c5e1d CMake: fix build issue with gcc+clang-tidy
Precompiled headers are in a compiler specific format,
when using clang-tidy it tries to read the GCC PCH file
and fails at that.

Disable PCH's for now when WITH_CLANG_TIDY is enabled since
a clean work-around doesn't seem readily available.

relevant LLVM/CMake bugs:

https://bugs.llvm.org/show_bug.cgi?id=41579
https://gitlab.kitware.com/cmake/cmake/-/issues/22081

Differential Revision: https://developer.blender.org/D13814

Reviewed by: sergey, Blendify
2022-01-13 09:47:14 -07:00
Sergey Sharybin b8157f5bf1 Fix compilation error caused by missing target relation
Space clip depends on DNA now so that it can access offsets.
2022-01-13 17:25:57 +01:00
Julian Eisel 22dc865a86 Cleanup: Use `nullptr` in new Outliner C++ files 2022-01-13 17:01:47 +01:00
Julian Eisel 039cc32917 Outliner: Compile all Outliner files in C++
We want to refactor quite some of the Outliner code using C++, this is a
logical step to help the transition to a new architecture.

Includes plenty of fixes to make this compile without warnings, trying
not to change logic. The usual stuff (casts from `void *`, designated
initializers, compound literals, etc.).
2022-01-13 17:01:47 +01:00
Julian Eisel 1a4f8ab389 Cleanup: Make message-bus utility macros callable from C++
C++ doesn't support compound literals like used here (GCC does via an
extension).
2022-01-13 17:01:47 +01:00
Sergey Sharybin f173973ae4 Fix T94874: Drivers using bone custom properties don't work on modifiers 2022-01-13 15:17:32 +01:00
Jacques Lucke 79e985ea54 Cleanup: fix building all geometry nodes in one translation unit
There were a couple of function name collisions which were caused
by sharing code with the mask modifier. I just removed the dependence
on the mask modifier now. The code that I duplicated for that purpose
is only in a legacy node, so it can be expected to be removed soonish.
2022-01-13 12:39:48 +01:00
Brecht Van Lommel 19a6220308 Fix link errors after recent FFMPEG / link_directories changes 2022-01-13 11:12:56 +01:00
Brecht Van Lommel d53738396f Tests: skip some compositor tests when WITH_LIBMV=OFF 2022-01-13 10:41:34 +01:00
Brecht Van Lommel 7bb572f208 Fix T94737: Cycles wrong normal map normal with OSL
Ensure valid reflection was moved elsewhere, should not be done in the node
anymore.
2022-01-13 10:40:41 +01:00
Brecht Van Lommel 0cf2fafd81 Fix T94050, T94570, T94527: Cycles Bevel and AO nodes not working with Metal
Workaround what may be a compiler bug, solution found by Michael Jones.
2022-01-13 10:40:41 +01:00
Brecht Van Lommel a3deef6fff Fix Cycles CPU + GPU render not using CPU after recent changes
In some places the task scheduler was not initialized in time.
2022-01-13 10:40:41 +01:00
Brecht Van Lommel eaa4cdaa42 Fix T94758: wrong denoising albedo with BSSRDF retro reflection 2022-01-13 10:40:40 +01:00
Brecht Van Lommel 29450a2af3 Build: remove usage of link_directories
We are now always using absolute paths for libraries, as recommended by the
CMake docs.

Followup to D9177.
2022-01-13 10:40:38 +01:00
Brecht Van Lommel 75a1a578bd CMake: use FFmpeg find module on Linux
And change install_deps.sh to build shared (instead of static) FFMPEG
libraries, for consistency with other library dependencies and to simplify
the logic. This may require users of install_deps.sh to rebuild FFMPEG.

This is the last step that lets us get rid of LIBPATH variables and
link_directories() entirely, as recommended by the CMake docs.

Some fixes were needed in the find FFMPEG module to make it actually work,
this code was unused up to now.

Followup to D8855.

Differential Revision: https://developer.blender.org/D9177
2022-01-13 10:27:11 +01:00
Campbell Barton f1a488d0f2 Fix T92953: Tool Settings: Drag on Tweak fails with LMB select 2022-01-13 14:30:12 +11:00
Campbell Barton a7c9fb59ca Cleanup: follow code-style for float suffix 2022-01-13 12:34:28 +11:00
Campbell Barton 227f0f3582 Cleanup: quiet missing braces warning 2022-01-13 12:33:34 +11:00
Hans Goudey 97c2c39916 Fix T94624: Object as font instances don't work
The fundamental limitation is that we can only have one instance
("dupli") generator at a time. Because the mesh output of a curve
object is output as an instances, the geometry set instances existed,
replacing the object as font instances. The "fix" is to reverse the
order. The behavior won't be perfect still, but at least the old
behavior will be preserved, which is really what matters for a
feature like this.

One way to take this change further would be completely disabling
regular geometry evaluation while this option is active. However,
it doesn't seem like that would actually improve the state of the code.

Differential Revision: https://developer.blender.org/D13768
2022-01-12 13:46:13 -06:00
Harley Acheson a311fa96aa Fix T85706: wm_window_make_drawable update DPI
When drawing windows on monitors that differ in DPI, we can sometimes
have UI elements draw at an incorrect scale. This patch just ensures
that `wm_window_make_drawable` always updates DPI.

See D10483 for more details.

Differential Revision: https://developer.blender.org/D10483

Reviewed by Brecht Van Lommel
2022-01-12 10:37:52 -08:00
Brecht Van Lommel e594f23a27 Revert "CMake: use FFmpeg find module on Linux"
This reverts commit 62a0de1673. Linux buildbot
is giving link errors.
2022-01-12 19:07:40 +01:00
Harley Acheson fa8c2c7885 Fix T94071: Area Split Improvements
Allow area Split to be initiated in any area and give better feedback
when not allowed.

See D13599 for more details and usage examples.

Differential Revision: https://developer.blender.org/D13599

Reviewed by Campbell Barton
2022-01-12 09:45:19 -08:00
Julian Eisel a0dcd0bf2c Fix warnings after bab47b60cb
It's not really clear how this part of the defaults code should be used,
I think this is fine now and solves the warnings.
2022-01-12 18:37:53 +01:00
Julian Eisel a72a9e099c Cleanup: Correct indentation 2022-01-12 18:37:53 +01:00
Brecht Van Lommel 62a0de1673 CMake: use FFmpeg find module on Linux
And change install_deps.sh to build shared (instead of static) FFMPEG
libraries, for consistency with other library dependencies and to simplify
the logic. This may require users of install_deps.sh to rebuild FFMPEG.

This is the last step that lets us get rid of LIBPATH variables and
link_directories() entirely, as recommended by the CMake docs.

Some fixes were needed in the find FFMPEG module to make it actually work,
this code was unused up to now.

Followup to D8855.

Differential Revision: https://developer.blender.org/D9177
2022-01-12 18:25:24 +01:00
Simon Lenz bab47b60cb DNA: Add space clip editor defaults
This is my attempt of adding defaults for the space clip editor struct
(in line with https://developer.blender.org/T80164).

It adds the default allocation for `SpaceClip` and
`node_composite_movieclip.cc`. This also solves the error below (for
C++ files using the DNA_default_alloc), which was put forward by
Sergey Sharybin.

Differential Revision: https://developer.blender.org/D13367

Reviewed by: Julian Eisel
2022-01-12 18:04:48 +01:00
Bastien Montagne a909ab984c Outliner: Add way to display warning icon for items.
While theorically fairly generic, current code is only enabled for
bledfile and liboverride views, and only used to display messages from
library IDs.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D13766
2022-01-12 18:01:50 +01:00
Clément Foucault 5f7ad4baaa BLI_math: Fix building when WITH_GMP is off 2022-01-12 17:24:57 +01:00
Nikhil Shringarpurey e5858a3ad0 Icons: Remove absolute pathnames and deprecated gradients from SVG files
SVG files contained specific detailed pathnames on developers'
computers. These included full local user profile and path and should
not be in the release.

This patches corrects those lines. It also removes unused gradients from
the private icons SVG.

Differential Revision: https://developer.blender.org/D13344

Reviewed by: Yevgeny Makarov, Julian Eisel
2022-01-12 15:03:05 +01:00
Clément Foucault ec5560db73 DRW: Add DRW_gpu_wrapper.hh
This adds wrapper classes that make it easier to use GPU objects in C++.

####Motivations:####

 - Easier handling of GPU objects.
 - EEVEE rewrite already makes use of similar wrappers.
 - There is the ongoing effort to use more C++ in the codebase
 and lans to port more engines to it.
 - The shader code refactor will make use of many UBOs with shared
 struct declaration. This helps managing them.
 - Safer handling of `TextureFromPool` which can't be bound as normal
 texture (only texture ref) and can be better tracked in the future.

####Considerations:####

 - I chose the `blender::draw` namespace because `blender::gpu` already has private classes (i.e: `gpu::Texture`).
 - Theses are wrappers that manage a GPU object internally. They might be confused with actual `Texture`. However, the name `TextureWrapper` is a bit too much verbose in my opinion. I'm open to suggestion about better name.

Reviewed By: jbakker

Differential Revision: http://developer.blender.org/D13805
2022-01-12 13:05:18 +01:00
Jeroen Bakker 0882069095 Cleanup: codestyle obj_exporter_tests.cc. 2022-01-12 13:02:28 +01:00
Jeroen Bakker 1552b86b55 Cleanup: Not needed if statement around delete. 2022-01-12 13:02:28 +01:00
Clément Foucault d43b5791e0 BLI: Refactor vector types & functions to use templates
This patch implements the vector types (i.e:`float2`) by making heavy
usage of templating. All vector functions are now outside of the vector
classes (inside the `blender::math` namespace) and are not vector size
dependent for the most part.

In the ongoing effort to make shaders less GL centric, we are aiming
to share more code between GLSL and C++ to avoid code duplication.

####Motivations:
- We are aiming to share UBO and SSBO structures between GLSL and C++.
This means we will use many of the existing vector types and others
we currently don't have (uintX, intX). All these variations were
asking for many more code duplication.
- Deduplicate existing code which is duplicated for each vector size.
- We also want to share small functions. Which means that vector
functions should be static and not in the class namespace.
- Reduce friction to use these types in new projects due to their
incompleteness.
- The current state of the `BLI_(float|double|mpq)(2|3|4).hh` is a
bit of a let down. Most clases are incomplete, out of sync with each
others with different codestyles, and some functions that should be
static are not (i.e: `float3::reflect()`).

####Upsides:
- Still support `.x, .y, .z, .w` for readability.
- Compact, readable and easilly extendable.
- All of the vector functions are available for all the vectors types
and can be restricted to certain types. Also template specialization
let us define exception for special class (like mpq).
- With optimization ON, the compiler unroll the loops and performance
is the same.

####Downsides:
- Might impact debugability. Though I would arge that the bugs are
rarelly caused by the vector class itself (since the operations are
quite trivial) but by the type conversions.
- Might impact compile time. I did not saw a significant impact since
the usage is not really widespread.
- Functions needs to be rewritten to support arbitrary vector length.
For instance, one can't call `len_squared_v3v3` in
`math::length_squared()` and call it a day.
- Type cast does not work with the template version of the `math::`
vector functions. Meaning you need to manually cast `float *` and
`(float *)[3]` to `float3` for the function calls.
i.e: `math::distance_squared(float3(nearest.co), positions[i]);`
- Some parts might loose in readability:
`float3::dot(v1.normalized(), v2.normalized())`
becoming
`math::dot(math::normalize(v1), math::normalize(v2))`
But I propose, when appropriate, to use
`using namespace blender::math;` on function local or file scope to
increase readability.
`dot(normalize(v1), normalize(v2))`

####Consideration:
- Include back `.length()` method. It is quite handy and is more C++
oriented.
- I considered the GLM library as a candidate for replacement. It felt
like too much for what we need and would be difficult to extend / modify
to our needs.
- I used Macros to reduce code in operators declaration and potential
copy paste bugs. This could reduce debugability and could be reverted.
- This touches `delaunay_2d.cc` and the intersection code. I would like
to know @howardt opinion on the matter.
- The `noexcept` on the copy constructor of `mpq(2|3)` is being removed.
But according to @JacquesLucke it is not a real problem for now.

I would like to give a huge thanks to @JacquesLucke who helped during this
and pushed me to reduce the duplication further.

Reviewed By: brecht, sergey, JacquesLucke

Differential Revision: https://developer.blender.org/D13791
2022-01-12 12:57:07 +01:00
Clément Foucault fb6bd88644 Revert "BLI: Refactor vector types & functions to use templates"
Includes unwanted changes

This reverts commit 46e049d0ce.
2022-01-12 12:50:02 +01:00
Clment Foucault 46e049d0ce BLI: Refactor vector types & functions to use templates
This patch implements the vector types (i.e:`float2`) by making heavy
usage of templating. All vector functions are now outside of the vector
classes (inside the `blender::math` namespace) and are not vector size
dependent for the most part.

In the ongoing effort to make shaders less GL centric, we are aiming
to share more code between GLSL and C++ to avoid code duplication.

####Motivations:
 - We are aiming to share UBO and SSBO structures between GLSL and C++.
 This means we will use many of the existing vector types and others
 we currently don't have (uintX, intX). All these variations were
 asking for many more code duplication.
 - Deduplicate existing code which is duplicated for each vector size.
 - We also want to share small functions. Which means that vector
 functions should be static and not in the class namespace.
 - Reduce friction to use these types in new projects due to their
 incompleteness.
 - The current state of the `BLI_(float|double|mpq)(2|3|4).hh` is a
 bit of a let down. Most clases are incomplete, out of sync with each
 others with different codestyles, and some functions that should be
 static are not (i.e: `float3::reflect()`).

####Upsides:
 - Still support `.x, .y, .z, .w` for readability.
 - Compact, readable and easilly extendable.
 - All of the vector functions are available for all the vectors types
 and can be restricted to certain types. Also template specialization
 let us define exception for special class (like mpq).
 - With optimization ON, the compiler unroll the loops and performance
 is the same.

####Downsides:
 - Might impact debugability. Though I would arge that the bugs are
 rarelly caused by the vector class itself (since the operations are
 quite trivial) but by the type conversions.
 - Might impact compile time. I did not saw a significant impact since
 the usage is not really widespread.
 - Functions needs to be rewritten to support arbitrary vector length.
 For instance, one can't call `len_squared_v3v3` in
 `math::length_squared()` and call it a day.
 - Type cast does not work with the template version of the `math::`
 vector functions. Meaning you need to manually cast `float *` and
 `(float *)[3]` to `float3` for the function calls.
 i.e: `math::distance_squared(float3(nearest.co), positions[i]);`
 - Some parts might loose in readability:
 `float3::dot(v1.normalized(), v2.normalized())`
 becoming
 `math::dot(math::normalize(v1), math::normalize(v2))`
 But I propose, when appropriate, to use
 `using namespace blender::math;` on function local or file scope to
 increase readability.
 `dot(normalize(v1), normalize(v2))`

####Consideration:
 - Include back `.length()` method. It is quite handy and is more C++
 oriented.
 - I considered the GLM library as a candidate for replacement. It felt
 like too much for what we need and would be difficult to extend / modify
 to our needs.
 - I used Macros to reduce code in operators declaration and potential
 copy paste bugs. This could reduce debugability and could be reverted.
 - This touches `delaunay_2d.cc` and the intersection code. I would like
 to know @howardt opinion on the matter.
 - The `noexcept` on the copy constructor of `mpq(2|3)` is being removed.
 But according to @JacquesLucke it is not a real problem for now.

I would like to give a huge thanks to @JacquesLucke who helped during this
and pushed me to reduce the duplication further.

Reviewed By: brecht, sergey, JacquesLucke

Differential Revision: https://developer.blender.org/D13791
2022-01-12 12:47:43 +01:00
Clément Foucault e5766752d0 Revert "BLI: Refactor vector types & functions to use templates"
Reverted because the commit removes a lot of commits.

This reverts commit a2c1c368af.
2022-01-12 12:44:26 +01:00
Nathan Rozendaal b2ccd8546c Compositor: Add Scene Time Node, Rename Time node
Fixes issue T94603
It adds a new compositor node called Scene Time which is already present as a geo node, having the same basic nodes available in all node trees is a nice thing to have.
Renames "Time" node to "Time Curve", this is done to avoid confusion between the Time node and the Scene Time node.

Reviewed By: jbakker

Maniphest Tasks: T94603

Differential Revision: https://developer.blender.org/D13762
2022-01-12 12:29:44 +01:00
Clément Foucault a2c1c368af BLI: Refactor vector types & functions to use templates
This patch implements the vector types (i.e:float2) by making heavy
usage of templating. All vector functions are now outside of the vector
classes (inside the blender::math namespace) and are not vector size
dependent for the most part.

In the ongoing effort to make shaders less GL centric, we are aiming
to share more code between GLSL and C++ to avoid code duplication.

Motivations:
- We are aiming to share UBO and SSBO structures between GLSL and C++.
  This means we will use many of the existing vector types and others we
  currently don't have (uintX, intX). All these variations were asking
  for many more code duplication.
- Deduplicate existing code which is duplicated for each vector size.
- We also want to share small functions. Which means that vector functions
  should be static and not in the class namespace.
- Reduce friction to use these types in new projects due to their
  incompleteness.
- The current state of the BLI_(float|double|mpq)(2|3|4).hh is a bit of a
  let down. Most clases are incomplete, out of sync with each others with
  different codestyles, and some functions that should be static are not
  (i.e: float3::reflect()).

Upsides:
- Still support .x, .y, .z, .w for readability.
- Compact, readable and easilly extendable.
- All of the vector functions are available for all the vectors types and
  can be restricted to certain types. Also template specialization let us
  define exception for special class (like mpq).
- With optimization ON, the compiler unroll the loops and performance is
  the same.

Downsides:
- Might impact debugability. Though I would arge that the bugs are rarelly
  caused by the vector class itself (since the operations are quite trivial)
  but by the type conversions.
- Might impact compile time. I did not saw a significant impact since the
  usage is not really widespread.
- Functions needs to be rewritten to support arbitrary vector length. For
  instance, one can't call len_squared_v3v3 in math::length_squared() and
  call it a day.
- Type cast does not work with the template version of the math:: vector
  functions. Meaning you need to manually cast float * and (float *)[3] to
  float3 for the function calls.
  i.e: math::distance_squared(float3(nearest.co), positions[i]);
- Some parts might loose in readability:
  float3::dot(v1.normalized(), v2.normalized())
  becoming
  math::dot(math::normalize(v1), math::normalize(v2))
  But I propose, when appropriate, to use
  using namespace blender::math; on function local or file scope to
  increase readability. dot(normalize(v1), normalize(v2))

Consideration:
- Include back .length() method. It is quite handy and is more C++
  oriented.
- I considered the GLM library as a candidate for replacement.
  It felt like too much for what we need and would be difficult to
  extend / modify to our needs.
- I used Macros to reduce code in operators declaration and potential
  copy paste bugs. This could reduce debugability and could be reverted.
- This touches delaunay_2d.cc and the intersection code. I would like to
  know @Howard Trickey (howardt) opinion on the matter.
- The noexcept on the copy constructor of mpq(2|3) is being removed.
  But according to @Jacques Lucke (JacquesLucke) it is not a real problem
  for now.

I would like to give a huge thanks to @Jacques Lucke (JacquesLucke) who
helped during this and pushed me to reduce the duplication further.

Reviewed By: brecht, sergey, JacquesLucke

Differential Revision: http://developer.blender.org/D13791
2022-01-12 12:19:39 +01:00
Dalai Felinto d320f3677e Cleanup: make format 2022-01-12 11:29:18 +01:00
Jacques Lucke 1e61b759c7 Fix T94797: crash when playing animation in eevee rendered view
The issue was caused by rBd09b1d2759861aa012ab2e7e4ce2ffa2.
Since this commit, the image users in gpu materials were updated
during depsgraph evaluation as well. However, there was a race
condition when one thread is deleting gpu materials in `BKE_material_eval`
while another thread is updating the image users at the same time.

The solution is to make sure that deleting gpu materials is done before
iterating over all gpu materials, by adding a new depsgraph relation.
2022-01-12 11:15:22 +01:00