# ID3D12Device::CreateDescriptorHeap driver bug?

**URL:** <https://forums.developer.nvidia.com/t/id3d12device-createdescriptorheap-driver-bug/42167>\
**Category:** DirectX, DXR, DirectCompute\
**Created:** [April 6, 2016, 10:19am UTC](https://forums.developer.nvidia.com/t/id3d12device-createdescriptorheap-driver-bug/42167 "2016-04-06T10:19:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lore91](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lore91](https://forums.developer.nvidia.com/u/Lore91)\
**Post date:** [April 6, 2016, 10:19am UTC](https://forums.developer.nvidia.com/t/id3d12device-createdescriptorheap-driver-bug/42167/1 "2016-04-06T10:19:47Z")

</div>

Hello,  
I’m developing a Direct3D 12 application and the method ID3D12Device::CreateDescriptorHeap triggers an access violation when creating more than one descriptor heap of type D3D12\_DESCRIPTOR\_HEAP\_TYPE\_RTV or D3D12\_DESCRIPTOR\_HEAP\_TYPE\_DSV.  
The error message looks like this:  
Exception thrown at 0x00007FF8BA5C1548 (nvwgf2umx.dll) in App.exe: 0xC0000005: Access violation reading location 0x000000809D10B050.  
Edit: I have a GeForce GTX 970 with the latest driver installed (364.72) on Windows 10 64-bit

---

<div class="post-metadata">

**Author:** ![TomVeltmeijer](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@TomVeltmeijer](https://forums.developer.nvidia.com/u/TomVeltmeijer)\
**Post date:** [April 8, 2016, 7:46am UTC](https://forums.developer.nvidia.com/t/id3d12device-createdescriptorheap-driver-bug/42167/2 "2016-04-08T07:46:00Z")

</div>

Hi,  
I have the same setup and I have no problems creating multiple RTV and DSV heaps. Is it the second call to CreateDescriptorHeap() that triggers the access violation? Did you check the debug layer for any warnings or errors?  
Also, if you think you’re experiencing a driver bug, you could try running DX12 on the WARP device.

---

<div class="post-metadata">

**Author:** ![Lore91](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lore91](https://forums.developer.nvidia.com/u/Lore91)\
**Post date:** [April 12, 2016, 8:55am UTC](https://forums.developer.nvidia.com/t/id3d12device-createdescriptorheap-driver-bug/42167/3 "2016-04-12T08:55:15Z")

</div>

Hi,  
sorry for the late reply, I though I would have received an email if someone replied.  
The debug layer was active and didn’t issue any warning or error. As you suggested, I tried running on the WARP device and the call succeeded but the debug layer started to complain: “OMSetRenderTargets: Specified descriptor handle ptr=0x0000002B723A23C0 points to a descriptor heap type that is CPU write only, so reading it is invalid. pDepthStencilDescriptor is the issue”. Then, googling the error I found this thread on [gamedev.net](http://gamedev.net): [[D3D12] ClearUnorderedAccessViewFloat fails - Graphics and GPU Programming - GameDev.net](http://www.gamedev.net/topic/672063-d3d12-clearunorderedaccessviewfloat-fails/) where I discovered that a RTV or DSV descriptor heap cannot be, obviously, shader visible like I was incorrectly trying to create it.  
But I would expect a debug layer warning with a E\_FAIL return value and not an access violation. So, there is a driver bug, right?  
Thank you very much for your help.

---

<div class="post-metadata">

**Author:** ![TomVeltmeijer](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@TomVeltmeijer](https://forums.developer.nvidia.com/u/TomVeltmeijer)\
**Post date:** [April 13, 2016, 8:17am UTC](https://forums.developer.nvidia.com/t/id3d12device-createdescriptorheap-driver-bug/42167/4 "2016-04-13T08:17:03Z")

</div>

That is very strange, indeed. If I try creating a shader-visible RTV heap I get the same results as you:

- Running normally: Access violation in CreateDescriptorHeap().
- Running on WARP: CreateDescriptorHeap() returns S\_OK and OMSetRenderTargets() throws a debug layer error.

I have the exact same setup as you (Win10 x64 / GTX 970 / 364.72), so I don’t know which component is failing us here, but I agree with you that CreateDescriptorHeap() should just detect invalid combinations of arguments and return the correct HRESULT.

PS: There’s a checkbox to receive email notifications right above the Reply button at the bottom of the page.

---

<div class="post-metadata">

**Author:** ![Lore91](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lore91](https://forums.developer.nvidia.com/u/Lore91)\
**Post date:** [April 22, 2016, 2:55pm UTC](https://forums.developer.nvidia.com/t/id3d12device-createdescriptorheap-driver-bug/42167/5 "2016-04-22T14:55:44Z")

</div>

Thank you very much for your response. This is clearly a bug that we should report, but I don’t know how to do it.

PS: I’m replying very late again and I apologize, again.
