Search Issue Tracker

Fixed in 2021.1.X

Votes

1

Found in

2019.4

2019.4.12f1

2020.1

2020.2

2021.1

Issue ID

1293458

Regression

No

[Android] [Vulkan] Graphics memory is not released when switching between scenes

Mobile

-

Steps to reproduce:
1. Open user's attached project "VulkanUnableToUnloadGraphicsMemory.zip"
2. Switch to Android
3. Export the Android project with developers option enabled
4. Install the project with Android Studio
5. Open Android studio Profiler
6. Select the memory section
7. Switch between "Scene1" and "Scene2"
8. Notice the memory profiler does not unload memory when exiting a scene

Expected results: Graphics memory is unloaded when a scene is exited
Actual results: Graphics memory is not unloading when a scene is not running

Reproduces on: 2019.4.17f1, 2020.1.17f1, 2020.2.0f1, 2021.1.0a10
Could not test: 2018.4.30f1 (due to project breaking)

Reproducible with these devices:
VLNQA00264, Samsung Galaxy S10+ (SM-G975F), Android 10, CPU: Exynos 9 9820, GPU: Mali-G76
N/A, Samsung Galaxy S10+ (SM-G975U), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00001, Google Pixel 2 (Pixel 2), Android 11, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
N/A, Google Pixel 3 XL (Pixel 3 XL), Android 11, CPU: NOT FOUND, GPU: Adreno (TM) 630
N/A, Samsung Galaxy S9 (SM-G960F), Android 8.0.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00316, Samsung Galaxy Note10 (SM-N970F), Android 9, CPU: Exynos 9 Series 9825, GPU: Mali-G76

Does not reproduce with these devices:
VLNQA00231, Huawei HUAWEI Mate 20 Pro (LYA-L29), Android 9, CPU: HiSilicon Kirin 980, GPU: Mali-G76
N/A, Oneplus OnePlus 6 (ONEPLUS A6003), Android 10, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00024, Xiaomi Mi 5 (MI 5), Android 7.0, CPU: Snapdragon 820 MSM8996, GPU: Adreno (TM) 530
VLNQA00339, Lge LG V50 ThinQ 5G (LM-V500N), Android 10, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640

Note: Screenshots are attached

  1. Resolution Note (fix version 2021.1):

    On the Vulkan side we use memory pools with reserves of memory pages to avoid frequent memory allocation as it is expensive. Not all of the "extra" memory will be trimmed because reserve and active buffers might be "stretched out".

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.