Skip to content

Commit cfa3890

Browse files
committed
disable vulkan on mac
1 parent b2ed00d commit cfa3890

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/Avalonia.RenderTests/Mesa/MesaSoftwareRenderer.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ internal static unsafe class MesaSoftwareRenderer
1919
public static bool GlEnabled { get; } =
2020
Environment.GetEnvironmentVariable("AVALONIA_RENDER_TESTS_DISABLE_MESA_GL") != "1";
2121

22+
// macOS libSkiaSharp is built without Vulkan support
2223
public static bool VulkanEnabled { get; } =
23-
Environment.GetEnvironmentVariable("AVALONIA_RENDER_TESTS_DISABLE_MESA_VULKAN") != "1";
24+
!OperatingSystem.IsMacOS()
25+
&& Environment.GetEnvironmentVariable("AVALONIA_RENDER_TESTS_DISABLE_MESA_VULKAN") != "1";
2426

2527
private static readonly Lazy<IntPtr> s_library = new(() =>
2628
NativeLibrary.Load("softmesa", typeof(MesaSoftwareRenderer).Assembly, null));
@@ -58,6 +60,7 @@ private static EglPlatformGraphics CreateGl()
5860
SupportsMultipleContexts = true,
5961
SupportsContextSharing = true,
6062
AllowPbufferOnlyConfigs = true,
63+
// macOS libSkiaSharp is built with skia_gl_standard="gl" and can't consume GLES contexts
6164
GlVersions = OperatingSystem.IsMacOS()
6265
? new[]
6366
{

0 commit comments

Comments
 (0)