Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20623 Discussions

NV_DX_Interop causing memory leaks

Min
Beginner
720 Views

Hello, I'm a 3d developer in Golden Race (www.goldenrace.com)
We are using ffmpeg to decode videos in hardware and integrate as video textures in our engine implemented in OpenGL.
In linux we are using vaapi and it's working perfect!
In windows hardware video decoding is implemented with DXVA2 or D3D11 Video acceleration and we use NV_DX_interop to share textures to OpenGL.
Our product should run 24 hours 7 days a week without problems, displaying different videos every 5 minutes or so.
Ffmpeg creates a different DirectX device for every video instance, so we need to initialize NV_DX_Interop system multiple times calling wglDXOpenDeviceNV() for every DirectX device, but even doing properly device->Release() and wglDXCloseDeviceNV() there is memory leaks (~15Mb) for every call to wglDXOpenDeviceNV.
In other hardware (NVIDIA or ATI) this problem doesn't reproduce.

System Setup Information:
-----------------------------------------

System Used: Intel NUC6i3SYK and Intel NUCDC3217IYE
CPU SKU: i3-6100 @ 2.30Ghz, , i7-6700 @ 3.40Ghz
GPU SKU: Intel HD Graphics 520, Intel HD Graphics 4000, Intel HD Graphics 530
Processor Line: N/A
System BIOS Version: N/A
CMOS settings: N/A
Graphics Driver Version: 21.20.16.4534, 10.18.10.4425, 21.20.16.4542
GOP/VBIOS Version: N/A
Operating System: Windows
OS Version: tested in Windows 10 x64 and Windows 7 x64
API: OpenGL extension NV_DX_Interop
Occurs on non-Intel GPUs?: No, tested on NVIDIA an ATI and works properly

Steps to Reproduce:
-------------------------------
1. Launch the test program: NV_DX_interop_test.exe
2. It will open an empty window
3. Open the task manager and look for the NV_DX_interop_test.exe process
4. You can see that the memory is increasing very fast.

Expected Results:
-------------------------------
The program should stay using the same amount ot memory all the time, like happens in NVIDIA or ATI drivers.

Actual Results:
-------------------------------
The memory of the process will increase until 2Gb or more. This only happens in Intel Graphics.

Additional Information:
-------------------------------
The program I've written is the minimum example to show you that the function wglDXOpenDeviceNV() is leaking memory because there is some problem with reference counting in the ID3D11Device (also happens with IDirect3DDevice9).
You can test NV_DX_Interop and NV_DX_Interop2 with the macro _USE_DX11 that is commented in the code (line 14).

0 Kudos
1 Reply
Michael_C_Intel2
Employee
720 Views

Hi Benjamin, 

I have reported the issue and we will investigate further. 

-Michael 

0 Kudos
Reply