* Create the RTV descriptor heap. */
| 398 | * Create the RTV descriptor heap. |
| 399 | */ |
| 400 | void CreateDescriptorHeaps(D3D12Global &d3d, D3D12Resources &resources) |
| 401 | { |
| 402 | // Describe the RTV descriptor heap |
| 403 | D3D12_DESCRIPTOR_HEAP_DESC rtvDesc = {}; |
| 404 | rtvDesc.NumDescriptors = 2; |
| 405 | rtvDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV; |
| 406 | rtvDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE; |
| 407 | |
| 408 | // Create the RTV heap |
| 409 | HRESULT hr = d3d.device->CreateDescriptorHeap(&rtvDesc, IID_PPV_ARGS(&resources.rtvHeap)); |
| 410 | Utils::Validate(hr, L"Error: failed to create RTV descriptor heap!"); |
| 411 | #if NAME_D3D_RESOURCES |
| 412 | resources.rtvHeap->SetName(L"RTV Descriptor Heap"); |
| 413 | #endif |
| 414 | |
| 415 | resources.rtvDescSize = d3d.device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); |
| 416 | } |
| 417 | |
| 418 | /** |
| 419 | * Update the constant buffer with raytracing data. |
no test coverage detected