Skip to content

BOTWRecompAndroid 0.4.13 (beta 45): correção para o travamento da Mali nas lutas

Pre-release
Pre-release

Choose a tag to compare

@mamcjr mamcjr released this 24 Nov 18:16
· 42 commits to main since this release

Beta 45. Uma correção para o travamento depois de alguns minutos de luta na Mali, e três mudanças de desempenho para a Mali.

O travamento da Mali (#401)

Na Mali-G1 Ultra do #401, o jogo travava depois de alguns minutos de luta (com muitos efeitos), no modo Nativo e no Recompilado. Os logs mostravam uma thread do jogo presa percorrendo a lista de blocos livres do alocador de memória do jogo, que dava a volta.

  • A causa provável: na Mali, o que um shader grava na memória do jogo é copiado de volta quando a GPU termina. Fora da "arena" de memória global, essa cópia era da faixa inteira, e desfazia o que o jogo tinha escrito ali no meio-tempo, inclusive os cabeçalhos e os links da lista de blocos livres, que ficam logo antes dos buffers. A 0.4.10 já fazia a cópia certa, mas só dentro da arena, que nunca liga nas Malis cujo driver oferece a importação de memória (como a G1 Ultra).
  • O que muda: agora volta só o que a GPU mudou, palavra por palavra, e o que o jogo escreveu no meio-tempo fica. Quando isso acontece, o log diz copy-back: a word the game wrote meanwhile kept.
  • No POCO F7 Ultra, no mesmo caminho da Mali (forçado), o desempenho ficou igual. Quem tinha o travamento: jogue as mesmas lutas e conte se ainda trava. Se travar, espere uns 15 s, feche o app e mande o botwrecomp-log-previous.txt (Configurações > Arquivos).

Mali

  • Leitura direta da imagem desenhada no Automático (#549): numa Mali-G615, decalques e efeitos que leem a imagem sobre a qual desenham passaram a ler direto, sem cópias: de 27,6 para 29,7 fps em média, e de ~25% para 88% do tempo a 30 fps cheios. Se aparecer algo desenhado errado, desligue em tela inicial > Compatibilidade do driver > Leitura direta da imagem desenhada.
  • Render passes clássicos nos drivers Mali r49 e mais novos (PR #534, Propinbo): uma opção nova em Compatibilidade do driver, no Automático ligada nesses drivers. Na primeira partida depois de atualizar, a Mali r49+ recompila os pipelines: os primeiros minutos podem travar um pouco, como numa instalação nova.
  • Texturas comprimidas decodificadas em 4 threads (PR #531, Propinbo): nas GPUs sem BC (a maioria das Malis), menos travadinhas ao carregar texturas.

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

Problemas conhecidos

  • Mali-G720 / G615: o app pode fechar depois de ~30 min (#496, #560): o número de mapeamentos de memória chega ao limite do Android. Os logs mostram a memória crescendo com os pipelines; estamos investigando.
  • Minimapa em cima, logo depois de fechar a pausa ou o inventário (#259): por cerca de um segundo, o minimapa mostra o chão em vez do mapa.
  • RADV no Xclipse 530: o jogo cai dentro do driver RADV ao entrar no mundo (#383). PanVK ainda não é suportado.
  • 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 45. A fix for the freeze after a few minutes of fighting on Mali, and three performance changes for Mali.

The Mali freeze (#401)

On the Mali-G1 Ultra of #401, the game froze after a few minutes of fighting (with many effects), in Native and Recompiled mode alike. The logs showed a game thread stuck walking the free-block list of the game's memory allocator, which looped.

  • The likely cause: on Mali, what a shader writes into the game's memory is copied back when the GPU finishes. Outside the global-memory "arena", that copy was the whole range, and it undid what the game had written there meanwhile, including the headers and links of the free-block list that sit right before the buffers. 0.4.10 already did the right copy, but only inside the arena, which never starts on Malis whose driver offers the memory import (like the G1 Ultra).
  • What changes: now only what the GPU changed goes back, word by word, and what the game wrote meanwhile stays. When that happens, the log says copy-back: a word the game wrote meanwhile kept.
  • On the POCO F7 Ultra, in the same path as the Mali (forced), performance stayed the same. If you had the freeze: play the same fights and tell us whether it still freezes. If it does, wait about 15 s, close the app and send botwrecomp-log-previous.txt (Settings > Files).

Mali

  • Draw-target reads in place on Automatic (#549): on a Mali-G615, decals and effects that read the image they draw on now read it directly, without copies: 27.6 to 29.7 fps on average, and ~25% to 88% of the time at a full 30 fps. If something draws wrong, turn it off on the start screen > Driver compatibility > Draw-target reads in place.
  • Classic render passes on Mali r49 and newer drivers (PR #534, Propinbo): a new option under Driver compatibility, on in Automatic for those drivers. On the first game after updating, Mali r49+ builds its pipelines again: the first minutes may stutter a little, as after a fresh install.
  • Compressed textures decoded on 4 threads (PR #531, Propinbo): on GPUs without BC (most Malis), fewer hitches while textures load.

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

Known issues

  • Mali-G720 / G615: the app can close after ~30 min (#496, #560): the number of memory mappings reaches Android's limit. The logs show memory growing with the pipelines; we're investigating.
  • Minimap at the top, right after closing the pause or the inventory (#259): for about a second the minimap shows the ground instead of the map.
  • RADV on Xclipse 530: the game crashes inside the RADV driver when entering the world (#383). PanVK isn't supported yet.
  • 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.