@@ -20,8 +20,11 @@ use tracing::error;
20
20
21
21
/// A trait that allows constructing different variants of a render pipeline from a key.
22
22
///
23
- /// Note: If your key is a ZST, you do not need to "specialize" anything. Just create the render
24
- /// pipeline once and store its ID.
23
+ /// Note: This is intended for modifying your pipeline descriptor on the basis of a key. If your key
24
+ /// contains no data then you don't need to specialize. For example, if you are using the
25
+ /// [`AsBindGroup`](crate::render_resource::AsBindGroup) without the `#[bind_group_data]` attribute,
26
+ /// you don't need to specialize. Instead, create the pipeline directly from [`PipelineCache`] and
27
+ /// store its ID.
25
28
///
26
29
/// See [`SpecializedRenderPipelines`] for more info.
27
30
pub trait SpecializedRenderPipeline {
@@ -39,8 +42,11 @@ pub trait SpecializedRenderPipeline {
39
42
/// making it easy to A) construct the necessary pipelines, and B) reuse already constructed
40
43
/// pipelines.
41
44
///
42
- /// Note: If your key is a ZST, you do not need to "specialize" anything. Just create the render
43
- /// pipeline once and store its ID.
45
+ /// Note: This is intended for modifying your pipeline descriptor on the basis of a key. If your key
46
+ /// contains no data then you don't need to specialize. For example, if you are using the
47
+ /// [`AsBindGroup`](crate::render_resource::AsBindGroup) without the `#[bind_group_data]` attribute,
48
+ /// you don't need to specialize. Instead, create the pipeline directly from [`PipelineCache`] and
49
+ /// store its ID.
44
50
#[ derive( Resource ) ]
45
51
pub struct SpecializedRenderPipelines < S : SpecializedRenderPipeline > {
46
52
cache : HashMap < S :: Key , CachedRenderPipelineId > ,
@@ -69,8 +75,11 @@ impl<S: SpecializedRenderPipeline> SpecializedRenderPipelines<S> {
69
75
70
76
/// A trait that allows constructing different variants of a compute pipeline from a key.
71
77
///
72
- /// Note: If your key is a ZST, you do not need to "specialize" anything. Just create the compute
73
- /// pipeline once and store its ID.
78
+ /// Note: This is intended for modifying your pipeline descriptor on the basis of a key. If your key
79
+ /// contains no data then you don't need to specialize. For example, if you are using the
80
+ /// [`AsBindGroup`](crate::render_resource::AsBindGroup) without the `#[bind_group_data]` attribute,
81
+ /// you don't need to specialize. Instead, create the pipeline directly from [`PipelineCache`] and
82
+ /// store its ID.
74
83
///
75
84
/// See [`SpecializedComputePipelines`] for more info.
76
85
pub trait SpecializedComputePipeline {
@@ -88,8 +97,11 @@ pub trait SpecializedComputePipeline {
88
97
/// making it easy to A) construct the necessary pipelines, and B) reuse already constructed
89
98
/// pipelines.
90
99
///
91
- /// Note: If your key is a ZST, you do not need to "specialize" anything. Just create the compute
92
- /// pipeline once and store its ID.
100
+ /// Note: This is intended for modifying your pipeline descriptor on the basis of a key. If your key
101
+ /// contains no data then you don't need to specialize. For example, if you are using the
102
+ /// [`AsBindGroup`](crate::render_resource::AsBindGroup) without the `#[bind_group_data]` attribute,
103
+ /// you don't need to specialize. Instead, create the pipeline directly from [`PipelineCache`] and
104
+ /// store its ID.
93
105
#[ derive( Resource ) ]
94
106
pub struct SpecializedComputePipelines < S : SpecializedComputePipeline > {
95
107
cache : HashMap < S :: Key , CachedComputePipelineId > ,
0 commit comments