GL Texture Precaching with Demo Piayback

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
User avatar
RoadRunner
Posts: 5
Joined: Tue Apr 14, 2020 10:59 am
Graphics Processor: nVidia with Vulkan support

GL Texture Precaching with Demo Piayback

Post by RoadRunner »

Not sure if this is a bug or not, but the precaching option for textures doesn't seem to work when playing back a demo. I've been compiling a HD overhaul mod from multiple high quality texture sources and it has got quite large now as I'm using normal and specular maps on top of an almost full set of 2K textures. I switched on texture precaching in the options so that the game isn't loading stuff in during play and everything runs smooth as silk when I'm playing the game. The level takes a while to load at the start, but this is obviously expected when precaching is switched on. When loading a demo however, the game loads the level and starts playing it instantly with no precaching appearing to happen, causing drop outs and short freezes all over the place as the game tries to load in assets during playback.

If I warp to the map the demo is recorded on in player mode first so it caches in the assets then play the demo from there, all is fine and smooth with no issues as the assets are still in RAM. I don't even have to have that specific map pre-loaded, just have played other maps with the same assets in so that they're already cached when I start the demo, and the issue doesn't occur.

Is it by design that the precaching feature only seems to work for an interactive player session and not demo playback? If so, would it be possible to have this feature enabled for demo playback as well as normal play?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GL Texture Precaching with Demo Piayback

Post by Graf Zahl »

Yes, it is deliberately disabled - but this is very,very old code, coming from 1998 and I have no idea why it was a problem back then or whether the issue is still relevant. My suspicion is that the game timer isn't halted and delays in here can cause playback issues.
User avatar
RoadRunner
Posts: 5
Joined: Tue Apr 14, 2020 10:59 am
Graphics Processor: nVidia with Vulkan support

Re: GL Texture Precaching with Demo Piayback

Post by RoadRunner »

When you say that the game timer isn't halted, I presume you mean between levels so it would cause a significant delay only in multi-level demos when it takes forever to cache the assets between levels? The way it is now, the demo loads very quickly, but there are significant delays during playback within a map even in single level demos (opening doors, going into a room with assets that haven't been loaded yet, etc.,) but they don't seem to cause any sort of desync or timing issues with demo playback.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GL Texture Precaching with Demo Piayback

Post by Graf Zahl »

I can only guess, the code is from one of the earliest ZDoom revisions - long before I became involved. I simply do not know what the reason was.
User avatar
RoadRunner
Posts: 5
Joined: Tue Apr 14, 2020 10:59 am
Graphics Processor: nVidia with Vulkan support

Re: GL Texture Precaching with Demo Piayback

Post by RoadRunner »

Is turning precaching back on for demos something that would be simple to test and would you be open to it?
Post Reply

Return to “Bugs [GZDoom]”