Post

Replies

Boosts

Views

Activity

Metal Performance shader problem setting MPSNNCropAndResizeBilinear filter
Hi I'm trying to set a MPSNNCropAndResizeBilinear metal performance shader and am having trouble with how to set the regions: parameter. Here's where I'm having the difficulty internalMPSNNCropAndResize = MPSNNCropAndResizeBilinear(device: sharedMetalRenderingDevice.device, resizeWidth: Int(cropSize.width), resizeHeight: Int(cropSize.height), numberOfRegions: 1, regions: UnsafePointer<MPSRegion>(??What to put here???) I've tried MPSOrigin(x: 0.0, y: 0.0, z: 0.0), MPSSize(width: 1920.0, height: 1080.0, depth: 0.0) but the warning I'm getting is Cannot convert value of type 'MPSOrigin' to expected argument type 'Builtin.RawPointer' This is the first time I've encountered the need to use a Builtin.RawPointer type ( yes I'm a newbie in deeper than my ability) , can anyone point me in the right direction or provide a code example of setting this parameter. Thanks in advance.
0
0
430
Aug ’20