View Issue Details

IDProjectCategoryView StatusLast Update
0005591The Dark ModCodingpublic29.08.2021 04:03
Reporterstgatilov Assigned Tocabalistic  
PrioritynormalSeveritynormalReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionTDM 2.09 
Target VersionTDM 2.10Fixed in VersionTDM 2.10 
Summary0005591: Reduce map load time
DescriptionCreating this issue retroactively to track recent optimizations in map loading.
Additional InformationOriginal discussion in dev forums:
  https://forums.thedarkmod.com/index.php?/topic/20869-reducing-load-times/
TagsNo tags attached.

Relationships

related to 0004836 resolvedcabalistic Early texture loading 

Activities

stgatilov

stgatilov

16.04.2021 14:08

administrator   ~0013862

List of SVN commits:
  r9232 Improve image load times by parallelizing the load from disk and using glTexStorage in place of glTexImage
  r9233 Prefetch the entire LWO model file to avoid seeks in a ZIP file
  r9234 Actually support overriding parallelism in job queue submission
  r9235 Remove unneeded functionality from idFile_Memory
  r9236 Check for GL_ARB_texture_storage
  r9237 Use a separate utility job list for parallel image loading instead of reusing the one for frontend jobs. Also gets rid of warning about jobs taking too long
  r9238 Add cvar to potentially disable use of glTexStorage

The actual improvements include:
1) Use glTexStorage instead of glTexImage --- if GL_ARB_texture_storage is supported and cvar image_useTexStorage is 1.
2) Load data for next 16 images in two background threads, while uploading the current 16 images to GPU simultaneously --- if cvar image_levelLoadParallel is 1.
3) When loading LWO model, unzip the whole file into memory buffer, and do LWO parsing from it.
stgatilov

stgatilov

16.04.2021 14:10

administrator   ~0013863

There are some concerns about how HDD handle parallel loading.
For that reason the number of background threads for loading images is only 2, even if player has six-core CPU.
Watch out for how HDDs handle this =)
stgatilov

stgatilov

29.08.2021 04:03

administrator   ~0014321

It turned out that AMD drivers crash on TexSubImage of compressed texture if its size is not divisible by 4.
So here is one small fix:
  r9579. Do not use TexStorage + TexSubImage for compressed textures of weird sizes.

See also:
  https://forums.thedarkmod.com/index.php?/topic/21073-a-house-of-locked-secrets-crashes-tdm-on-startup/

Issue History

Date Modified Username Field Change
16.04.2021 13:57 stgatilov New Issue
16.04.2021 13:57 stgatilov Status new => assigned
16.04.2021 13:57 stgatilov Assigned To => cabalistic
16.04.2021 14:08 stgatilov Note Added: 0013862
16.04.2021 14:10 stgatilov Note Added: 0013863
16.04.2021 14:10 stgatilov Status assigned => resolved
16.04.2021 14:10 stgatilov Resolution open => fixed
16.04.2021 14:10 stgatilov Fixed in Version => TDM 2.10
16.04.2021 15:24 nbohr1more Relationship added related to 0004836
29.08.2021 04:03 stgatilov Note Added: 0014321