17
17
extension MTLBlitCommandEncoder {
18
18
19
19
public func fill( buffer: MTLBuffer , range: Range < Int > , value: UInt8 ) {
20
- __fill ( buffer, range: NSMakeRange ( range. lowerBound, range. count) , value: value)
20
+ __fill ( buffer, range: NSRange ( location : range. lowerBound, length : range. count) , value: value)
21
21
}
22
22
}
23
23
@@ -28,13 +28,13 @@ extension MTLBuffer {
28
28
#if os(OSX)
29
29
@available ( macOS, introduced: 10.11 )
30
30
public func didModifyRange( _ range: Range < Int > ) {
31
- __didModifyRange ( NSMakeRange ( range. lowerBound, range. count) )
31
+ __didModifyRange ( NSRange ( location : range. lowerBound, length : range. count) )
32
32
}
33
33
#endif
34
34
35
35
@available ( macOS 10 . 12 , iOS 10 . 0 , tvOS 10 . 0 , * )
36
36
public func addDebugMarker( _ marker: String , range: Range < Int > ) {
37
- __addDebugMarker ( marker, range: NSMakeRange ( range. lowerBound, range. count) )
37
+ __addDebugMarker ( marker, range: NSRange ( location : range. lowerBound, length : range. count) )
38
38
}
39
39
}
40
40
@@ -53,19 +53,19 @@ extension MTLComputeCommandEncoder {
53
53
}
54
54
55
55
public func setBuffers( _ buffers: [ MTLBuffer ? ] , offsets: [ Int ] , range: Range < Int > ) {
56
- __setBuffers ( buffers, offsets: offsets, with: NSMakeRange ( range. lowerBound, range. count) )
56
+ __setBuffers ( buffers, offsets: offsets, with: NSRange ( location : range. lowerBound, length : range. count) )
57
57
}
58
58
59
59
public func setTextures( _ textures: [ MTLTexture ? ] , range: Range < Int > ) {
60
- __setTextures ( textures, with: NSMakeRange ( range. lowerBound, range. count) )
60
+ __setTextures ( textures, with: NSRange ( location : range. lowerBound, length : range. count) )
61
61
}
62
62
63
63
public func setSamplerStates( _ samplers: [ MTLSamplerState ? ] , range: Range < Int > ) {
64
- __setSamplerStates ( samplers, with: NSMakeRange ( range. lowerBound, range. count) )
64
+ __setSamplerStates ( samplers, with: NSRange ( location : range. lowerBound, length : range. count) )
65
65
}
66
66
67
67
public func setSamplerStates( _ samplers: [ MTLSamplerState ? ] , lodMinClamps: [ Float ] , lodMaxClamps: [ Float ] , range: Range < Int > ) {
68
- __setSamplerStates ( samplers, lodMinClamps: lodMinClamps, lodMaxClamps: lodMaxClamps, with: NSMakeRange ( range. lowerBound, range. count) )
68
+ __setSamplerStates ( samplers, lodMinClamps: lodMinClamps, lodMaxClamps: lodMaxClamps, with: NSRange ( location : range. lowerBound, length : range. count) )
69
69
}
70
70
}
71
71
@@ -97,7 +97,7 @@ public func MTLCopyAllDevicesWithObserver(handler: @escaping MTLDeviceNotificati
97
97
extension MTLFunctionConstantValues {
98
98
99
99
public func setConstantValues( _ values: UnsafeRawPointer , type: MTLDataType , range: Range < Int > ) {
100
- __setConstantValues ( values, type: type, with: NSMakeRange ( range. lowerBound, range. count) )
100
+ __setConstantValues ( values, type: type, with: NSRange ( location : range. lowerBound, length : range. count) )
101
101
}
102
102
103
103
}
@@ -107,15 +107,15 @@ extension MTLFunctionConstantValues {
107
107
extension MTLArgumentEncoder {
108
108
109
109
public func setBuffers( _ buffers: [ MTLBuffer ? ] , offsets: [ Int ] , range: Range < Int > ) {
110
- __setBuffers ( buffers, offsets: offsets, with: NSMakeRange ( range. lowerBound, range. count) )
110
+ __setBuffers ( buffers, offsets: offsets, with: NSRange ( location : range. lowerBound, length : range. count) )
111
111
}
112
112
113
113
public func setTextures( _ textures: [ MTLTexture ? ] , range: Range < Int > ) {
114
- __setTextures ( textures, with: NSMakeRange ( range. lowerBound, range. count) )
114
+ __setTextures ( textures, with: NSRange ( location : range. lowerBound, length : range. count) )
115
115
}
116
116
117
117
public func setSamplerStates( _ samplers: [ MTLSamplerState ? ] , range: Range < Int > ) {
118
- __setSamplerStates ( samplers, with: NSMakeRange ( range. lowerBound, range. count) )
118
+ __setSamplerStates ( samplers, with: NSRange ( location : range. lowerBound, length : range. count) )
119
119
}
120
120
}
121
121
@@ -146,57 +146,57 @@ extension MTLRenderCommandEncoder {
146
146
#endif
147
147
148
148
public func setVertexBuffers( _ buffers: [ MTLBuffer ? ] , offsets: [ Int ] , range: Range < Int > ) {
149
- __setVertexBuffers ( buffers, offsets: offsets, with: NSMakeRange ( range. lowerBound, range. count) )
149
+ __setVertexBuffers ( buffers, offsets: offsets, with: NSRange ( location : range. lowerBound, length : range. count) )
150
150
}
151
151
152
152
public func setVertexTextures( _ textures: [ MTLTexture ? ] , range: Range < Int > ) {
153
- __setVertexTextures ( textures, with: NSMakeRange ( range. lowerBound, range. count) )
153
+ __setVertexTextures ( textures, with: NSRange ( location : range. lowerBound, length : range. count) )
154
154
}
155
155
156
156
public func setVertexSamplerStates( _ samplers: [ MTLSamplerState ? ] , range: Range < Int > ) {
157
- __setVertexSamplerStates ( samplers, with: NSMakeRange ( range. lowerBound, range. count) )
157
+ __setVertexSamplerStates ( samplers, with: NSRange ( location : range. lowerBound, length : range. count) )
158
158
}
159
159
160
160
public func setVertexSamplerStates( _ samplers: [ MTLSamplerState ? ] , lodMinClamps: [ Float ] , lodMaxClamps: [ Float ] , range: Range < Int > ) {
161
- __setVertexSamplerStates ( samplers, lodMinClamps: lodMinClamps, lodMaxClamps: lodMaxClamps, with: NSMakeRange ( range. lowerBound, range. count) )
161
+ __setVertexSamplerStates ( samplers, lodMinClamps: lodMinClamps, lodMaxClamps: lodMaxClamps, with: NSRange ( location : range. lowerBound, length : range. count) )
162
162
}
163
163
164
164
public func setFragmentBuffers( _ buffers: [ MTLBuffer ? ] , offsets: [ Int ] , range: Range < Int > ) {
165
- __setFragmentBuffers ( buffers, offsets: offsets, with: NSMakeRange ( range. lowerBound, range. count) )
165
+ __setFragmentBuffers ( buffers, offsets: offsets, with: NSRange ( location : range. lowerBound, length : range. count) )
166
166
}
167
167
168
168
public func setFragmentTextures( _ textures: [ MTLTexture ? ] , range: Range < Int > ) {
169
- __setFragmentTextures ( textures, with: NSMakeRange ( range. lowerBound, range. count) )
169
+ __setFragmentTextures ( textures, with: NSRange ( location : range. lowerBound, length : range. count) )
170
170
}
171
171
172
172
public func setFragmentSamplerStates( _ samplers: [ MTLSamplerState ? ] , range: Range < Int > ) {
173
- __setFragmentSamplerStates ( samplers, with: NSMakeRange ( range. lowerBound, range. count) )
173
+ __setFragmentSamplerStates ( samplers, with: NSRange ( location : range. lowerBound, length : range. count) )
174
174
}
175
175
176
176
public func setFragmentSamplerStates( _ samplers: [ MTLSamplerState ? ] , lodMinClamps: [ Float ] , lodMaxClamps: [ Float ] , range: Range < Int > ) {
177
- __setFragmentSamplerStates ( samplers, lodMinClamps: lodMinClamps, lodMaxClamps: lodMaxClamps, with: NSMakeRange ( range. lowerBound, range. count) )
177
+ __setFragmentSamplerStates ( samplers, lodMinClamps: lodMinClamps, lodMaxClamps: lodMaxClamps, with: NSRange ( location : range. lowerBound, length : range. count) )
178
178
}
179
179
180
180
#if os(iOS)
181
181
182
182
@available ( iOS 11 . 0 , * )
183
183
public func setTileBuffers( _ buffers: [ MTLBuffer ? ] , offsets: [ Int ] , range: Range < Int > ) {
184
- __setTileBuffers ( buffers, offsets: offsets, with: NSMakeRange ( range. lowerBound, range. count) )
184
+ __setTileBuffers ( buffers, offsets: offsets, with: NSRange ( location : range. lowerBound, length : range. count) )
185
185
}
186
186
187
187
@available ( iOS 11 . 0 , * )
188
188
public func setTileTextures( _ textures: [ MTLTexture ? ] , range: Range < Int > ) {
189
- __setTileTextures ( textures, with: NSMakeRange ( range. lowerBound, range. count) )
189
+ __setTileTextures ( textures, with: NSRange ( location : range. lowerBound, length : range. count) )
190
190
}
191
191
192
192
@available ( iOS 11 . 0 , * )
193
193
public func setTileSamplerStates( _ samplers: [ MTLSamplerState ? ] , range: Range < Int > ) {
194
- __setTileSamplerStates ( samplers, with: NSMakeRange ( range. lowerBound, range. count) )
194
+ __setTileSamplerStates ( samplers, with: NSRange ( location : range. lowerBound, length : range. count) )
195
195
}
196
196
197
197
@available ( iOS 11 . 0 , * )
198
198
public func setTileSamplerStates( _ samplers: [ MTLSamplerState ? ] , lodMinClamps: [ Float ] , lodMaxClamps: [ Float ] , range: Range < Int > ) {
199
- __setTileSamplerStates ( samplers, lodMinClamps: lodMinClamps, lodMaxClamps: lodMaxClamps, with: NSMakeRange ( range. lowerBound, range. count) )
199
+ __setTileSamplerStates ( samplers, lodMinClamps: lodMinClamps, lodMaxClamps: lodMaxClamps, with: NSRange ( location : range. lowerBound, length : range. count) )
200
200
}
201
201
#endif
202
202
}
@@ -226,6 +226,6 @@ extension MTLTexture {
226
226
227
227
@available ( macOS 10 . 11 , iOS 9 . 0 , tvOS 9 . 0 , * )
228
228
public func makeTextureView( pixelFormat: MTLPixelFormat , textureType: MTLTextureType , levels levelRange: Range < Int > , slices sliceRange: Range < Int > ) -> MTLTexture ? {
229
- return __newTextureView ( with: pixelFormat, textureType: textureType, levels: NSMakeRange ( levelRange. lowerBound, levelRange. count) , slices: NSMakeRange ( sliceRange. lowerBound, sliceRange. count) )
229
+ return __newTextureView ( with: pixelFormat, textureType: textureType, levels: NSRange ( location : levelRange. lowerBound, length : levelRange. count) , slices: NSRange ( location : sliceRange. lowerBound, length : sliceRange. count) )
230
230
}
231
231
}
0 commit comments