# Driver crashes when interoperating with D3D render target texture

**URL:** <https://forums.developer.nvidia.com/t/driver-crashes-when-interoperating-with-d3d-render-target-texture/7703>\
**Category:** CUDA Programming and Performance\
**Created:** [February 10, 2009, 9:45am UTC](https://forums.developer.nvidia.com/t/driver-crashes-when-interoperating-with-d3d-render-target-texture/7703 "2009-02-10T09:45:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dancercl](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dancercl](https://forums.developer.nvidia.com/u/dancercl)\
**Post date:** [February 10, 2009, 9:45am UTC](https://forums.developer.nvidia.com/t/driver-crashes-when-interoperating-with-d3d-render-target-texture/7703/1 "2009-02-10T09:45:58Z")

</div>

hello everyone,

Today I upgraded CUDA from 2.0 to 2.1 release, as well as the driver from 178.24 to 181.20,

rebuild my exising app and run, but then I found the whole system went lagggging badly, look like a driver crash.

So I wrote a test to narrow it down, the crash occurred in the invoking of cudaD3D9UnmapResources() of a D3D9 render target texture, more specific, a D3DFMT\_A8R8G8B8 render target texture, common textures (created with D3DUSAGE set to 0) and other format like D3DFMT\_A16B16G16R16F will not trigger the issue.

Here is some snippet extracted from the test code, rather simple:

```auto
1	mDevice->CreateTexture(1920, 1080, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &mTexture, NULL);

2	cudaD3D9SetDirect3DDevice(mDevice);

3	cudaD3D9RegisterResource(mTexture, cudaD3D9RegisterFlagsNone);

4	cudaD3D9MapResources(1, (IDirect3DResource9**)&mTexture);

5	cudaD3D9UnmapResources(1, (IDirect3DResource9**)&mTexture);

```

when running to the 5th line, the issue will be reproduced, and this applies to the driver API working in a host multithreaded env too.

Is this a driver bug or I misused something??? Any help will be appreciated.

and here is my system configuration:

System: Intel Core2 E6300 1.8Ghz, 2GB RAM, WinXP with all latest service packs installed

GPUs: GTX280 x1

CUDA version: CUDA 2.1 release toolkit and SDK

Driver version: 181.2x (181.20 and 181.22 will both repro the issue)

Compiler: Visual studio 2005 with sp1

---

<div class="post-metadata">

**Author:** ![ToneR](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ToneR](https://forums.developer.nvidia.com/u/ToneR)\
**Post date:** [March 20, 2009, 9:17am UTC](https://forums.developer.nvidia.com/t/driver-crashes-when-interoperating-with-d3d-render-target-texture/7703/2 "2009-03-20T09:17:37Z")

</div>

I have the same problem. Is there any solution for it ??? Use CUDA 2.1 and Latest Drivers 182.08

---

<div class="post-metadata">

**Author:** ![dancercl](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dancercl](https://forums.developer.nvidia.com/u/dancercl)\
**Post date:** [May 14, 2009, 7:55am UTC](https://forums.developer.nvidia.com/t/driver-crashes-when-interoperating-with-d3d-render-target-texture/7703/3 "2009-05-14T07:55:29Z")

</div>

> [@](#):
>
> I have the same problem. Is there any solution for it ??? Use CUDA 2.1 and Latest Drivers 182.08

this issue still exists in CUDA2.2 release(with driver 185.85), looks like people from NVIDIA didn’t notice the problem at all.
