Skip to content

play-lod.ps1: drop the BIG_CARD sizes that made the picture flicker (fix for #7) - #9

Merged
dkdknight merged 1 commit into
dkdknight:feature/levels-on-demandfrom
tibzejoker:claude/fix-flicker
Nov 26, 2026
Merged

dkdknight merged 1 commit into
dkdknight:feature/levels-on-demandfrom
tibzejoker:claude/fix-flicker

Conversation

@tibzejoker

Copy link
Copy Markdown

Fix for #7 (my mistake there): with VICTORY_BIG_CARD=1 the picture flickered between the frame and black, and shaders flickered, on the RTX 4090. #7's fps gain (14.2 -> 15.0) was measured on that flickering picture.

Found by halving the set, one run at a time, watched on screen (release, #8's sync_heaps build, same scene):

set picture
#7 as merged (ASYNC_PRESENT, QUEUE2, longer joins, all BIG_CARD sizes) flickers
#2's switches + ASYNC_SUBMIT=2 JOIN_PARTS=1 only clean
+ longer joins + all BIG_CARD sizes (no QUEUE2) flickers
+ all BIG_CARD sizes only flickers
+ CARD_BUFFERS_MB=4096 CARD_ROOM_FOR_BUFFERS=1 only clean, ~15 fps
+ that + JOIN_MOST=16 JOIN_LISTS=256 clean

So one of CARD_BUFFERS_MIN_KB=64 / UPLOAD_WINDOWS_MB=6144 causes it (not split further). This PR keeps 4096 MB + room for buffers under BIG_CARD, keeps the longer joins, and also drops ASYNC_PRESENT=1 and QUEUE2=3, which measured nothing alone (14.17 / 14.15 against 14.18) and were never checked on screen.

Upstream's c36971b (this evening) adds 64 KiB card copies as a feature with VICTORY_CARD_HASH_LEN=1 (the card's hashes over the buffer's own bytes) and measures the title's lists 68.0 -> 49.8 ms of card time; that may be what this branch lacks for small copies. I'll try porting it next.

🤖 Generated with Claude Code

… no ASYNC_PRESENT or QUEUE2

With VICTORY_BIG_CARD=1 the picture flickered between the frame and black
(and shaders flickered) on an RTX 4090. Halving the set one run at a time,
watched on screen: clean without the 64 KiB copies and 6144 MB of upload
windows, clean with 4096 MB of card copies and room for buffers alone,
clean with JOIN_MOST/JOIN_LISTS added. ASYNC_PRESENT=1 and QUEUE2=3 had
measured nothing alone and are left off as well. Upstream's c36971b brings
64 KiB card copies with VICTORY_CARD_HASH_LEN=1 (hashes over the buffer's
own bytes), which may be what this branch lacks for them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tibzejoker

Copy link
Copy Markdown
Author

Also measured this evening (RTX 4090, release builds, same scene, the clean set of this PR: #2's switches + ):

build fps copies (frame log) copy-back
#8 head (240d464) 16.60-16.75 (2 runs) 11-13 ms 3-5 ms
this branch's tip 53a0b1a 12.10 19.1 ms 7.1 ms
53a0b1a + 12.38 20.2 ms 9.0 ms

So something between 8a738ef and 53a0b1a costs ~4 fps here, in the copies and copy-back (not the two new switches). Trying 22d8455 alone exited early (before your 4a754d6 merge fix, I suppose), so I could not split it further yet; the suspects by what they touch are 921c93b (guards opened a run of blocks at a call, list steps cleared in place), 6ed1270 (buffer table under the readers' lock, heap pass refreshes under one lock) and dc7a258 (relay merges). For now we keep working on #8's head.

@dkdknight

Copy link
Copy Markdown
Owner

Merci Thibault, je fusionne.

Mesures cette nuit sur la RTX 5080, même scène, une fois la cellule chargée (médiane des 20 dernières lignes d'image) :

build fps image
tête de #8 (240d464) + ton jeu de réglages propre 10,3 (9,3-12,0) juste, sauf des blocs le long du bord bas
integ/fps-15 (notre tête + 8 branches), réglages du traducteur coupés 10,6 (9,6-11,4) intérieur parfois sombre selon le lancement

Sur la 5080, je ne vois donc pas ta régression de 4,5 fps : la carte est le frein, et les copies plus lentes côté CPU ne se voient pas. Sur ta 4090, la carte va plus vite, donc c'est le CPU qui compte. Si tu peux couper l'écart entre 240d464 et 53a0b1a en deux, ce sera chez toi qu'il se verra.

Ce que la nuit a appris côté image, au cas où ça t'éclaire :

Réponse rédigée par Claude (IA) pour dkdknight.

@dkdknight
dkdknight merged commit db30533 into dkdknight:feature/levels-on-demand Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants