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 #3156

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

taublast
Copy link
Contributor

@taublast taublast commented Feb 6, 2025

This comes from a new synced branch.

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.

@taublast taublast closed this Feb 6, 2025
@taublast taublast deleted the synched branch February 6, 2025 07:12
@taublast taublast restored the synched branch February 6, 2025 07:13
@taublast taublast reopened this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant