Refactor: use CreateDesc for DescriptorHeap
This commit is contained in:
@@ -319,15 +319,11 @@ bool InitD3D12(HWND inHWND, int inWidth, int inHeight) {
|
|||||||
|
|
||||||
gDepthStencil.InitializeDepthStencil(device, inWidth, inHeight);
|
gDepthStencil.InitializeDepthStencil(device, inWidth, inHeight);
|
||||||
|
|
||||||
D3D12_DESCRIPTOR_HEAP_DESC d3dDescriptorHeapDescRTV = {};
|
D3D12_DESCRIPTOR_HEAP_DESC d3dDescriptorHeapDescRTV = XCEngine::RHI::D3D12DescriptorHeap::CreateDesc(XCEngine::RHI::DescriptorHeapType::RTV, 2);
|
||||||
d3dDescriptorHeapDescRTV.NumDescriptors = 2;
|
|
||||||
d3dDescriptorHeapDescRTV.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV;
|
|
||||||
gSwapChainRTVHeap.Initialize(device, XCEngine::RHI::DescriptorHeapType::RTV, 2);
|
gSwapChainRTVHeap.Initialize(device, XCEngine::RHI::DescriptorHeapType::RTV, 2);
|
||||||
gRTVDescriptorSize = gD3D12Device.GetDescriptorHandleIncrementSize(XCEngine::RHI::DescriptorHeapType::RTV);
|
gRTVDescriptorSize = gD3D12Device.GetDescriptorHandleIncrementSize(XCEngine::RHI::DescriptorHeapType::RTV);
|
||||||
|
|
||||||
D3D12_DESCRIPTOR_HEAP_DESC d3dDescriptorHeapDescDSV = {};
|
D3D12_DESCRIPTOR_HEAP_DESC d3dDescriptorHeapDescDSV = XCEngine::RHI::D3D12DescriptorHeap::CreateDesc(XCEngine::RHI::DescriptorHeapType::DSV, 1);
|
||||||
d3dDescriptorHeapDescDSV.NumDescriptors = 1;
|
|
||||||
d3dDescriptorHeapDescDSV.Type = D3D12_DESCRIPTOR_HEAP_TYPE_DSV;
|
|
||||||
gSwapChainDSVHeap.Initialize(device, XCEngine::RHI::DescriptorHeapType::DSV, 1);
|
gSwapChainDSVHeap.Initialize(device, XCEngine::RHI::DescriptorHeapType::DSV, 1);
|
||||||
gDSVDescriptorSize = gD3D12Device.GetDescriptorHandleIncrementSize(XCEngine::RHI::DescriptorHeapType::DSV);
|
gDSVDescriptorSize = gD3D12Device.GetDescriptorHandleIncrementSize(XCEngine::RHI::DescriptorHeapType::DSV);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user