@@ -959,7 +959,7 @@ unsafe void PrecomputeAxisCacheLookup(int axisAmount, BasisFunction basisFunctio
959959
960960 fixed ( NeighborAxisLookup * sortedAxisPtr = & _sortedNeighborAxisLookups [ sortedAxisStart ] )
961961 {
962- CoreUnsafeUtils . QuickSort < NeighborAxisLookup > ( s_NeighborAxis . Length , sortedAxisPtr ) ;
962+ CoreUnsafeUtils . QuickSort < NeighborAxisLookup , NeighborAxisLookup , NeighborAxisLookup . NeighborAxisLookupKeyGetter > ( s_NeighborAxis . Length , sortedAxisPtr ) ;
963963 }
964964
965965 // Renormalize so all weights still add up to 1 when using limited axis amount.
@@ -1081,7 +1081,7 @@ unsafe internal ProbeVolumeSimulationRequest[] SortSimulationRequests(int maxSim
10811081 {
10821082 fixed ( ProbeVolumeSimulationRequest * requestPtr = & _probeVolumeSimulationRequests [ 0 ] )
10831083 {
1084- CoreUnsafeUtils . QuickSort < ProbeVolumeSimulationRequest > ( _probeVolumeSimulationRequestCount , requestPtr ) ;
1084+ CoreUnsafeUtils . QuickSort < ProbeVolumeSimulationRequest , ProbeVolumeSimulationRequest , ProbeVolumeSimulationRequest . ProbeVolumeSimulationRequestKeyGetter > ( _probeVolumeSimulationRequestCount , requestPtr ) ;
10851085 }
10861086
10871087 int maxSimulationsPerFrame ;
@@ -1104,6 +1104,12 @@ public int CompareTo(ProbeVolumeSimulationRequest other)
11041104 {
11051105 return other . simulationFrameDelta - simulationFrameDelta ;
11061106 }
1107+
1108+ public struct ProbeVolumeSimulationRequestKeyGetter : CoreUnsafeUtils . IKeyGetter < ProbeVolumeSimulationRequest , ProbeVolumeSimulationRequest >
1109+ {
1110+ public ProbeVolumeSimulationRequest Get ( ref ProbeVolumeSimulationRequest v ) { return v ; }
1111+ }
1112+
11071113 }
11081114
11091115 struct NeighborAxisLookup : IComparable < NeighborAxisLookup >
@@ -1126,6 +1132,11 @@ public int CompareTo(NeighborAxisLookup other)
11261132 float diff = propagationWeight - other . propagationWeight ;
11271133 return diff < 0 ? 1 : diff > 0 ? - 1 : 0 ;
11281134 }
1135+
1136+ public struct NeighborAxisLookupKeyGetter : CoreUnsafeUtils . IKeyGetter < NeighborAxisLookup , NeighborAxisLookup >
1137+ {
1138+ public NeighborAxisLookup Get ( ref NeighborAxisLookup v ) { return v ; }
1139+ }
11291140 }
11301141 }
11311142
0 commit comments