Red Pattern on Intel MacBook Pro 13" (2020) With RGBA8 Color Buffer

I'm seeing a strange rendering glitch with Metal rendering on (at least) two laptops, both are Intel MacBook Pro 13" 2020 with 4 Thunderbolt ports (my own is the i7 model). Thus far this is the only Mac model we've seen the issue on.

The glitch results in a single-frame red pattern (see the attached image), but only when running full screen on the laptop display. It does not show when running in a window or in full screen on an external display. Even having an external display attached seems to prevent the problem.

The glitch typically appears on frames where we do little to no rendering beyond clearing the color buffer, however I've been unable to isolate the glitch in a test application.

The glitch also only happens when using the MTLPixelFormatRGBA8Unorm pixel format for the colour buffer. Switching to MTLPixelFormatRGBA16Float prevents it from happening.

I've played around with the load/store states on the colour buffer, with various clear values, all with no success.

Furthermore, I've managed to inspect the frame in a Metal GPU capture, and the color buffer in the capture is correct (cleared to black) even though the contents of the view are glitched. This leads me to think the problem may be in the CA compositing step, rather than in the Metal rendering itself.

Any suggestions?

Red Pattern on Intel MacBook Pro 13" (2020) With RGBA8 Color Buffer
 
 
Q