@@ -65,14 +65,15 @@ pub use wgt::{LoadOp, StoreOp};
6565fn load_hal_ops < V > ( load : LoadOp < V > ) -> hal:: AttachmentOps {
6666 match load {
6767 LoadOp :: Load => hal:: AttachmentOps :: LOAD ,
68- LoadOp :: Clear ( _) => hal:: AttachmentOps :: empty ( ) ,
68+ LoadOp :: Clear ( _) => hal:: AttachmentOps :: LOAD_CLEAR ,
69+ LoadOp :: DontCare ( _) => hal:: AttachmentOps :: LOAD_DONT_CARE ,
6970 }
7071}
7172
7273fn store_hal_ops ( store : StoreOp ) -> hal:: AttachmentOps {
7374 match store {
7475 StoreOp :: Store => hal:: AttachmentOps :: STORE ,
75- StoreOp :: Discard => hal:: AttachmentOps :: empty ( ) ,
76+ StoreOp :: Discard => hal:: AttachmentOps :: STORE_DISCARD ,
7677 }
7778}
7879
@@ -115,6 +116,7 @@ impl<V: Copy + Default> PassChannel<Option<V>> {
115116 Ok ( ResolvedPassChannel :: Operational ( wgt:: Operations {
116117 load : match self . load_op . ok_or ( AttachmentError :: NoLoad ) ? {
117118 LoadOp :: Clear ( clear_value) => LoadOp :: Clear ( handle_clear ( clear_value) ?) ,
119+ LoadOp :: DontCare ( token) => LoadOp :: DontCare ( token) ,
118120 LoadOp :: Load => LoadOp :: Load ,
119121 } ,
120122 store : self . store_op . ok_or ( AttachmentError :: NoStore ) ?,
@@ -204,7 +206,7 @@ impl ArcRenderPassColorAttachment {
204206 fn clear_value ( & self ) -> Color {
205207 match self . load_op {
206208 LoadOp :: Clear ( clear_value) => clear_value,
207- LoadOp :: Load => Color :: default ( ) ,
209+ LoadOp :: DontCare ( _ ) | LoadOp :: Load => Color :: default ( ) ,
208210 }
209211 }
210212}
@@ -1555,13 +1557,13 @@ impl RenderPassInfo {
15551557 if let Some ( ( aspect, view) ) = self . divergent_discarded_depth_stencil_aspect {
15561558 let ( depth_ops, stencil_ops) = if aspect == wgt:: TextureAspect :: DepthOnly {
15571559 (
1558- hal:: AttachmentOps :: STORE , // clear depth
1559- hal:: AttachmentOps :: LOAD | hal:: AttachmentOps :: STORE , // unchanged stencil
1560+ hal:: AttachmentOps :: LOAD_CLEAR | hal :: AttachmentOps :: STORE , // clear depth
1561+ hal:: AttachmentOps :: LOAD | hal:: AttachmentOps :: STORE , // unchanged stencil
15601562 )
15611563 } else {
15621564 (
15631565 hal:: AttachmentOps :: LOAD | hal:: AttachmentOps :: STORE , // unchanged stencil
1564- hal:: AttachmentOps :: STORE , // clear depth
1566+ hal:: AttachmentOps :: LOAD_CLEAR | hal :: AttachmentOps :: STORE , // clear depth
15651567 )
15661568 } ;
15671569 let desc = hal:: RenderPassDescriptor :: < ' _ , _ , dyn hal:: DynTextureView > {
0 commit comments