secondlife / viewer

🖥️ Second Life's official client
GNU Lesser General Public License v2.1
199 stars 46 forks source link

Don't redundantly call updateGeometry on all objects every frame #1831

Open RunitaiLinden opened 1 week ago

RunitaiLinden commented 1 week ago

Test plan:

  1. Go to an area dense with Geometry.
  2. Verify the viewer it test has higher FPS than the 7.1.8.9375512768 - Materials Featurettes viewer (https://releasenotes.secondlife.com/viewer/7.1.8.9375512768.html) while using the same Graphics settings.

Getting lots of reports of FPS degrading since the FS PBR release. Profile pointed at LLVOVolume::updateGeometry getting called thousands of times per frame. Culprit was updateGeometry returning false, indicating pipeline should try again next frame.

There are likely other bugs hiding behind this one, but DO NOT make updateGeometry return false on success to fix them.

igorlproductengine commented 5 days ago

Passed QA. Verified on the Second Life Release 7.1.9.9620320242 (64bit) on Win10/OSX in scope https://github.com/secondlife/iqa/issues/266.