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?

Replies

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.

  • If you posted a Feedback Assistant, would you put a link to it here please?

  • Did you find the cause of this issue? I am seeing it randomly on textures I am generating internally (for bitmap fonts) on an MacBook Pro with an M1 Pro. I assume it's an issue with the blitting of the intermediate buffer to the texture; what's strange is the randomness though... the blitting code is pretty mature and this doesn't happen with images loaded via libpng.

Add a Comment

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