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
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,16 @@ private void Initialize()

ColorPixelFormat = MTLPixelFormat.BGRA8Unorm;
DepthStencilPixelFormat = MTLPixelFormat.Depth32Float_Stencil8;
SampleCount = 1;
if (DeviceInfo.Current.DeviceType == DeviceType.Virtual)
{
DepthStencilStorageMode = MTLStorageMode.Private;
SampleCount = 4;
}
else
{
DepthStencilStorageMode = MTLStorageMode.Shared;
SampleCount = 2;
}
FramebufferOnly = false;
Device = device;
backendContext = new GRMtlBackendContext
Expand Down