-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
676 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use d3d12_descriptor_heap::D3D12DescriptorHeapType; | ||
use windows::Win32::Graphics::Direct3D12::{ | ||
D3D12_DESCRIPTOR_HEAP_DESC, D3D12_DESCRIPTOR_HEAP_FLAG_NONE, | ||
D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, D3D12_DESCRIPTOR_HEAP_TYPE_RTV, | ||
}; | ||
|
||
#[derive(Clone)] | ||
pub struct CpuStagingHeap; | ||
|
||
#[derive(Clone)] | ||
pub struct RenderTargetHeap; | ||
|
||
impl D3D12DescriptorHeapType for RenderTargetHeap { | ||
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader. | ||
fn create_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC { | ||
D3D12_DESCRIPTOR_HEAP_DESC { | ||
Type: D3D12_DESCRIPTOR_HEAP_TYPE_RTV, | ||
NumDescriptors: size as u32, | ||
Flags: D3D12_DESCRIPTOR_HEAP_FLAG_NONE, | ||
NodeMask: 0, | ||
} | ||
} | ||
} | ||
|
||
impl D3D12DescriptorHeapType for CpuStagingHeap { | ||
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader. | ||
fn create_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC { | ||
D3D12_DESCRIPTOR_HEAP_DESC { | ||
Type: D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, | ||
NumDescriptors: size as u32, | ||
Flags: D3D12_DESCRIPTOR_HEAP_FLAG_NONE, | ||
NodeMask: 0, | ||
} | ||
} | ||
} |
Oops, something went wrong.