From b4c674197041d2510961dd277a4b3d5388de2d70 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Sat, 20 Jul 2024 21:12:42 +0200 Subject: [PATCH] add most remaining dyn type traits --- wgpu-hal/src/dynamic/mod.rs | 6 ++++++ wgpu-hal/src/lib.rs | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/wgpu-hal/src/dynamic/mod.rs b/wgpu-hal/src/dynamic/mod.rs index 405f5c5e8..cb114af9f 100644 --- a/wgpu-hal/src/dynamic/mod.rs +++ b/wgpu-hal/src/dynamic/mod.rs @@ -88,12 +88,18 @@ impl DynResourceExt for R { } } +pub trait DynAccelerationStructure: DynResource + std::fmt::Debug {} pub trait DynBindGroup: DynResource + std::fmt::Debug {} +pub trait DynBindGroupLayout: DynResource + std::fmt::Debug {} pub trait DynBuffer: DynResource + std::fmt::Debug {} pub trait DynComputePipeline: DynResource + std::fmt::Debug {} +pub trait DynFence: DynResource + std::fmt::Debug {} +pub trait DynPipelineCache: DynResource + std::fmt::Debug {} pub trait DynPipelineLayout: DynResource + std::fmt::Debug {} pub trait DynQuerySet: DynResource + std::fmt::Debug {} pub trait DynRenderPipeline: DynResource + std::fmt::Debug {} +pub trait DynSampler: DynResource + std::fmt::Debug {} +pub trait DynShaderModule: DynResource + std::fmt::Debug {} pub trait DynTexture: DynResource + std::fmt::Debug {} pub trait DynTextureView: DynResource + std::fmt::Debug {} diff --git a/wgpu-hal/src/lib.rs b/wgpu-hal/src/lib.rs index 2b628b2bc..67e24a70e 100644 --- a/wgpu-hal/src/lib.rs +++ b/wgpu-hal/src/lib.rs @@ -266,8 +266,9 @@ mod dynamic; pub(crate) use dynamic::impl_dyn_resource; pub use dynamic::{ - DynBindGroup, DynBuffer, DynCommandEncoder, DynComputePipeline, DynDevice, DynPipelineLayout, - DynQuerySet, DynRenderPipeline, DynResource, DynTexture, DynTextureView, + DynAccelerationStructure, DynBindGroup, DynBindGroupLayout, DynBuffer, DynCommandEncoder, + DynComputePipeline, DynDevice, DynFence, DynPipelineCache, DynPipelineLayout, DynQuerySet, + DynRenderPipeline, DynResource, DynSampler, DynShaderModule, DynTexture, DynTextureView, }; use std::{