Use emulator mode together with Direct3D interop

I just realized that all SDK samples which use D3D interop miss the EmuDebug / EmuRelease configurations.

I.e. the fluidsGL sample works fine in emulator mode, while the fluidsD3D9 misses the emulator option.

Testing the device emulator mode (-deviceemu -D_DEVICEEMU) with the the D3D samples always results in errors (either at cudaD3D9SetDirect3DDevice() or at cudaD3D9RegisterResource(), same with D3D10 versions).

In the Programming Guide in section “Direct3D Interoperability” I found the passage “A CUDA context may interoperate with only one Direct3D device at a time and the CUDA context and Direct3D device must be created on the same GPU.” (nothing similar in the “OpenGL Interoperability” section).

It is possilble to use device emulation to debug CUDA kernels in applications that use OpenGL as render backend.
Why doesn’t this work for Direct3D?

Is there some workaround for using emulation mode together with Direct3D (bypass SetDirect3DDevice / map resources by hand / etc)?

I’m also needing to use D3D interop and emulation mode concurrently, have you found anything on this?

  • JG