texture & buffer transitioning always uses DynCommandEncoder now

collateral: ComputePass uses DynCommandEncoder during recording
This commit is contained in:
Andreas Reich 2024-07-20 11:45:22 +02:00
parent c02ee6270b
commit b7e11c76df
2 changed files with 5 additions and 5 deletions

View File

@ -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<C: CommandEncoder> DynCommandEncoder for C {
impl<C: CommandEncoder + DynResource> DynCommandEncoder for C {
unsafe fn begin_encoding(&mut self, label: Label) -> Result<(), DeviceError> {
unsafe { C::begin_encoding(self, label) }
}

View File

@ -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::{