diff --git a/tests/D3D12/main.cpp b/tests/D3D12/main.cpp index c51e7564..d02303b1 100644 --- a/tests/D3D12/main.cpp +++ b/tests/D3D12/main.cpp @@ -319,15 +319,11 @@ bool InitD3D12(HWND inHWND, int inWidth, int inHeight) { gDepthStencil.InitializeDepthStencil(device, inWidth, inHeight); - D3D12_DESCRIPTOR_HEAP_DESC d3dDescriptorHeapDescRTV = {}; - d3dDescriptorHeapDescRTV.NumDescriptors = 2; - d3dDescriptorHeapDescRTV.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV; + D3D12_DESCRIPTOR_HEAP_DESC d3dDescriptorHeapDescRTV = XCEngine::RHI::D3D12DescriptorHeap::CreateDesc(XCEngine::RHI::DescriptorHeapType::RTV, 2); gSwapChainRTVHeap.Initialize(device, XCEngine::RHI::DescriptorHeapType::RTV, 2); gRTVDescriptorSize = gD3D12Device.GetDescriptorHandleIncrementSize(XCEngine::RHI::DescriptorHeapType::RTV); - D3D12_DESCRIPTOR_HEAP_DESC d3dDescriptorHeapDescDSV = {}; - d3dDescriptorHeapDescDSV.NumDescriptors = 1; - d3dDescriptorHeapDescDSV.Type = D3D12_DESCRIPTOR_HEAP_TYPE_DSV; + D3D12_DESCRIPTOR_HEAP_DESC d3dDescriptorHeapDescDSV = XCEngine::RHI::D3D12DescriptorHeap::CreateDesc(XCEngine::RHI::DescriptorHeapType::DSV, 1); gSwapChainDSVHeap.Initialize(device, XCEngine::RHI::DescriptorHeapType::DSV, 1); gDSVDescriptorSize = gD3D12Device.GetDescriptorHandleIncrementSize(XCEngine::RHI::DescriptorHeapType::DSV);