Hello.
I’ve run into a challenging issue while implementing DirectX11-OpenGL interoperability, and was hoping to get some advice.
Objective:
My goal is to use the WGL_NV_DX_Interop2
extension to use a texture rendered in OpenGL directly within DirectX11, without any additional memory copies.
The Problem:
Despite using the exact same code, the result from glCheckFramebufferStatus
changes depending on which GPU is active.
System Environment:
OS: Win11 x64 24H2 (Build Version: 26100.4652) Intel GPU: Intel(R) Iris(R) Xe Graphics (Core i9-13900H CPU) NVIDIA GPU: NVIDIA GeForce RTX 4070 Laptop GPU NVIDIA Driver Version: 577.00
1. Success Case (Intel(R) Iris(R) Xe Graphics
GPU):
- When the application runs on the default Intel GPU, the entire process works perfectly.
(A rotating RGB triangle is displayed, as shown below:)
2. Failure Case (NVIDIA GeForce RTX 4070
Laptop GPU):
- I’ve forced the application to use my discrete RTX 4070 Laptop GPU via
NvOptimusEnablement
. - In this case, after attaching the shared DirectX interop texture to the OpenGL Framebuffer,
glCheckFramebufferStatus
returnsGL_FRAMEBUFFER_UNSUPPORTED (0x8CDD)
.
My Question:
Is this likely a logical error in my code? Or is it possible that support for the WGL_NV_DX_Interop2
extension has changed, or that there’s a known compatibility issue with modern NVIDIA GPUs and their drivers?
A minimal, reproducible example is attached below for testing.
I would greatly appreciate any advice, especially if you have had a similar experience or have ideas for a solution.
Thank you!