For future updates, this allows for customizing the main menu to its full extend without modifying larger ui rpak files as we separate all title screen assets and put it into this new pak.
Users have reported that AMD Anti-Lag 2 didn't work. The issue turned out to be the incorrect vendor constant. After this patch the Anti-Lag 2 implementation appears to work perfectly.
This constant is used to check if installed (and currently selected) hardware is of target vendor before making any driver API calls.
The compute shader already takes care of this. This code updates the STBSP histogram which won't be used if the cvar 'gpu_driven_tex_stream' is set.
Added a check for if 'gpu_driven_tex_stream' is set, and if so, we don't run this code to save on CPU load.
Should be unsigned int 16, not 32. Member gets accessed with uint16 instructions. Structure is now alligned correctly with the engine, and its size also matches now.
Only update the stream camera if we aren't GPU driven to save on load in the render thread.
The camera is used to get the correct column from the STBSP file. Though, if we use the GPU feedback driven texture streaming system, it doesn't make sense to burn CPU here since the GPU system doesn't use the camera at all.
This code credits textures based on the STBSP column we are in. However, the GPU driven texture streaming system has its own logic for this. Don't run the STBSP world texture crediting code if the GPU driven system is enabled to save on runtime overhead and possible interference.
Remove structure packing (not needed), and properly lay it out. The material glue class is a wrapper around the actual material struct, which is what has been seperated out in this path.
The material struct also contains more newly reversed members.
Reversed the last used frame (last time the texture was accumulated), and the last time the texture was credited. Also reversed the actual histogram bin fields; in Apex Legends there is a new one for the GPU driven texture streaming system.
Later versions of the game store their cube maps in the RPak as DDS textures now, the engine needs a modification to its texture creation code to support these.
The extra runtime overhead this creates is negligible as all patterns will be searched once, and have their results being cached off. Due to a planned future change, we can't extern it anymore.
If we do not have resident pages, then we can still rely on the GPU driven texture streaming system. However, this code forces the mode to TSM_OPMODE_LEGACY_PICMIP. This is a bug because it contradicts the ability to switch between the dynamic and static systems. Patched the jump from a conditional one to an unconditional one to always skip over this broken code.
This also ultimately drops the need for having a dummy STBSP file, and the benefit of not having a dummy STBSP file is that 'hasResidentPages' will be false, which disables the STBSP world texture crediting code, reducing frame times.
The engine has a bug where it would use GPU feedback even when a static precomputed texture streaming database file exists. If we have an STBSP file for the given level or override, load that in and disable GPU feedback so proper use of the static file could be made. Else we load gpu_driven.stbsp which is a dummy to enable the dynamic, GPU based texture streaming system.
This is a dummy file which enables the GPU driven texture streaming system, which loads/drops textures based on GPU feedback rather than a static texture streaming database file.
Class has been reworked to always take the reverve seek amount into account when adding to output size. Previously, we still incremented the output size even when we seeked back and modified data rather than appending to the end.
The manual write size calculation was a design choice as seeking and calling tellp is slow.
The enum has also been slightly reworked by removing the BINARY enumerant, and adding a new mode which allows you to open a stream in read/write mode.
Use static and const where possible, and rename 'segments' to 'slabs' as this represents a huge buffer in which pages are allocated to, and slab fits this name better.