Skip to content

BOTWRecompAndroid 0.4.10 (beta 42): uma correção para o travamento na Mali

Pre-release
Pre-release

Choose a tag to compare

@mamcjr mamcjr released this 21 Nov 15:06
· 2 commits to main since this release

Beta 42. Uma correção para o travamento depois de alguns minutos nas GPUs que trabalham no modo cópia (Mali e o driver de fábrica da Qualcomm).

O travamento depois de alguns minutos (#401, #489)

Os logs da 0.4.9 mostraram que o problema não era a ordem das threads nos núcleos: com a opção nova ligada, o jogo travou do mesmo jeito, e o laço estava no alocador de memória do jogo, que percorria uma lista de blocos livres danificada.

  • A causa provável: nessas GPUs, o que um shader grava na memória do jogo volta para ela depois que a GPU termina. Cada pedaço era conferido ("a GPU mudou, o jogo não") e depois copiado inteiro. Se uma thread do jogo escrevesse no mesmo pedaço entre as duas coisas, por exemplo nos dados que o alocador guarda ao lado de cada bloco, essa escrita se perdia. Uma escrita perdida ali deixa a lista de blocos livres em laço, e o jogo para.
  • A correção: só volta o que a GPU mudou, palavra por palavra, e cada palavra só é escrita se o jogo não a mudou nesse meio-tempo. A escrita do jogo nunca se perde.
  • No POCO F7 Ultra (Turnip) a memória do jogo fica na própria GPU e nada volta, por isso ele nunca travou. Testada lá também no modo cópia, sem perda de desempenho.
  • A opção Turnos por núcleo como no Switch continua nas Configurações, mas não ajudou neste travamento: pode deixar desligada.
  • Quem tinha o travamento: jogue como antes e conte se ainda trava. Se travar, espere uns 15 s, feche o app e mande o botwrecomp-log-previous.txt (Configurações > Arquivos).

Não precisa compilar o código do jogo de novo: é só instalar por cima.

Problemas conhecidos

  • Mali-G720 / G615: o app pode fechar depois de ~35 min porque os mapeamentos de memória crescem (#496).
  • Adreno 640 com 8 GB: "Memória do jogo na GPU (Turnip)" no Automático pode esgotar a memória do driver e fechar o jogo depois de alguns minutos (#520). Desligue em Configurações > Prelaunch > Compatibilidade do driver.
  • 4 GB de RAM: perto de 20 fps no mundo, e o fps cai quando o aparelho esquenta.
  • RADV no Xclipse 530: o jogo cai dentro do driver RADV ao entrar no mundo (#383). PanVK ainda não é suportado (#497, #503).
  • 1.0.0 em combate: os inimigos podem deixar linhas pretas ao morrer. Use a 1.8.2 ou a 1.9.0.
  • A chuva cai mais devagar que no console. A grama baixa ao longe só aparece de perto. No driver de fábrica da Qualcomm, o fundo do menu de pausa fica preto.

Nenhum arquivo do jogo vem incluído. Testada no POCO F7 Ultra (Adreno 830, Turnip). Para instalar e configurar: 0.1.0-beta. Créditos no README.


Beta 42. A fix for the freeze after a few minutes on GPUs that work in copy mode (Mali, and Qualcomm's stock driver).

The freeze after a few minutes (#401, #489)

The 0.4.9 logs showed it wasn't about how threads take turns on the cores: with the new option on, the game froze the same way, and the loop was in the game's memory allocator, walking a damaged list of free blocks.

  • The likely cause: on these GPUs, what a shader writes into the game's memory is copied back once the GPU is done. Each piece was checked ("the GPU changed it, the game didn't") and then copied whole. If a game thread wrote into the same piece between the two steps (for example, the data the allocator keeps next to each block), that write was lost. One lost write there makes the free-block list loop, and the game stops.
  • The fix: only what the GPU changed goes back, word by word, and each word is written only if the game hasn't changed it meanwhile. The game's write is never lost.
  • On the POCO F7 Ultra (Turnip) the game's memory lives on the GPU and nothing is copied back, which is why it never froze there. Also tested there in copy mode, with no performance cost.
  • The Switch-style core turns option stays in Settings, but it didn't help with this freeze: you can leave it off.
  • If you had the freeze: play as before and tell us whether it still happens. If it does, wait about 15 s, close the app, and send botwrecomp-log-previous.txt (Settings > Files).

No need to build the game's code again: just install over the previous version.

Known issues

  • Mali-G720 / G615: the app can close after ~35 min because memory mappings grow (#496).
  • Adreno 640 with 8 GB: "Game memory on the GPU (Turnip)" on Automatic can exhaust the driver's memory and close the game after a few minutes (#520). Turn it off in Settings > Prelaunch > Driver compatibility.
  • 4 GB RAM: close to 20 fps in the world, and fps drops as the device heats up.
  • RADV on Xclipse 530: the game crashes inside the RADV driver when entering the world (#383). PanVK isn't supported yet (#497, #503).
  • 1.0.0 in combat: enemies can leave black lines when they die. Please use 1.8.2 or 1.9.0.
  • Rain falls slower than on the console. Short grass in the distance only appears up close. On Qualcomm's stock driver, the pause menu's background is black.

No game files are included. Tested on the POCO F7 Ultra (Adreno 830, Turnip). To install and set up: 0.1.0-beta. Credits in the README.