I am using Texture Sharing between OpenGL and DirectX via the NV_DX_interop extension, and this kills the Radeon driver.
A call to 'wglDXUnregisterObjectNV()' in the library leads to an access violation in atio6axx.dll, both in DirectX9 and DirectX11 mode.
The call stack looks like this:
> mini_spout.exe!spoutGLDXinterop::CreateDX11interop(unsigned int width, unsigned int height, unsigned long dwFormat, bool bReceive) Line 999 C++
mini_spout.exe!spoutGLDXinterop::CreateInterop(HWND__ * hWnd, const char * sendername, unsigned int width, unsigned int height, unsigned long dwFormat, bool bReceive) Line 774 C++
mini_spout.exe!Spout::UpdateSender(const char * sendername, unsigned int width, unsigned int height) Line 248 C++
mini_spout.exe!SpoutSender::UpdateSender(const char * name, unsigned int width, unsigned int height) Line 80 C++
mini_spout.exe!ImageShareData::updateTextureDimensions(const int fbWidth, const int fbHeight) Line 133 C++
mini_spout.exe!main() Line 313 C++
I am certain this is an AMD Driver issue because my application works on NVIDIA GPUs without errors.
I am attaching a minimal example for a use case of GL-DX interop via Spout2. After configuring and building a Visual Studio Win64 Solution using CMake, in 'mini_spout_amd\src\main.cpp' from line 258 one can configure different DX 9/11 and GPU/CPU Texture Sharing modes of the Spout2 Library. While CPU Texture Sharing works as expected, the GPU mode using the GL-DX interop kills the AMD driver.
The Spout SDK comes with Demo executables for a Spout Texture Sender and Receiver (in "Spout2\DEMO\SpoutSender.exe").
These example applications function without error. The reason for this is probably this: my application resizes the shared texture, for which Spout unregisters the existing DX interop object, and this is where the crash happens in the call stack ("Spout::UpdateSender" -> "CreateDX11interop" -> "wglDXUnregisterObjectNV"), while the example Sender never changes the textures resolution, and thus does not run into the error.
I am using a Radeon Pro SSG with Radeon Pro 18.Q4 driver. I also have confirmation that this bug occurs on AMD Radeon Vega 8 Graphics using Adrenalin 18.10.1.
Visualization Research Center (VISUS)
University of Stuttgart