render,framebuffer,black line

I am developping a vertex displacement function.

Which make a little adjust to a picture.

But a problem appears,sometimes,some pictures,some ios devices,you will see a black line in the frame.

The black line is only black when the MTLClearColor is black.

If the MTLClearColor is blue,it will be a blue line.

I am using a MTKView to display it.

Below is what the MTKView looks like

- (MTKView *)metalImageView {

if (_metalImageView == nil) {

_metalImageView = [MTKView new];

_metalImageView.framebufferOnly = YES;

_metalImageView.device = [FEMetalBaseComponents shareConst].gpuDevice;

_metalImageView.clearColor = [FEMetalBaseComponents shareConst].defaultClearColor;

_metalImageView.colorPixelFormat = MTLPixelFormatBGRA8Unorm;

_metalImageView.hidden = YES;

_metalImageView.paused = YES;

_metalImageView.enableSetNeedsDisplay = NO;

}

return _metalImageView;

}

I use a UISlider to control the change that function will make.

Render once,when a value changes.

I have looked the debug frame inspect view,found that input texture and vertexes are all correct,but the framebuffer gets the strange line.

I can debug all texels except ones in the black line in the fragment function.


Would you tell me what happened?

Would you tell me what the reason is?

Would you tell me how to fix it?


Steps to Reproduce:

repeat renderring


Expected Results:

no black line


Actual Results:

sometimes black line appears


Version/Build:

ios9~the latest version ios


Configuration:

just like apple demos.

I can show you a video.

black line is just at show left


I have also two videos

https://bugreport.apple.com/web/?problemID=51296010


It's a 30*40 mesh.