mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
impl DynCommandBuffer
This commit is contained in:
@@ -413,6 +413,8 @@ pub struct CommandBuffer {
|
||||
raw: d3d12::GraphicsCommandList,
|
||||
}
|
||||
|
||||
impl crate::DynCommandBuffer for CommandBuffer {}
|
||||
|
||||
unsafe impl Send for CommandBuffer {}
|
||||
unsafe impl Sync for CommandBuffer {}
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ 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 DynCommandBuffer: 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 {}
|
||||
|
||||
@@ -44,6 +44,7 @@ crate::impl_dyn_resource!(Context, Encoder, Resource);
|
||||
|
||||
impl crate::DynBindGroup for Resource {}
|
||||
impl crate::DynBuffer for Resource {}
|
||||
impl crate::DynCommandBuffer for Resource {}
|
||||
impl crate::DynComputePipeline for Resource {}
|
||||
impl crate::DynPipelineLayout for Resource {}
|
||||
impl crate::DynQuerySet for Resource {}
|
||||
|
||||
@@ -988,6 +988,8 @@ pub struct CommandBuffer {
|
||||
queries: Vec<glow::Query>,
|
||||
}
|
||||
|
||||
impl crate::DynCommandBuffer for CommandBuffer {}
|
||||
|
||||
impl fmt::Debug for CommandBuffer {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let mut builder = f.debug_struct("CommandBuffer");
|
||||
|
||||
@@ -266,9 +266,10 @@ mod dynamic;
|
||||
|
||||
pub(crate) use dynamic::impl_dyn_resource;
|
||||
pub use dynamic::{
|
||||
DynAccelerationStructure, DynBindGroup, DynBindGroupLayout, DynBuffer, DynCommandEncoder,
|
||||
DynComputePipeline, DynDevice, DynFence, DynPipelineCache, DynPipelineLayout, DynQuerySet,
|
||||
DynRenderPipeline, DynResource, DynSampler, DynShaderModule, DynTexture, DynTextureView,
|
||||
DynAccelerationStructure, DynBindGroup, DynBindGroupLayout, DynBuffer, DynCommandBuffer,
|
||||
DynCommandEncoder, DynComputePipeline, DynDevice, DynFence, DynPipelineCache,
|
||||
DynPipelineLayout, DynQuerySet, DynRenderPipeline, DynResource, DynSampler, DynShaderModule,
|
||||
DynTexture, DynTextureView,
|
||||
};
|
||||
|
||||
use std::{
|
||||
@@ -406,7 +407,7 @@ pub trait Api: Clone + fmt::Debug + Sized {
|
||||
/// them to [`CommandEncoder::reset_all`].
|
||||
///
|
||||
/// [`CommandEncoder`]: Api::CommandEncoder
|
||||
type CommandBuffer: WasmNotSendSync + fmt::Debug;
|
||||
type CommandBuffer: DynCommandBuffer + fmt::Debug;
|
||||
|
||||
type Buffer: DynBuffer;
|
||||
type Texture: DynTexture;
|
||||
|
||||
@@ -907,6 +907,8 @@ pub struct CommandBuffer {
|
||||
raw: metal::CommandBuffer,
|
||||
}
|
||||
|
||||
impl crate::DynCommandBuffer for CommandBuffer {}
|
||||
|
||||
unsafe impl Send for CommandBuffer {}
|
||||
unsafe impl Sync for CommandBuffer {}
|
||||
|
||||
|
||||
@@ -811,6 +811,8 @@ pub struct CommandBuffer {
|
||||
raw: vk::CommandBuffer,
|
||||
}
|
||||
|
||||
impl crate::DynCommandBuffer for CommandBuffer {}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum ShaderModule {
|
||||
|
||||
Reference in New Issue
Block a user