@@ -20,26 +20,26 @@ use super::{
2020 surface,
2121} ;
2222
23- #[ derive( Clone , Copy , Debug , PartialEq ) ]
2423/// Color load operation for a render pass color attachment.
24+ #[ derive( Clone , Copy , Debug , PartialEq ) ]
2525pub enum ColorLoadOp {
2626 /// Load the existing contents of the attachment.
2727 Load ,
2828 /// Clear the attachment to the provided RGBA color.
2929 Clear ( [ f64 ; 4 ] ) ,
3030}
3131
32- #[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
3332/// Store operation for a render pass attachment.
33+ #[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
3434pub enum StoreOp {
3535 /// Store the results to the attachment at the end of the pass.
3636 Store ,
3737 /// Discard the results at the end of the pass when possible.
3838 Discard ,
3939}
4040
41- #[ derive( Clone , Copy , Debug ) ]
4241/// Combined load and store operations for the color attachment.
42+ #[ derive( Clone , Copy , Debug ) ]
4343pub struct ColorOperations {
4444 pub load : ColorLoadOp ,
4545 pub store : StoreOp ,
@@ -54,16 +54,16 @@ impl Default for ColorOperations {
5454 }
5555}
5656
57- #[ derive( Clone , Debug , Default ) ]
5857/// Configuration for beginning a render pass.
58+ #[ derive( Clone , Debug , Default ) ]
5959pub struct RenderPassConfig {
6060 pub label : Option < String > ,
6161 pub color_operations : ColorOperations ,
6262}
6363
64- #[ derive( Debug ) ]
6564/// Wrapper around `wgpu::RenderPass<'_>` exposing the operations needed by the
6665/// engine without leaking raw `wgpu` types at the call sites.
66+ #[ derive( Debug ) ]
6767pub struct RenderPass < ' a > {
6868 pub ( super ) raw : wgpu:: RenderPass < ' a > ,
6969}
@@ -151,10 +151,10 @@ impl<'a> RenderPass<'a> {
151151 }
152152}
153153
154- #[ derive( Debug , Default ) ]
155154/// Wrapper for a variably sized list of color attachments passed into a render
156155/// pass. The attachments borrow `TextureView` references for the duration of
157156/// the pass.
157+ #[ derive( Debug , Default ) ]
158158pub struct RenderColorAttachments < ' a > {
159159 attachments : Vec < Option < wgpu:: RenderPassColorAttachment < ' a > > > ,
160160}
0 commit comments