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
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

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