Commit c9e3a3a
[Port] [6000.0] [UUM-83271] made streaming scratch buffers having different size not leak into the pool and dispose immediately
JIRA: [UUM-83271](https://jira.unity3d.com/browse/UUM-83271)
This PR is to prevent APV streaming buffer from not leaking into the current pool having different chunk size.
Because NativeArray with fixed size is used while streaming in & out, memory contemination happens especially when the current pool's chunk size is bigger than the released scratch buffer's, and the behaviour tends to cause editor crash.
In the JIRA ticket's repro case, the issue occurs because Lobby scene's baking set with greater chunk size becomes active while requests from MainMenu scene having smaller chunk size are cancelled and their attached scratch buffers leak into the newly created free buffer pool.
The case happens in editor only, but as it doesn't seem like the only repro case the modification is applied into the player land.
From this PR's inverstigation, refactorying the structure reagarding disk streaming scratch buffer and its pool will be more fundamental solution especially by changing the pool to be capable of managing various sizes & layouts.
Please let me know which way you think more proper.1 parent bfe1703 commit c9e3a3a
2 files changed
Lines changed: 8 additions & 0 deletions
File tree
- Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| 156 | + | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
235 | 241 | | |
236 | 242 | | |
237 | 243 | | |
| |||
0 commit comments