Many newer overlays use IRenderTextures that are sized to the rendered viewport. This was completely broken, because a single viewport can be rendered on multiple viewports in a single frame.
The end result of this was that in the better case, constant render targets were allocated and freed, which is extremely inefficient. In the worse case, many of these overlays completely failed to Dispose() their render targets, leading to *extremely* swift VRAM OOMs.
This fixes all the overlays to properly cache resources per viewport. This uses new engine functionality, so it requires engine master.
This is still a pretty lousy way to do GPU resource management but, well, anything better needs a render graph, so...
* Fix usages of TryIndex()
Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)
This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)
This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.
Fixes#39115
Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.
* fix tests
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Convert all shader prototype string literals to protoids in overlays
* Convert more shader prototype literal strings to protoids
* Convert ValidatePrototypeId to ProtoId
* Later
* Gateway generation
* Gateway stuff
* gatewehs
* mercenaries
* play area
* Range fixes and tweaks
* weh
* Gateway UI polish
* Lots of fixes
* Knock some items off
* Fix dungeon spawning
Realistically we should probably be using a salvage job.
* wahwah
* wehvs
* expression
* weh
* eee
* a
* a
* WEH
* frfr
* Gatwey
* Fix gateway windows
* Fix gateway windows
* a
* a
* Better layer masking
* a
* a
* Noise fixes
* a
* Fix fractal calculations
* a
* More fixes
* Fixes
* Add layers back in
* Fixes
* namespaces and ftl
* Other TODO
* Fix distance
* Cleanup
* Fix test