rt(d3d12): remove unnecessary unstable features
div_ceil has been stabilized, and we don't really make use of const trait impl
This commit is contained in:
parent
a6c91a07df
commit
7c0190004f
|
@ -15,7 +15,6 @@ use windows::Win32::Graphics::Direct3D12::{
|
||||||
D3D12_GPU_DESCRIPTOR_HANDLE,
|
D3D12_GPU_DESCRIPTOR_HANDLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[const_trait]
|
|
||||||
pub trait D3D12HeapType {
|
pub trait D3D12HeapType {
|
||||||
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC;
|
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +35,7 @@ pub struct ResourceWorkHeap;
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct SamplerWorkHeap;
|
pub struct SamplerWorkHeap;
|
||||||
|
|
||||||
impl const D3D12HeapType for SamplerPaletteHeap {
|
impl D3D12HeapType for SamplerPaletteHeap {
|
||||||
// sampler palettes just get set directly
|
// sampler palettes just get set directly
|
||||||
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
D3D12_DESCRIPTOR_HEAP_DESC {
|
D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
|
@ -48,7 +47,7 @@ impl const D3D12HeapType for SamplerPaletteHeap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl const D3D12HeapType for CpuStagingHeap {
|
impl D3D12HeapType for CpuStagingHeap {
|
||||||
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader.
|
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader.
|
||||||
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
D3D12_DESCRIPTOR_HEAP_DESC {
|
D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
|
@ -60,7 +59,7 @@ impl const D3D12HeapType for CpuStagingHeap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl const D3D12HeapType for RenderTargetHeap {
|
impl D3D12HeapType for RenderTargetHeap {
|
||||||
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader.
|
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader.
|
||||||
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
D3D12_DESCRIPTOR_HEAP_DESC {
|
D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
|
@ -73,7 +72,7 @@ impl const D3D12HeapType for RenderTargetHeap {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl D3D12ShaderVisibleHeapType for ResourceWorkHeap {}
|
impl D3D12ShaderVisibleHeapType for ResourceWorkHeap {}
|
||||||
impl const D3D12HeapType for ResourceWorkHeap {
|
impl D3D12HeapType for ResourceWorkHeap {
|
||||||
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader.
|
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader.
|
||||||
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
D3D12_DESCRIPTOR_HEAP_DESC {
|
D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
|
@ -86,7 +85,7 @@ impl const D3D12HeapType for ResourceWorkHeap {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl D3D12ShaderVisibleHeapType for SamplerWorkHeap {}
|
impl D3D12ShaderVisibleHeapType for SamplerWorkHeap {}
|
||||||
impl const D3D12HeapType for SamplerWorkHeap {
|
impl D3D12HeapType for SamplerWorkHeap {
|
||||||
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader.
|
// Lut texture heaps are CPU only and get bound to the descriptor heap of the shader.
|
||||||
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
D3D12_DESCRIPTOR_HEAP_DESC {
|
D3D12_DESCRIPTOR_HEAP_DESC {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#![cfg(target_os = "windows")]
|
#![cfg(target_os = "windows")]
|
||||||
#![deny(unsafe_op_in_unsafe_fn)]
|
#![deny(unsafe_op_in_unsafe_fn)]
|
||||||
#![feature(const_trait_impl)]
|
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue