Page MenuHomeWildfire Games

Don't reallocate memory each frame in the actor viewer
ClosedPublic

Authored by echotangoecho on Jan 24 2017, 6:23 PM.

Details

Summary

Fixes the "memory leak" caused by reloading shaders too often -- where new vertex data is created everytime the shaders are reloaded, which under normal circumstances isn't problematic. However, in the actor viewer the shaders where reloaded every frame, which caused a pileup over vertex data.

Test Plan

Test that changing graphics options in-game and the actor viewer in Atlas work as expected.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

echotangoecho created this revision.Jan 24 2017, 6:23 PM
Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Jan 24 2017, 6:23 PM

Update year.

Vulcan added a subscriber: Vulcan.Jan 24 2017, 7:07 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running debug tests...
Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/241/ for more details.

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running debug tests...
Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/242/ for more details.

wraitii accepted this revision.Jan 27 2017, 1:30 PM

Seems to work OK.

This revision is now accepted and ready to land.Jan 27 2017, 1:30 PM
In D93#3415, @wraitii wrote:

Seems to work OK.

Are you actually going to commit this someday?

This revision was automatically updated to reflect the committed changes.

Mh, thanks for reminding me, at the moment of writing that comment I kind of forgot that echotangoecho does not have commit access.

In D93#9928, @wraitii wrote:

Mh, thanks for reminding me, at the moment of writing that comment I kind of forgot that echotangoecho does not have commit access.

Would have been nice to close the related ticket too.

elexis retitled this revision from Fix memory leak in actor viewer to Don't reallocate memory each frame in the actor viewer.Apr 14 2017, 3:13 PM