Jump to content
  • Advertisement

Jason Smith

  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Jason Smith

  • Rank

Personal Information

  • Interests
  1. Hey Soldier, that seems to be it. Thank you. After seeing your post I was able to find the following references for anyone interested that is having this problem. Just Let It Flow Stack Overflow Not using C would be the easy solution but that means using the garbage that is C++.
  2. Hey MJP thanks for the reply. The snippet in the original post was just made as simple as possible to illustrate the problem that is occurring in a larger project. Just to be sure though I tried all these in the simple app as well. Multiple descriptors in the heap doesn't change anything. Enabling the debug layer give no additional information. Here is the relevant disassembly: D3D12_CPU_DESCRIPTOR_HANDLE rtv = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rtv_heap); mov rax,qword ptr [rtv_heap (07FF721616410h)] mov rax,qword ptr [rax] mov rcx,qword ptr [rtv_heap (07FF721616410h)] call qword ptr [rax+48h] NDebug::CDescriptorHeap::GetCPUDescriptorHandleForHeapStart: mov rax,qword ptr [rcx+0E8h] mov qword ptr [rdx],rax // This is were exception is thrown Exception thrown at 0x00007FFCCF77FCF7 (d3d12SDKLayers.dll) in win32_fw_init.exe: 0xC0000005: Access violation writing location 0x00007FFCD843ED90.
  3. S_OK for all HRESULTs
  4. While working on a project using D3D12 I was getting an exception being thrown while trying to get a D3D12_CPU_DESCRIPTOR_HANDLE. The project is using plain C so it uses the COBJMACROS. The following application replicates the problem happening in the project. #define COBJMACROS #pragma warning(push, 3) #include <Windows.h> #include <d3d12.h> #include <dxgi1_4.h> #pragma warning(pop) IDXGIFactory4 *factory; ID3D12Device *device; ID3D12DescriptorHeap *rtv_heap; int WINAPI wWinMain(HINSTANCE hinst, HINSTANCE pinst, PWSTR cline, int cshow) { (hinst), (pinst), (cline), (cshow); HRESULT hr = CreateDXGIFactory1(&IID_IDXGIFactory4, (void **)&factory); hr = D3D12CreateDevice(0, D3D_FEATURE_LEVEL_11_0, &IID_ID3D12Device, &device); D3D12_DESCRIPTOR_HEAP_DESC desc; desc.NumDescriptors = 1; desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV; desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE; desc.NodeMask = 0; hr = ID3D12Device_CreateDescriptorHeap(device, &desc, &IID_ID3D12DescriptorHeap, (void **)&rtv_heap); D3D12_CPU_DESCRIPTOR_HANDLE rtv = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rtv_heap); (rtv); } The call to ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart throws an exception. Stepping into the disassembly for ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart show that the error occurs on the instruction mov qword ptr [rdx],rax which seems odd since rdx doesn't appear to be used. Any help would be greatly appreciated. Thank you.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!