View Issue Details

IDProjectCategoryView StatusLast Update
0005141The Dark ModCodingpublic27.08.2020 13:36
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.07 
Target VersionTDM 2.09Fixed in VersionTDM 2.09 
Summary0005141: idImage::ActuallyLoadImage should always load CPU-side data
DescriptionRight now if someone attemps to load an image from frontend, the request is simply ignored.
It is expected that when someone would need the texture for drawing, it will get requested again from backend.

However, particle collision feature uses CPU-resident textures to cut off particles.
Such textures are ALWAYS loaded from frontend, never from backend.
Hence, if you don't load such texture during level load, then it will never get loaded no matter how hard you ask for it.

This should be fixed.
The data gets loaded from file immediately, regardless of frontend/backend.
The uploading to GPU should only happen from backend when requested.
Steps To Reproduce0) In idRenderWorldLocal::ParseModel, temporarily comment out preload code.
1) Install test_raincollision FM.
2) Set "com_smp 1".
3) Start new game or execute "map rain".
4) Check that rain stops on obstacles (at least on roof). "Use r_showTris 1" to make it easier.
Tagsparticle

Activities

stgatilov

stgatilov

27.08.2020 13:33

administrator   ~0012762

I made a partial fix in svn rev 8950.
I simply masked the load disabling for CPU-resident images:
    void idImage::ActuallyLoadImage( bool allowBackground ) {
        ...
        if ( session->IsFrontend() && !(residency & IR_CPU) ) {
            common->Printf( "Trying to load image %s from frontend, deferring...\n", imgName.c_str() );
Unfortunately, it is logically wrong for IR_BOTH images, since they can now get loaded to GL from frontend thread.
But I'm not sure we have any such images.
Default image is the only IR_BOTH, and it gets loaded from backend.

To be honest, I did not remember ever seeing this message in game console.
stgatilov

stgatilov

27.08.2020 13:34

administrator   ~0012763

Also committed a bit of refactoring in svn rev 8949.

Before that cubemaps were loaded straight in idImage::ActuallyLoadImage.
Now they are loaded in two steps just like ordinary textures:
  R_LoadImageData: loads from file on disk to cpuData
  R_UploadImageData: loads from cpuData to GL and purges cpuData (customizable via residency flag)
stgatilov

stgatilov

27.08.2020 13:36

administrator   ~0012764

While I did not do what the title of the issue says, by original problem with cutoffTimeMap and collisionStatic maps is fully fixed.
So I'll mark this issue as resolved.

Issue History

Date Modified Username Field Change
03.02.2020 17:16 stgatilov New Issue
03.02.2020 17:16 stgatilov Tag Attached: particle
03.02.2020 17:44 stgatilov Steps to Reproduce Updated View Revisions
21.03.2020 17:40 stgatilov Target Version => TDM 2.09
27.08.2020 13:23 stgatilov Assigned To => stgatilov
27.08.2020 13:23 stgatilov Status new => assigned
27.08.2020 13:33 stgatilov Note Added: 0012762
27.08.2020 13:34 stgatilov Note Added: 0012763
27.08.2020 13:36 stgatilov Note Added: 0012764
27.08.2020 13:36 stgatilov Status assigned => resolved
27.08.2020 13:36 stgatilov Resolution open => fixed
27.08.2020 13:36 stgatilov Fixed in Version => TDM 2.09