From 7c0190004f0fd42aec6ad68b1279f9738f1c9e9a Mon Sep 17 00:00:00 2001 From: chyyran Date: Sat, 3 Feb 2024 02:50:35 -0500 Subject: [PATCH] rt(d3d12): remove unnecessary unstable features div_ceil has been stabilized, and we don't really make use of const trait impl --- librashader-runtime-d3d12/src/descriptor_heap.rs | 11 +++++------ librashader-runtime-d3d12/src/lib.rs | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/librashader-runtime-d3d12/src/descriptor_heap.rs b/librashader-runtime-d3d12/src/descriptor_heap.rs index 0c62a0c..8326099 100644 --- a/librashader-runtime-d3d12/src/descriptor_heap.rs +++ b/librashader-runtime-d3d12/src/descriptor_heap.rs @@ -15,7 +15,6 @@ use windows::Win32::Graphics::Direct3D12::{ D3D12_GPU_DESCRIPTOR_HANDLE, }; -#[const_trait] pub trait D3D12HeapType { fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC; } @@ -36,7 +35,7 @@ pub struct ResourceWorkHeap; #[derive(Clone)] pub struct SamplerWorkHeap; -impl const D3D12HeapType for SamplerPaletteHeap { +impl D3D12HeapType for SamplerPaletteHeap { // sampler palettes just get set directly fn get_desc(size: usize) -> 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. fn get_desc(size: usize) -> 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. fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC { D3D12_DESCRIPTOR_HEAP_DESC { @@ -73,7 +72,7 @@ impl const D3D12HeapType for RenderTargetHeap { } 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. fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC { D3D12_DESCRIPTOR_HEAP_DESC { @@ -86,7 +85,7 @@ impl const D3D12HeapType for ResourceWorkHeap { } 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. fn get_desc(size: usize) -> D3D12_DESCRIPTOR_HEAP_DESC { D3D12_DESCRIPTOR_HEAP_DESC { diff --git a/librashader-runtime-d3d12/src/lib.rs b/librashader-runtime-d3d12/src/lib.rs index c7a03c7..4e3d23b 100644 --- a/librashader-runtime-d3d12/src/lib.rs +++ b/librashader-runtime-d3d12/src/lib.rs @@ -1,6 +1,5 @@ #![cfg(target_os = "windows")] #![deny(unsafe_op_in_unsafe_fn)] -#![feature(const_trait_impl)] #![feature(let_chains)] #![feature(type_alias_impl_trait)]