Repository navigation
Vulkan: a janela de constant buffers lê uma cópia por submissão, não o heap no lugar - #453
Conversation
|
Obrigado. Faz sentido: lido no próprio heap, o resto do buffer mostrava ao GPU as linhas que a CPU já tinha escrito para o quadro seguinte, e a cópia por submissão resolve isso. Como a janela de constant buffers em si continua desligada por padrão ( Mesclo depois de testar aqui no 1.9.0 com |
…he heap in place LARECOMP_CB_WINDOW bound the 64 KB buffer in place, where with the sync lag the CPU already writes the next frame's rows: white water, terrain curtains (off since 2026-10-27). The rest of the buffer now comes from one copy per submission; the updated rows still come from the patch buffer, so the updates don't drop that copy. Copies 1200 -> 92 MB per 2 s (LARECOMP_LOG_CBUF_BYTES), water checked in game on an Adreno 750. LARECOMP_CBWIN_SNAPSHOT=0: in place. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Obrigado. Fiz rebase sobre o Só temos a 1.8.2 para testar, então o teste no 1.9.0 fica mesmo com você. Na 1.8.2, com |
324ecf1 to
998fb27
Compare
…t helped and what didn't Each change with its PR and state (mamcjr#452 and mamcjr#456 merged, mamcjr#453 mamcjr#454 mamcjr#455 mamcjr#457 proposed), the 40 / 45 fps section on the JNI version of mamcjr#455, and the code that only existed in the test build (present thread, shadow cascades, the 30 fps rate hint, kgsl, affinity) in its own "Testado fora do repositório" section, saying its variables aren't in the app. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for rebasing. I'll test it on 1.9.0 with |
|
Thanks! On the POCO with 1.9.0 and LARECOMP_CB_WINDOW=1 (the heap placed on the GPU), the Plateau's ponds and terrain look right: no white water, no curtains. Merging. |
… support Builds on mamcjr#453 per-submission cbwin snapshots by adding a 64-slot 4-way CbwinBaseCache (invalidated only on guest writes outside the patched window or async write-back/gcopy retires via atomic gcopy_gen) and active-prefix CbpatchDedupe, enabling cbwin safely by default on Mali gcopy_mode while preserving LARECOMP_CBWIN_SNAPSHOT=0 and AB(cbsnap) behavior on gmem_placed GPUs.
… support Builds on mamcjr#453 per-submission cbwin snapshots by adding a 64-slot 4-way CbwinBaseCache (invalidated only on guest writes outside the patched window or async write-back/gcopy retires via atomic gcopy_gen) and active-prefix CbpatchDedupe, enabling cbwin safely by default on Mali gcopy_mode while preserving LARECOMP_CBWIN_SNAPSHOT=0 and AB(cbsnap) behavior on gmem_placed GPUs.
… support Reconciles cbwin (mamcjr#453) with Android gcopy_mode GPUs (ARM Mali), cuts redundant per-draw full-UBO transient copies via a submission-scoped base snapshot cache, isolates async writeback/retire seqlock synchronization via cbwin-private cbwin_retire_{gen,writing,armed} (zero gcopy_gen churn on non-cbwin GPUs), and shrinks per-draw CBP patch uploads with CbpatchDedupe.
…mamcjr#457 merged; how each one landed The status table and the section titles say merged. Sections 3-6 describe the code as it landed instead of the proposal: mamcjr#454 queues the slots on every device (LARECOMP_SLOT_DRAIN=1 waits), with the 60 fps numbers of the merged version; mamcjr#455 says its first version had no effect on Android (SDL lists only the current mode) and the merged one asks Android through JNI, rechecked on 0.4.13 (40 fps on a 120 Hz screen); mamcjr#453 notes the window stays off by default on Adreno and mamcjr#506 took the snapshot cache to Mali.
O que muda
Com
LARECOMP_CB_WINDOW=1, ocbwin_bindligava o buffer de 64 KB no lugar do heap. Com o Sync lag a CPU jáescreve ali as linhas do quadro seguinte enquanto a GPU lê: água branca, "cortinas" no terreno, espinhos em objetos
distantes - o motivo de a janela estar desligada desde 27/10.
Agora o resto do buffer vem de uma cópia por submissão (cache próprio por endereço / tamanho /
vk_pending_seq()).As linhas que as atualizações escrevem continuam vindo do patch buffer da janela, então as atualizações não invalidam
essa cópia - diferente do
guest_copynormal, invalidado a cadaCMD_UPDATE_UNIFORM_BUFFER, que por isso copiava 64 KBpor draw.
LARECOMP_CBWIN_SNAPSHOT=0: leitura no lugar, como antes. Chave A/Bcbsnap. A janela continua desligada por padrão;este PR só a deixa segura para quem a liga (e para o autor decidir ligá-la por padrão).
Medido
LARECOMP_CB_WINDOW=1, A/Bcbwin,LARECOMP_LOG_CBUF_BYTES=1:13× menos bytes copiados (~15 → ~1,1 MB por quadro). O tempo cai pouco aqui (o memcpy deste SoC é rápido), mas é
tráfego de memória a menos. Água conferida em jogo: normal; terreno, horizonte e nuvens sem artefatos.
Aparelho e método
🤖 Generated with Claude Code