AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
25.26k stars 2.19k forks source link

[Intel] [OpenGL]Unable to initialize ANGLE-based rendering with DirectX 11 #12738

Open KobozevDV opened 1 year ago

KobozevDV commented 1 year ago

Running the application with a small amount of free RAM less than 1 GB leads to the error below.

[[OpenGL]Unable to initialize ANGLE-based rendering with DirectX 11 : 'System.OutOfMemoryException: Insufficient memory to continue the execution of the program. at Avalonia.Win32.DirectX.DirectX Unmanaged Methods.D3D11CreateDevice(IntPtr adapter, D3D_DRIVER_TYPE Driver Type, IntPtr Software, UInt32 Flags, D3D_FEATURE_LEVEL[] pFeatureLevels, UInt32 FeatureLevels, UInt32 SDKVersion, IntPtr& ppDevice, D3D_FEATURELEVEL& pFeatureLevel, IntPtr* ppImmediateContext) at Avalonia.Win32.OpenGl.Angle.AngleWin32EglDisplay.CreateD3D11Display(Win32AngleEglInterface egl, Boolean preferDiscreteAdapter) in //src/Windows/Avalonia.Win32/OpenGl/Angle/AngleWin32EglDisplay.cs:line 96 at Avalonia.Win32.OpenGl.Angle.Angle Win32 Platform Graphics.TryCreate(Angle Options options) in /_/src/Windows/Avalonia.Win32/OpenGl/Angle/AngleWin32PlatformGraphics.cs:line 101'

To reproduce. Сreate an mvvm or xplat project. Add a ComboBox and set RequestedThemeVariant="Dark".

Expected result image

Actual result image_2023-08-30_17-10-26

Screenshots from the Avalonia Samples ControlCatalog.NETCore project

maxkatz6 commented 1 year ago

After discussion in chat, it might be related to Intel Arc A380 drivers. If anybody with the same GPU can reproduce this issue too, please let us know.