Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow on Firefox / Linux / RX 550 #332

Open
metiulekm opened this issue Oct 5, 2024 · 3 comments
Open

Slow on Firefox / Linux / RX 550 #332

metiulekm opened this issue Oct 5, 2024 · 3 comments

Comments

@metiulekm
Copy link

With the mentioned configuration, I unfortunately get less than 1 FPS on the bunnymark even with 1 bunny only.

Some details:

  • This happens only on Firefox (131.0, but this also happened on the older versions), I do not get this issue on Chromium.
  • I use Plasma on Arch on this PC. I can reproduce this both on X11 and Wayland.
  • I can reproduce this with the version from the README, but also when I build the bunnymark myself, both against v0.12.1 and develop versions of Notan.
  • My GPU, as mentioned, is RX 550.
  • Native version works fine.
  • I do not remember having a similar issue with any other browser game framework. Notably the kiss3d example also runs smoothly, even though, if I understand correctly, it also uses GL via glow.

Not really sure how to begin debugging this :) I tried to run some quick profiling and it seems that most of the time is spend inside buffer_data_u8_slice, called here, with a flame graph like this (on release version):
obraz

@Nazariglez
Copy link
Owner

Hi @metiulekm, thanks for the report. Can you test it again using the devleop branch? I just uploaded a "fix" that could help with this.

@metiulekm
Copy link
Author

Hi, I have upgraded to RX 7600 XT in the meantime. I still have the old RX 550 lying around somewhere, so I might be able to test this on that card.

I do have some issues on RX 7600 XT, though I am not sure if this is the same issue or a different one, or even if it is a Notan issue in first place. I need to spend some more time on this, but I get no rendering and an exception in the console. This happens in https://nazariglez.github.io/notan-web/examples/draw_bunnymark and also when I build myself against both 0.12 and develop. The message varies, and this is what I get on develop, suggesting some kind of OOM inside create_uniform_buffer:

Uncaught RuntimeError: unreachable executed
    __wbg_finalize_init http://127.0.0.1:8080/with_notan-1393c4ea51d40140.js:1243
    __wbg_init http://127.0.0.1:8080/with_notan-1393c4ea51d40140.js:1297
with_notan-1393c4ea51d40140_bg.wasm:4257722:1
    __rg_oom http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4257722
    __rust_alloc_error_handler http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4263349
    hffd0e1af790a15a0 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4264180
    h5c6ea63f2cac4602 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4257743
    with_notan-edc0f5862f047bf7.wasm.<u8 as alloc::vec::spec_from_elem::SpecFromElem>::from_elem::h34ec55fb67e54876 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:2235839
    h3291355e89bd40f5 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4115249
    h1bc25bb15e113661 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:1617838
    with_notan-edc0f5862f047bf7.wasm.<notan_glow::GlowBackend as notan_graphics::device::DeviceBackend>::create_uniform_buffer::h5edda3b61749ef0c http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:1852089
    h0509cdc4711f16d5 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:1933122
    h8551218ad644dc08 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:2954326
    hf1b9fc3c9af87e46 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:667157
    h62bed17125cce929 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:1250729
    h7dd6b49267244360 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:2630754
    with_notan-edc0f5862f047bf7.wasm.<notan_draw::config::DrawConfig as notan_app::builder::BuildConfig<S,B>>::apply::{{closure}}::h51d8d5b0e5c1db7f http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:2065649
    with_notan-edc0f5862f047bf7.wasm.<alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h27ba1dc42b263685 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:3940462
    h4da9d1b91afad08e http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:1946661
    hf53bd72d0757a415 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:3563851
    h771a96750e539b5a http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:3815064
    with_notan-edc0f5862f047bf7.wasm.<alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5ffbc8ac770e84fe http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:3498046
    hb370c3c15020d119 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:327408
    h73ef11e35b60fc9c http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:3304565
    h6d03a8e416ba5d32 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4169741
    hd0b4f07610dae4ff http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4169687
    h252dfae2d52eaea0 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:3584572
    hca8730f87f82319d http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:3519541
    h29d90f5b5e999fd2 http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:3690659
    main http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4255326
    wasm http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4262817
    wasm http://127.0.0.1:8080/with_notan-1393c4ea51d40140_bg.wasm:4265671
    __wbg_finalize_init http://127.0.0.1:8080/with_notan-1393c4ea51d40140.js:1243
    __wbg_init http://127.0.0.1:8080/with_notan-1393c4ea51d40140.js:1297
    InterpretGeneratorResume self-hosted:1413
    AsyncFunctionNext self-hosted:800

I am a bit short on time (and honestly energy), but I will hopefully be able to both look at this more and check on RX 550 again in the next week?

@metiulekm
Copy link
Author

Just tested on RX 550. Sadly with that GPU there is no change between v0.12.1 and develop (aka 2e4bbc7d6b6290d3cbdf203c48ac0614fc675bea), i.e. on Firefox and ESR it runs, but is slower than 1 FPS, and on Chromium it runs with vertical sync speed (i.e. 165 FPS). Thanks for your help anyway :) I will try to debug the 7600 XT crash, it definitely feels related and seems much more debuggable.

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

No branches or pull requests

2 participants