Skip to content

Commit 561294f

Browse files
fabien-unitysebastienlagarde
authored andcommitted
Fix memory leak with XR combined occlusion meshes #5772
1 parent 5d46e89 commit 561294f

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99
### Fixed
1010
- Fixed diffusion profile being reset to default on SpeedTree8 materials with subsurface scattering enabled during import.
1111
- Fixed error in SSGI when disabling decals (case 1365521).
12+
- Fixed silhouette issue with emissive decals
13+
- Fixed range compression factor being clamped. (case 1365707)
14+
- Fixed tooltip not showing on labels in ShaderGraphs (1358483).
15+
- Fix API warnings in Matcap mode on Metal.
16+
- Fix D3D validation layer errors w.r.t shadow textures when an atlas is not used.
17+
- Fixed screen space reflection PBR Accumulation
18+
- Fixed and optimize distance shadowmask fade.
19+
- Fixed memory leak with XR combined occlusion meshes (case 1366173).
1220

1321
## [10.7.0] - 2021-07-02
1422

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,11 @@ internal int GetMaxViews()
167167

168168
internal void ReleaseFrame()
169169
{
170-
foreach ((Camera _, XRPass xrPass) in framePasses)
170+
for (int i = 0; i < framePasses.Count; i++)
171171
{
172+
// Pop from the back to keep initial ordering (see implementation of ObjectPool)
173+
(Camera _, XRPass xrPass) = framePasses[framePasses.Count - i - 1];
174+
172175
if (xrPass != emptyPass)
173176
XRPass.Release(xrPass);
174177
}

com.unity.render-pipelines.universal/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [10.8.0] - 2021-09-20
88

9-
Version Updated
10-
The version number for this package has increased due to a version update of a related graphics package.
9+
### Fixed
10+
- Fixed memory leak with XR combined occlusion meshes. [case 1366173]
1111

1212
## [10.7.0] - 2021-07-02
1313

com.unity.render-pipelines.universal/Runtime/XR/XRSystem.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@ internal List<XRPass> SetupFrame(CameraData cameraData)
208208

209209
internal void ReleaseFrame()
210210
{
211-
foreach (XRPass xrPass in framePasses)
211+
for (int i = 0; i < framePasses.Count; i++)
212212
{
213+
// Pop from the back to keep initial ordering (see implementation of ObjectPool)
214+
var xrPass = framePasses[framePasses.Count - i - 1];
215+
213216
if (xrPass != emptyPass)
214217
XRPass.Release(xrPass);
215218
}

0 commit comments

Comments
 (0)