Skip to content

Commit 5ad049f

Browse files
committed
Store pointers instead of IDs when tracing (2/2)
This updates non-pass command encoder operations and device operations.
1 parent 80d9889 commit 5ad049f

File tree

8 files changed

+456
-188
lines changed

8 files changed

+456
-188
lines changed

wgpu-core/src/binding_model.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,8 @@ where
889889
}
890890

891891
/// cbindgen:ignore
892-
pub type ResolvedPipelineLayoutDescriptor<'a> = PipelineLayoutDescriptor<'a, Arc<BindGroupLayout>>;
892+
pub type ResolvedPipelineLayoutDescriptor<'a, BGL = Arc<BindGroupLayout>> =
893+
PipelineLayoutDescriptor<'a, BGL>;
893894

894895
#[derive(Debug)]
895896
pub struct PipelineLayout {

wgpu-core/src/command/encoder_command.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub trait ReferenceType {
1616
type Surface: Clone; // Surface does not implement Debug, although it probably could.
1717
type Texture: Clone + core::fmt::Debug;
1818
type TextureView: Clone + core::fmt::Debug;
19+
type ExternalTexture: Clone + core::fmt::Debug;
1920
type QuerySet: Clone + core::fmt::Debug;
2021
type BindGroup: Clone + core::fmt::Debug;
2122
type RenderPipeline: Clone + core::fmt::Debug;
@@ -47,6 +48,7 @@ impl ReferenceType for IdReferences {
4748
type Surface = id::SurfaceId;
4849
type Texture = id::TextureId;
4950
type TextureView = id::TextureViewId;
51+
type ExternalTexture = id::ExternalTextureId;
5052
type QuerySet = id::QuerySetId;
5153
type BindGroup = id::BindGroupId;
5254
type RenderPipeline = id::RenderPipelineId;
@@ -61,6 +63,7 @@ impl ReferenceType for PointerReferences {
6163
type Surface = id::PointerId<id::markers::Surface>;
6264
type Texture = id::PointerId<id::markers::Texture>;
6365
type TextureView = id::PointerId<id::markers::TextureView>;
66+
type ExternalTexture = id::PointerId<id::markers::ExternalTexture>;
6467
type QuerySet = id::PointerId<id::markers::QuerySet>;
6568
type BindGroup = id::PointerId<id::markers::BindGroup>;
6669
type RenderPipeline = id::PointerId<id::markers::RenderPipeline>;
@@ -75,6 +78,7 @@ impl ReferenceType for ArcReferences {
7578
type Surface = Arc<Surface>;
7679
type Texture = Arc<Texture>;
7780
type TextureView = Arc<crate::resource::TextureView>;
81+
type ExternalTexture = Arc<crate::resource::ExternalTexture>;
7882
type QuerySet = Arc<QuerySet>;
7983
type BindGroup = Arc<crate::binding_model::BindGroup>;
8084
type RenderPipeline = Arc<crate::pipeline::RenderPipeline>;
@@ -93,6 +97,7 @@ attribute_alias! {
9397
R::Surface: serde::Serialize + for<'d> serde::Deserialize<'d>,\
9498
R::Texture: serde::Serialize + for<'d> serde::Deserialize<'d>,\
9599
R::TextureView: serde::Serialize + for<'d> serde::Deserialize<'d>,\
100+
R::ExternalTexture: serde::Serialize + for<'d> serde::Deserialize<'d>,\
96101
R::QuerySet: serde::Serialize + for<'d> serde::Deserialize<'d>,\
97102
R::BindGroup: serde::Serialize + for<'d> serde::Deserialize<'d>,\
98103
R::RenderPipeline: serde::Serialize + for<'d> serde::Deserialize<'d>,\

0 commit comments

Comments
 (0)