Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metal: example-01-helloworld corrupted render when MSAA is enabled #3228

Open
rogual opened this issue Dec 20, 2023 · 3 comments
Open

Metal: example-01-helloworld corrupted render when MSAA is enabled #3228

rogual opened this issue Dec 20, 2023 · 3 comments

Comments

@rogual
Copy link
Contributor

rogual commented Dec 20, 2023

Describe the bug
With MSAA on, the Hello World example renders with a bright pink background on my M2 Mac, and the imgui window disappears. Strangely enough, if I capture a frame with the Metal graphics debugger, it shows as normal in there. No errors are reported either.

To Reproduce
Steps to reproduce the behavior:

  1. Run Hello World example
  2. Press F8 to turn on MSAA

Expected behavior
The example should display as normal

Screenshots

Screenshot 2023-12-20 at 21 52 09 Screenshot 2023-12-20 at 21 55 37

Additional context
MacBook Pro
Apple M2 Max
OS: 13.5 (22G74)

Chipset Model: Apple M2 Max
Type: GPU
Bus: Built-In
Total Number of Cores: 30
Vendor: Apple (0x106b)
Metal Support: Metal 3

@rogual
Copy link
Contributor Author

rogual commented Dec 21, 2023

Screenshot 2023-12-21 at 09 24 32 Screenshot 2023-12-21 at 09 22 54

Hm, this is suspicious. That's a non-MSAA frame on the left, and MSAA (pink frame) on the right.

I notice the dependency between submit and blitRender is a dashed line in the MSAA frame, which means synchronization only (no data transfer). So the frame isn't being transferred between submit and blitRender passes? I hope I have that right.

@rogual
Copy link
Contributor Author

rogual commented Dec 21, 2023

Screenshot 2023-12-21 at 09 26 00

It looks like bgfx is storing to "Color 0 Resolve" in the submit pass, but trying to load from "Color 0" in the blitRender pass.

@ul
Copy link

ul commented Aug 7, 2024

Can confirm it's reproducible on a Mac mini with M1 and macOS 14.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants