mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 16:31:11 +01:00
texture & buffer transitioning always uses DynCommandEncoder now
collateral: ComputePass uses DynCommandEncoder during recording
This commit is contained in:
1 parent
c02ee6270b
commit
b7e11c76df
2 files changed
+5
-5
No files matched your search
@@ -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) }
|
||||
}
|
||||
|
||||
+2
-2
@@ -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::{
|
||||
|
||||
Reference in new issue
Block a user