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

Fix iOS Simulator performance with Metal #3149

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

taublast
Copy link
Contributor

@taublast taublast commented Jan 30, 2025

Had iOS simulator lagging on M1 at 9 fps with SKGLView, so had to adjust its platform-related code for iOS to unlock 60 fps.
Just followed Apple guidelines for simulator: https://developer.apple.com/documentation/metal/developing-metal-apps-that-run-in-simulator?language=objc

replacing SampleCount = 1; (no MSAA) inside SKMetalView with:

			if (DeviceInfo.Current.DeviceType == DeviceType.Virtual)
			{
				DepthStencilStorageMode = MTLStorageMode.Private;
				SampleCount = 4;
			}
			else
			{
				DepthStencilStorageMode = MTLStorageMode.Shared;
				SampleCount = 2;
			}

Works fine in DrawnUi now, wanted to share.

Copy link
Contributor

Hey there @taublast! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@mattleibow
Copy link
Contributor

/azp run

Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants