View Issue Details

IDProjectCategoryView StatusLast Update
0005875The Dark ModCodingpublic27.11.2022 13:03
Reporterstgatilov Assigned Tostgatilov  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.10 
Target VersionTDM 2.11Fixed in VersionTDM 2.11 
Summary0005875: Render same frame in frontend and backend when SMP if off
DescriptionWhen SMP is on, frontend renders the current frame, and backend renders previous frame in parallel.
It turns out that when SMP is off it works the same way.

This is inconvenient because:
1) One cannot render frontend structures in backend even with disabled SMP, because they are one frame ahead.
2) One added frame of latency.
Additional InformationSee also:
  https://forums.thedarkmod.com/index.php?/topic/21237-smp-and-frontend-debug-rendering/

This problem was already fixed in svn rev 9527 (see 0005673), but it broke main menu (e.g. mission success screen), so it was reverted.
TagsNo tags attached.

Relationships

related to 0005673 resolvedcabalistic Crash with r_showViewEntities and LOD 
related to 0005596 resolvedduzenko r_lockSurfaces broken 

Activities

stgatilov

stgatilov

26.11.2022 16:53

administrator   ~0015471

Last edited: 26.11.2022 17:07

1) Mission failure screen is NOT affected. Only mission success is.
2) The problem is caused by making final save: I tried setting gameLocal.m_TriggerFinalSave = false in ExecuteFrameCommand, the issue went away.
3) Quite obviously, it is the savegame screenshot which causes the problem.
stgatilov

stgatilov

26.11.2022 22:01

administrator   ~0015472

glActiveTexture stays on 1 while backEnd.glState.currenttmu is 0.
So all textures get bound to wrong TMU forever (only TMU 0 is used in GUI).
stgatilov

stgatilov

26.11.2022 22:21

administrator   ~0015473

It is the goddamn RB_SetDefaultGLState which:
 * memsets backEnd.glState to zero (including currenttmu)
 * but does not actually switch glActiveTexture

I'll add here unbind of all 32 textures and settings 0-th texture as active.
stgatilov

stgatilov

26.11.2022 22:33

administrator   ~0015474

Done:
  r10178 RB_SetDefaultGLState now resets glActiveTexture to 0 (and unbinds all textures).
  r10179 Render same frame in frontend and backend without SMP.
stgatilov

stgatilov

27.11.2022 13:03

administrator   ~0015481

I changed a bit:
  r10180 Even simpler non-SMP mode implementation.

Instead of toggling frameData double-buffer twice, just set both pointers to the same struct (both for frontend and backend).
As the result, presence/absence/parity of ToggleSmpFrame calls has no effect on non-SMP mode at all.

Issue History

Date Modified Username Field Change
11.01.2022 04:35 stgatilov New Issue
11.01.2022 04:35 stgatilov Status new => assigned
11.01.2022 04:35 stgatilov Assigned To => cabalistic
11.01.2022 04:35 stgatilov Relationship added related to 0005673
15.11.2022 00:33 nbohr1more Target Version TDM 2.11 => TDM 2.12
26.11.2022 16:53 stgatilov Note Added: 0015471
26.11.2022 17:07 stgatilov Note Edited: 0015471
26.11.2022 22:01 stgatilov Note Added: 0015472
26.11.2022 22:21 stgatilov Note Added: 0015473
26.11.2022 22:33 stgatilov Note Added: 0015474
26.11.2022 22:33 stgatilov Target Version TDM 2.12 => TDM 2.11
26.11.2022 22:33 stgatilov Assigned To cabalistic => stgatilov
26.11.2022 22:33 stgatilov Status assigned => resolved
26.11.2022 22:33 stgatilov Resolution open => fixed
26.11.2022 22:33 stgatilov Fixed in Version => TDM 2.11
26.11.2022 23:02 nbohr1more Relationship added related to 0005596
27.11.2022 13:03 stgatilov Note Added: 0015481