Only dispatch the gravity thread if there is work to be done

The definition of when there is work to be done is more or less "when the input to the gravity process has changed"; this is about to be extended to cover some other situations by the next commit.
This commit is contained in:
Tamás Bálint Misius
2024-12-09 16:35:48 +01:00
parent 6b5bbb177d
commit fb7ae9fc63

View File

@@ -232,9 +232,8 @@ void Gravity::Exchange(GravityOutput &gravOut, GravityInput &gravIn)
{ {
fftGravity->copyGravOut = true; fftGravity->copyGravOut = true;
std::swap(gravIn, fftGravity->gravIn); std::swap(gravIn, fftGravity->gravIn);
fftGravity->Dispatch();
} }
fftGravity->Dispatch();
} }
GravityPtr Gravity::Create() GravityPtr Gravity::Create()