diff --git a/wgpu-hal/src/dynamic/command.rs b/wgpu-hal/src/dynamic/command.rs index 4100f33ac..ae41b1bb7 100644 --- a/wgpu-hal/src/dynamic/command.rs +++ b/wgpu-hal/src/dynamic/command.rs @@ -8,10 +8,10 @@ use crate::{ use super::{ DynBindGroup, DynBuffer, DynComputePipeline, DynPipelineLayout, DynQuerySet, DynRenderPipeline, - DynResourceExt as _, DynTexture, DynTextureView, + DynResource, DynResourceExt as _, DynTexture, DynTextureView, }; -pub trait DynCommandEncoder: std::fmt::Debug { +pub trait DynCommandEncoder: DynResource + std::fmt::Debug { unsafe fn begin_encoding(&mut self, label: Label) -> Result<(), DeviceError>; unsafe fn discard_encoding(&mut self); @@ -174,7 +174,7 @@ pub trait DynCommandEncoder: std::fmt::Debug { // ); } -impl DynCommandEncoder for C { +impl DynCommandEncoder for C { unsafe fn begin_encoding(&mut self, label: Label) -> Result<(), DeviceError> { unsafe { C::begin_encoding(self, label) } } diff --git a/wgpu-hal/src/lib.rs b/wgpu-hal/src/lib.rs index 60829f5e4..ca6313342 100644 --- a/wgpu-hal/src/lib.rs +++ b/wgpu-hal/src/lib.rs @@ -264,10 +264,10 @@ pub mod api { mod dynamic; -pub(crate) use dynamic::{impl_dyn_resource, DynResource}; +pub(crate) use dynamic::impl_dyn_resource; pub use dynamic::{ DynBindGroup, DynBuffer, DynCommandEncoder, DynComputePipeline, DynPipelineLayout, DynQuerySet, - DynRenderPipeline, DynTexture, DynTextureView, + DynRenderPipeline, DynResource, DynTexture, DynTextureView, }; use std::{