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

Android - Adreno - Model not responding initially for few seconds #8124

Open
mbalajee opened this issue Sep 13, 2024 · 5 comments
Open

Android - Adreno - Model not responding initially for few seconds #8124

mbalajee opened this issue Sep 13, 2024 · 5 comments
Assignees
Labels
gpu specific This bug occurs only with a single GPU vendor.

Comments

@mbalajee
Copy link
Contributor

mbalajee commented Sep 13, 2024

When loading a glb model (~6.5K entites) there's an initial lag for ~10 seconds before the model responds to touch events. This happens only on Adreno GPUs, even on the recent top end device (tested on OnePlus Open / S23 Ultra / S23+).

Since the lag is closer to 10 seconds, users exit the screen thinking that app is not responding. Is there a workaround for this? Currently we set the zoom level to -1 which takes the camera closer to the model so frustum culling helps there - the lag is lesser but still long enough to think that app is frozen

To Reproduce
Steps to reproduce the behavior:

  1. Load a larger model in any adreno device
  2. Observe model is not responding for ~10 seconds
  3. After the initial lag, model responds to touch events without a lag

Screenshots
Here is the recording of sample-gltf-viewer app running on S23,
https://drive.google.com/file/d/1JKu4lqXT_lMD2UpiTx3as6v2LmB3hXBM/view?usp=sharing

Logs
I see the panic log, but it appears on Mali devices too which don't have this initial lag issue,

in HandleBase::HandleId filament::backend::HandleAllocator<32, 64, 136>::allocateHandleSlow(size_t) [P0 = 32, P1 = 64, P2 = 136]:128

Smartphone (please complete the following information):
Samsung S23 FE / Android 15

Additional context
Tested on recent commit

@pixelflinger pixelflinger self-assigned this Sep 16, 2024
@pixelflinger pixelflinger added the gpu specific This bug occurs only with a single GPU vendor. label Sep 16, 2024
@pixelflinger
Copy link
Collaborator

I would have to look into it with systrace. can you share your glb model with us? If not publicly could you share it privately?

@pixelflinger
Copy link
Collaborator

Is this different from #8028 ?

@mbalajee
Copy link
Contributor Author

Is this different from #8028 ?

It may be related. In 8028, larger models (like 10K+) don't even load on Adreno devices but they load just fine on Mali. In this issue, relatively smaller models (7K) render on Adreno but not responsive for the ~10 seconds. After that interaction becomes a lot smoother (no lag at all). This initial lag issue happens very consistently.

Shared the google drive link privately with you

@pixelflinger
Copy link
Collaborator

Is this different from #8028 ?

It may be related. In 8028, larger models (like 10K+) don't even load on Adreno devices but they load just fine on Mali. In this issue, relatively smaller models (7K) render on Adreno but not responsive for the ~10 seconds. After that interaction becomes a lot smoother (no lag at all). This initial lag issue happens very consistently.

Shared the google drive link privately with you

mh, it might have something to do with the parallel shader compilation maybe. I wonder why it would behave so differently on Adreno. I would need to look at this with systrace, if I can reproduce it.

@jeanlemotan
Copy link
Contributor

We had issues in our engine with some Mali drivers (G76) behaving like there is a mutex in the driver when compiling shaders so we had to implement a multiprocess solution for this. Not for Adreno though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gpu specific This bug occurs only with a single GPU vendor.
Projects
None yet
Development

No branches or pull requests

3 participants