@@ -439,23 +439,28 @@ impl BindingTypeMaxCountValidator {
439
439
/// Bindable resource and the slot to bind it to.
440
440
#[ derive( Clone , Debug ) ]
441
441
#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
442
- pub struct BindGroupEntry < ' a > {
442
+ pub struct BindGroupEntry < ' a , B = BufferId , S = SamplerId , TV = TextureViewId , TLAS = TlasId >
443
+ where
444
+ [ BufferBinding < B > ] : ToOwned ,
445
+ [ S ] : ToOwned ,
446
+ [ TV ] : ToOwned ,
447
+ <[ BufferBinding < B > ] as ToOwned >:: Owned : std:: fmt:: Debug ,
448
+ <[ S ] as ToOwned >:: Owned : std:: fmt:: Debug ,
449
+ <[ TV ] as ToOwned >:: Owned : std:: fmt:: Debug ,
450
+ {
443
451
/// Slot for which binding provides resource. Corresponds to an entry of the same
444
452
/// binding index in the [`BindGroupLayoutDescriptor`].
445
453
pub binding : u32 ,
454
+ #[ cfg_attr(
455
+ feature = "serde" ,
456
+ serde( bound( deserialize = "BindingResource<'a, B, S, TV, TLAS>: Deserialize<'de>" ) )
457
+ ) ]
446
458
/// Resource to attach to the binding
447
- pub resource : BindingResource < ' a > ,
459
+ pub resource : BindingResource < ' a , B , S , TV , TLAS > ,
448
460
}
449
461
450
- /// Bindable resource and the slot to bind it to.
451
- #[ derive( Clone , Debug ) ]
452
- pub struct ResolvedBindGroupEntry < ' a > {
453
- /// Slot for which binding provides resource. Corresponds to an entry of the same
454
- /// binding index in the [`BindGroupLayoutDescriptor`].
455
- pub binding : u32 ,
456
- /// Resource to attach to the binding
457
- pub resource : ResolvedBindingResource < ' a > ,
458
- }
462
+ pub type ResolvedBindGroupEntry < ' a > =
463
+ BindGroupEntry < ' a , Arc < Buffer > , Arc < Sampler > , Arc < TextureView > , Arc < Tlas > > ;
459
464
460
465
/// Describes a group of bindings and the resources to be bound.
461
466
#[ derive( Clone , Debug ) ]
0 commit comments