GLWpfControl: Intel Xe graphics driver does not support depth/stencil buffer in d3d9
As mentioned in #138, Intel integrated graphics does not support MSAA. After some experimentation on a newer machine, the newer integrated graphics also do not support the call to NativeCreateDepthStencilSurface in this call:
The example app crashes when switching to any tab with a GL control with an “INVALID ARGS” error.
Disabling the call to CreateDepthStencilSurface and checking for a null ptr in IDirect3DSurface9.Release fixes the issue, and the GL control renders properly.
On another, older machine running W10 + Intel i5-10400, the call does not throw an error BUT the depth buffer definitely does not work, and I have to create a new framebuffer + depth/stencil attachment for depth to be processed correctly.
From what I can gather, Intel no longer supports d3d9, and relies on D3D9On12 for the API. From what I can gather, the ball is out of Intel’s court on this one.
Likely workaround:
Only use d3d9 render target surface, and use the OpenGL API to set up a new “default” framebuffer. This breaks the convention of having depth enabled by default, but it will only effect Intel integrated graphics users.
Device specs:
Intel® Core™ i9-14900K Intel UHD Graphics 770 (31.0.101.4953) Windows 11 Pro
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 32 (11 by maintainers)
Update: After some back and forth, I’ve finally made contact with an engineer at Intel. I’ve been told that this issue has been opened with the Intel driver team.
They told me it’s internal case number 22020848268.
They want the ability to reproduce the issue with as “few layers as possible,” so I may need to write some example code for them in C++.
@NogginBops works for me!
Tested with an i9-14900K (UHD 770)
Good news, all:
Intel reached out and said they were able to root-cause the driver issue with their RENDERBUFFER registration. The public release of the fix is forthcoming.
The black screen in my case appears to be caused by
Wgl.DXRegisterObjectNVreturning a zero pointer when run on the Intel integrated graphics, but returning a valid pointer when run on NVIDIA graphics. It only causes theGL_INVALID_OPERATIONwhen theGLSharedColorRenderbufferHandleis then used in theGL.FramebufferRenderbuffercall.I have run into the same issue on my computer, and have narrowed it down to two specific commits. It’s definitely an issue with the Intel integrated graphics, as it works fine when using the dedicated NVIDIA graphics.
On version 4.3.3 it was crashing instantly, but I found it was working back in version 4.2.3. I went back through the commits and I found that it was running fine until this commit, at which point it just renders a black screen. I traced it down to this line in
GLWpfControlRenderer.cs, which results in aGL_INVALID_OPERATIONerror.If I proceed forward through the commits it is only at this commit that it starts to crash instantly with a
System.AccessViolationExceptionat this line:Hardware specs:
OS Name Microsoft Windows 11 Enterprise Processor Intel® Core™ Ultra 7 165H, 1400 Mhz, 16 Core(s), 22 Logical Processor(s)
Dedicated graphics Name NVIDIA RTX 500 Ada Generation Laptop GPU Driver Version 31.0.15.5305
Integrated graphics Name Intel® Arc™ Pro Graphics Adapter Type Intel® Arc™ Pro Graphics Family, Intel Corporation compatible Driver Version 32.0.101.6078