View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005476||The Dark Mod||Graphics||public||30.12.2020 17:44||06.01.2021 18:54|
|Product Version||TDM 2.09|
|Target Version||TDM 2.10|
|Summary||0005476: Bindless Textures causes freezes and stutter when changing Anisotropic Filtering in a loaded Mission|
|Description||Many of Doom 3's original graphic settings required restarts to work properly but "AF" could always be changed "on the fly".|
The new Bindless textures feature seems to cause temporary disruption of this and leads to small freezes and stutter if changed without restarting.
|Steps To Reproduce||1) Install mission "Cleaning up the Neighborhood" (will probably be the same for any "heavy mission")|
2) Start the mission and navigate to the street from the sewers
3) Exit to the menu and change the AF settings from 4x to 8x
4) Return to the mission
5) Note that the menu is frozen momentarily while returning to the mission
6) Note that the game occasionally stutters or freezes when moving around
Most of the stuttering and freezing ceases once you move around the map for awhile.
|Tags||No tags attached.|
So the stutters are indeed due to the fact that we need to recreate a bindless texture, because bindless textures are immutable and their parameters (like AF) can't be changed anymore. So what the code does is to unload / purge any image that's immutable when you change AF, and then the game will gradually reload them as it needs them, which causes the slow-downs and stutters.
I'm not sure there is a whole lot to be done here. I could change the behaviour so that it immediately recreates the affected textures, but that would mean that the game would freeze in the menu when you change the AF setting until the images are recreated. I don't know if that's better, because it could give the impression of a frozen game.
A "proper" fix would be to split texture handles into images and samplers. Then you'd only need to recreate the sampler part and not the image part (which is the expensive operation). However, that'd require more significant changes to our image handling, so I don't think this would be appropriate for inclusion in 2.09.
I am trying to wrap my head around what the best user experience could be prior to the "proper" fix.
I am tempted to consider a Rube Goldberg approach of disabling bindless textures if the player enters the graphics menu
while the mission is active.
Moving to 2.10
|That doesn't work - you can't just "disable" bindless textures, it would also mean you have to recreate the textures, so that would cause the exact same issue.|
This is probably pretty dependent on drivers and environment but in my experience the following sequence is an "improvement"
1) Start a mission
2) Exit to the Menu
3) Open the console and set r_useBindlessTextures to 0
4) Change AF to a higher or lower value
5) Resume the mission
When doing this, there is a small freeze when resuming (same as with bindless textures) but after the mission resumes
it goes from sluggish to normal speed with no cycle of freezes at every portal. It recovers much more quickly.
Again, setting r_useBindlessTextures to 0 changes absolutely nothing about the situation. Textures become immutable after a bindless handle has been requested for them. At that point, the texture parameters can no longer be altered until the texture is recreated, and setting r_useBindlessTextures back to 0 does not help, at all. The textures are still getting purged when you change the AF setting.
You did not specifically state that you turned bindless back on after changing AF. If you leave it off, perhaps your driver handles gradual uploading of non-bindless textures better, although that seems bogus. If you do turn it back on, this approach should not make any difference, and you are either experiencing a hallucination, or some weird driver shenanigans ;)
Yes, the former. Once I disabled bindless textures I left it off. The presumption being that a player who alters AF in-game will go back
and forth adjusting until they hit their preferred configuration. So (in concept) bindless textures would only resume once the player starts
a new mission or restarts TDM. If my experience is an outlier, then it is all for naught of course.
|30.12.2020 17:44||nbohr1more||New Issue|
|30.12.2020 17:44||nbohr1more||Status||new => assigned|
|30.12.2020 17:44||nbohr1more||Assigned To||=> cabalistic|
|30.12.2020 17:46||nbohr1more||Relationship added||child of 0005238|
|05.01.2021 21:41||cabalistic||Note Added: 0013384|
|06.01.2021 01:44||nbohr1more||Note Added: 0013389|
|06.01.2021 01:44||nbohr1more||Target Version||=> TDM 2.10|
|06.01.2021 09:45||cabalistic||Note Added: 0013394|
|06.01.2021 14:43||nbohr1more||Note Added: 0013409|
|06.01.2021 15:31||cabalistic||Note Added: 0013410|
|06.01.2021 18:54||nbohr1more||Note Added: 0013413|