Blue/Garbled Textures in Metal on iMac running Mojave

I have a strange problem affecting two iMacs (Retina 5K, 27", late 2014) running MacOS Mojave 10.14.6.

After the compture has been running for a while, some textures can either appear pure blue (i.e. #0000ffff) or become garbled in other ways. While I don't have physical access to the affected computers, I do have GPU trace from one that confirms that the texture data itself is definitely the problem. The affected textures are all loaded from disk via CGImage.

Not all textures are affected, and those that are do not always show this behaviour--it appears to be specific to certain situations. Reloading the affected textures will sometimes correct it.

Rebooting the computer seems to temporarily fix the problem, which suggests this may be an issue with the video driver or GPU.

This doesn't seem to affect any of our other Macs, including my 2020 Macbook Pro 13" (Big Sur) and 2012 Macbook Air (Catalina).

Any thoughts on what could cause this, or suggestions on how to investigate further?

I'd like to clarify that restarting the application does not fix the problem--only a full computer reboot does.

Would you post a Feedback Assistant for this problem? Also, when you re-open your GPU trace, does the problem sometimes re-occur. It would also be helpful to know the context of what you were trying to do. For example, is this a program you wrote or is this an app that is experiencing this problem?

This is for a game under development.

I can't reproduce the problem on either of my own Macs, but when opening a GPU trace made on one of the affected machines I clearly see that two textures (of ~50) are wrong (one is blue, the other corrupted).

The two textures in question (as well as most others) are PNGs loaded via CGImage, copied to an intermediate MTLStorageModeManaged texture, then blitted to a MTLStorageModePrivate texture. Since I don't have physical access to the machine I haven't (yet) been able to narrow down where in this process the texture data becomes corrupted.

Comparing a GPU trace of the same scene made on my machine I can tell the texture sizes and formats are correct--only the pixel data is wrong.

I'll send off a Feedback Assistant post shortly.

The feeback assistant bug was closed since it's only affecting Mojave. https://feedbackassistant.apple.com/feedback/9462633

Blue/Garbled Textures in Metal on iMac running Mojave
 
 
Q