Add Chromium-only Blender WebEngine parity work
This commit is contained in:
73
blender-5.2.0/extern/mantaflow/patches/liquid-performance.patch
vendored
Normal file
73
blender-5.2.0/extern/mantaflow/patches/liquid-performance.patch
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
diff --git a/extern/mantaflow/preprocessed/fastmarch.cpp b/extern/mantaflow/preprocessed/fastmarch.cpp
|
||||
index 31e43483b49..9856d84a8b1 100644
|
||||
--- a/extern/mantaflow/preprocessed/fastmarch.cpp
|
||||
+++ b/extern/mantaflow/preprocessed/fastmarch.cpp
|
||||
@@ -306,25 +306,24 @@ struct knExtrapolateMACSimple : public KernelBase {
|
||||
const int d,
|
||||
const int c) const
|
||||
{
|
||||
- static const Vec3i nb[6] = {Vec3i(1, 0, 0),
|
||||
- Vec3i(-1, 0, 0),
|
||||
- Vec3i(0, 1, 0),
|
||||
- Vec3i(0, -1, 0),
|
||||
- Vec3i(0, 0, 1),
|
||||
- Vec3i(0, 0, -1)};
|
||||
- const int dim = (vel.is3D() ? 3 : 2);
|
||||
-
|
||||
if (tmp(i, j, k) != 0)
|
||||
return;
|
||||
+ const Vec3i nb[6] = {Vec3i(i+1, j, k),
|
||||
+ Vec3i(i-1, j, k),
|
||||
+ Vec3i(i, j+1, k),
|
||||
+ Vec3i(i, j-1, k),
|
||||
+ Vec3i(i, j, k+1),
|
||||
+ Vec3i(i, j, k-1)};
|
||||
+ const int dim = (vel.is3D() ? 3 : 2);
|
||||
|
||||
// copy from initialized neighbors
|
||||
Vec3i p(i, j, k);
|
||||
int nbs = 0;
|
||||
Real avgVel = 0.;
|
||||
for (int n = 0; n < 2 * dim; ++n) {
|
||||
- if (tmp(p + nb[n]) == d) {
|
||||
+ if (tmp(nb[n]) == d) {
|
||||
// vel(p)[c] = (c+1.)*0.1;
|
||||
- avgVel += vel(p + nb[n])[c];
|
||||
+ avgVel += vel(nb[n])[c];
|
||||
nbs++;
|
||||
}
|
||||
}
|
||||
@@ -714,24 +713,23 @@ struct knExtrapolateMACFromWeight : public KernelBase {
|
||||
const int d,
|
||||
const int c) const
|
||||
{
|
||||
- static const Vec3i nb[6] = {Vec3i(1, 0, 0),
|
||||
- Vec3i(-1, 0, 0),
|
||||
- Vec3i(0, 1, 0),
|
||||
- Vec3i(0, -1, 0),
|
||||
- Vec3i(0, 0, 1),
|
||||
- Vec3i(0, 0, -1)};
|
||||
- const int dim = (vel.is3D() ? 3 : 2);
|
||||
-
|
||||
if (weight(i, j, k)[c] != 0)
|
||||
return;
|
||||
+ const Vec3i nb[6] = {Vec3i(i+1, j, k),
|
||||
+ Vec3i(i-1, j, k),
|
||||
+ Vec3i(i, j+1, k),
|
||||
+ Vec3i(i, j-1, k),
|
||||
+ Vec3i(i, j, k+1),
|
||||
+ Vec3i(i, j, k-1)};
|
||||
+ const int dim = (vel.is3D() ? 3 : 2);
|
||||
|
||||
// copy from initialized neighbors
|
||||
Vec3i p(i, j, k);
|
||||
int nbs = 0;
|
||||
Real avgVel = 0.;
|
||||
for (int n = 0; n < 2 * dim; ++n) {
|
||||
- if (weight(p + nb[n])[c] == d) {
|
||||
- avgVel += vel(p + nb[n])[c];
|
||||
+ if (weight(nb[n])[c] == d) {
|
||||
+ avgVel += vel(nb[n])[c];
|
||||
nbs++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user