mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
texture & buffer transitioning always uses DynCommandEncoder now
collateral: ComputePass uses DynCommandEncoder during recording
This commit is contained in:
parent
c02ee6270b
commit
b7e11c76df
@ -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) }
|
||||
}
|
||||
|
@ -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::{
|
||||
|
Loading…
Reference in New Issue
Block a user