@@ -132,7 +132,7 @@ public int visibilityConfigCount
132
132
}
133
133
}
134
134
135
- [ BurstCompile ]
135
+ [ BurstCompile ( DisableSafetyChecks = true , OptimizeFor = OptimizeFor . Performance ) ]
136
136
internal struct CullingJob : IJobParallelFor
137
137
{
138
138
public const int k_BatchSize = 32 ;
@@ -173,7 +173,7 @@ enum CrossFadeType
173
173
174
174
[ ReadOnly ] public CPUInstanceData . ReadOnly instanceData ;
175
175
[ ReadOnly ] public CPUSharedInstanceData . ReadOnly sharedInstanceData ;
176
- [ NativeDisableContainerSafetyRestriction ] [ ReadOnly ] public NativeList < LODGroupCullingData > lodGroupCullingData ;
176
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] [ ReadOnly ] public NativeList < LODGroupCullingData > lodGroupCullingData ;
177
177
[ NativeDisableUnsafePtrRestriction ] [ ReadOnly ] public IntPtr occlusionBuffer ;
178
178
179
179
[ NativeDisableParallelForRestriction ] [ WriteOnly ] public NativeArray < byte > rendererVisibilityMasks ;
@@ -399,7 +399,7 @@ public void Execute(int instanceIndex)
399
399
}
400
400
}
401
401
402
- [ BurstCompile ]
402
+ [ BurstCompile ( DisableSafetyChecks = true , OptimizeFor = OptimizeFor . Performance ) ]
403
403
internal unsafe struct AllocateBinsPerBatch : IJobParallelFor
404
404
{
405
405
[ ReadOnly ] public BinningConfig binningConfig ;
@@ -409,15 +409,15 @@ internal unsafe struct AllocateBinsPerBatch : IJobParallelFor
409
409
[ ReadOnly ] public CPUInstanceData . ReadOnly instanceData ;
410
410
[ ReadOnly ] public NativeArray < byte > rendererVisibilityMasks ;
411
411
412
- [ NativeDisableContainerSafetyRestriction ] [ WriteOnly ] public NativeArray < int > batchBinAllocOffsets ;
413
- [ NativeDisableContainerSafetyRestriction ] [ WriteOnly ] public NativeArray < int > batchBinCounts ;
412
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] [ WriteOnly ] public NativeArray < int > batchBinAllocOffsets ;
413
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] [ WriteOnly ] public NativeArray < int > batchBinCounts ;
414
414
415
- [ NativeDisableContainerSafetyRestriction ] [ DeallocateOnJobCompletion ] public NativeArray < int > binAllocCounter ;
416
- [ NativeDisableContainerSafetyRestriction ] [ WriteOnly ] public NativeArray < short > binConfigIndices ;
417
- [ NativeDisableContainerSafetyRestriction ] [ WriteOnly ] public NativeArray < int > binVisibleInstanceCounts ;
415
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] [ DeallocateOnJobCompletion ] public NativeArray < int > binAllocCounter ;
416
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] [ WriteOnly ] public NativeArray < short > binConfigIndices ;
417
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] [ WriteOnly ] public NativeArray < int > binVisibleInstanceCounts ;
418
418
419
419
[ ReadOnly ] public int debugCounterIndexBase ;
420
- [ NativeDisableContainerSafetyRestriction ] public NativeArray < int > splitDebugCounters ;
420
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] public NativeArray < int > splitDebugCounters ;
421
421
422
422
bool IsInstanceFlipped ( int rendererIndex )
423
423
{
@@ -535,7 +535,7 @@ unsafe public void Execute(int batchIndex)
535
535
}
536
536
}
537
537
538
- [ BurstCompile ]
538
+ [ BurstCompile ( DisableSafetyChecks = true , OptimizeFor = OptimizeFor . Performance ) ]
539
539
internal unsafe struct PrefixSumDrawsAndInstances : IJob
540
540
{
541
541
[ ReadOnly ] public NativeList < DrawRange > drawRanges ;
@@ -545,14 +545,14 @@ internal unsafe struct PrefixSumDrawsAndInstances : IJob
545
545
[ ReadOnly ] public NativeArray < int > batchBinCounts ;
546
546
[ ReadOnly ] public NativeArray < int > binVisibleInstanceCounts ;
547
547
548
- [ NativeDisableContainerSafetyRestriction ] [ WriteOnly ] public NativeArray < int > batchDrawCommandOffsets ;
549
- [ NativeDisableContainerSafetyRestriction ] [ WriteOnly ] public NativeArray < int > binVisibleInstanceOffsets ;
548
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] [ WriteOnly ] public NativeArray < int > batchDrawCommandOffsets ;
549
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] [ WriteOnly ] public NativeArray < int > binVisibleInstanceOffsets ;
550
550
551
551
[ NativeDisableUnsafePtrRestriction ] public NativeArray < BatchCullingOutputDrawCommands > cullingOutput ;
552
552
553
553
[ ReadOnly ] public IndirectBufferLimits indirectBufferLimits ;
554
- [ NativeDisableContainerSafetyRestriction ] public NativeArray < IndirectBufferAllocInfo > indirectBufferAllocInfo ;
555
- [ NativeDisableContainerSafetyRestriction ] public NativeArray < int > indirectAllocationCounters ;
554
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] public NativeArray < IndirectBufferAllocInfo > indirectBufferAllocInfo ;
555
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] public NativeArray < int > indirectAllocationCounters ;
556
556
557
557
unsafe public void Execute ( )
558
558
{
@@ -703,7 +703,7 @@ unsafe public void Execute()
703
703
}
704
704
}
705
705
706
- [ BurstCompile ]
706
+ [ BurstCompile ( DisableSafetyChecks = true , OptimizeFor = OptimizeFor . Performance ) ]
707
707
internal unsafe struct DrawCommandOutputPerBatch : IJobParallelFor
708
708
{
709
709
[ ReadOnly ] public BinningConfig binningConfig ;
@@ -731,9 +731,9 @@ internal unsafe struct DrawCommandOutputPerBatch : IJobParallelFor
731
731
[ ReadOnly ] public IndirectBufferLimits indirectBufferLimits ;
732
732
[ ReadOnly ] public GraphicsBufferHandle visibleInstancesBufferHandle ;
733
733
[ ReadOnly ] public GraphicsBufferHandle indirectArgsBufferHandle ;
734
- [ NativeDisableContainerSafetyRestriction ] public NativeArray < IndirectBufferAllocInfo > indirectBufferAllocInfo ;
735
- [ NativeDisableContainerSafetyRestriction ] public NativeArray < IndirectDrawInfo > indirectDrawInfoGlobalArray ;
736
- [ NativeDisableContainerSafetyRestriction ] public NativeArray < IndirectInstanceInfo > indirectInstanceInfoGlobalArray ;
734
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] public NativeArray < IndirectBufferAllocInfo > indirectBufferAllocInfo ;
735
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] public NativeArray < IndirectDrawInfo > indirectDrawInfoGlobalArray ;
736
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] public NativeArray < IndirectInstanceInfo > indirectInstanceInfoGlobalArray ;
737
737
738
738
unsafe int EncodeGPUInstanceIndexAndCrossFade ( int rendererIndex , bool negateCrossFade )
739
739
{
@@ -999,14 +999,14 @@ unsafe public void Execute(int batchIndex)
999
999
}
1000
1000
}
1001
1001
1002
- [ BurstCompile ]
1002
+ [ BurstCompile ( DisableSafetyChecks = true , OptimizeFor = OptimizeFor . Performance ) ]
1003
1003
internal unsafe struct CompactVisibilityMasksJob : IJobParallelForBatch
1004
1004
{
1005
1005
public const int k_BatchSize = 64 ;
1006
1006
1007
1007
[ ReadOnly ] public NativeArray < byte > rendererVisibilityMasks ;
1008
1008
1009
- [ NativeDisableContainerSafetyRestriction ] public ParallelBitArray compactedVisibilityMasks ;
1009
+ [ NativeDisableContainerSafetyRestriction , NoAlias ] public ParallelBitArray compactedVisibilityMasks ;
1010
1010
1011
1011
unsafe public void Execute ( int startIndex , int count )
1012
1012
{
@@ -1032,7 +1032,7 @@ internal enum FilteringJobMode
1032
1032
Picking
1033
1033
}
1034
1034
1035
- [ BurstCompile ]
1035
+ [ BurstCompile ( DisableSafetyChecks = true , OptimizeFor = OptimizeFor . Performance ) ]
1036
1036
internal unsafe struct DrawCommandOutputFiltering : IJob
1037
1037
{
1038
1038
[ ReadOnly ] public NativeParallelHashMap < uint , BatchID > batchIDs ;
@@ -1183,7 +1183,7 @@ public void Execute()
1183
1183
}
1184
1184
}
1185
1185
1186
- [ BurstCompile ]
1186
+ [ BurstCompile ( DisableSafetyChecks = true , OptimizeFor = OptimizeFor . Performance ) ]
1187
1187
internal struct CullSceneViewHiddenRenderersJob : IJobParallelFor
1188
1188
{
1189
1189
public const int k_BatchSize = 128 ;
@@ -1462,7 +1462,6 @@ public void MoveToDebugStatsAndClear(DebugRendererBatcherStats debugStats)
1462
1462
}
1463
1463
}
1464
1464
1465
- [ BurstCompile ]
1466
1465
internal struct InstanceCuller : IDisposable
1467
1466
{
1468
1467
//@ Move this in CPUInstanceData.
0 commit comments