Skip to content

Commit 351b3ea

Browse files
alekseiunityEvergreen
authored andcommitted
Fixed empty managed array allocation.
Fixes GC dynamic memory allocation that happens on every frame during GRD update. ![Screenshot 2024-04-08 at 13 43 24](https://media.github.cds.internal.unity3d.com/user/1206/files/d86fab3b-0b66-4d54-9597-32796463861e)
1 parent 80ab22f commit 351b3ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ private void PostPostLateUpdate()
544544
var lodGroupTransformData = m_Dispatcher.GetTransformChangesAndClear<LODGroup>(TransformTrackingType.GlobalTRS, Allocator.TempJob);
545545
var lodGroupData = m_Dispatcher.GetTypeChangesAndClear<LODGroup>(Allocator.TempJob, noScriptingArray: true);
546546
var meshDataSorted = m_Dispatcher.GetTypeChangesAndClear<Mesh>(Allocator.TempJob, sortByInstanceID: true, noScriptingArray: true);
547-
var materialData = m_Dispatcher.GetTypeChangesAndClear<Material>(Allocator.TempJob);
547+
var materialData = m_Dispatcher.GetTypeChangesAndClear<Material>(Allocator.TempJob, noScriptingArray: true);
548548
Profiler.EndSample();
549549

550550
Profiler.BeginSample("GPUResindentDrawer.ProcessMaterials");

0 commit comments

Comments
 (0)