File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use wgt::{
77use alloc:: { borrow:: Cow , boxed:: Box , sync:: Arc , vec:: Vec } ;
88use core:: { convert:: Infallible , fmt, str} ;
99
10- use crate :: { binding_model:: BindError , resource:: RawResourceAccess } ;
10+ use crate :: { api_log , binding_model:: BindError , resource:: RawResourceAccess } ;
1111use crate :: {
1212 binding_model:: { LateMinBufferBindingSizeMismatch , PushConstantUploadError } ,
1313 command:: {
@@ -853,6 +853,8 @@ fn set_pipeline(
853853}
854854
855855fn dispatch ( state : & mut State , groups : [ u32 ; 3 ] ) -> Result < ( ) , ComputePassErrorInner > {
856+ api_log ! ( "ComputePass::dispatch {groups:?}" ) ;
857+
856858 state. is_ready ( ) ?;
857859
858860 state. flush_states ( None ) ?;
@@ -888,6 +890,8 @@ fn dispatch_indirect(
888890 buffer : Arc < Buffer > ,
889891 offset : u64 ,
890892) -> Result < ( ) , ComputePassErrorInner > {
893+ api_log ! ( "ComputePass::dispatch_indirect" ) ;
894+
891895 buffer. same_device ( device) ?;
892896
893897 state. is_ready ( ) ?;
Original file line number Diff line number Diff line change @@ -948,20 +948,38 @@ impl CommandEncoder {
948948 timestamp_writes,
949949 occlusion_query_set,
950950 } => {
951- encode_render_pass (
951+ api_log ! (
952+ "Begin encoding render pass with '{}' label" ,
953+ pass. label. as_deref( ) . unwrap_or( "" )
954+ ) ;
955+ let res = encode_render_pass (
952956 & mut state,
953957 pass,
954958 color_attachments,
955959 depth_stencil_attachment,
956960 timestamp_writes,
957961 occlusion_query_set,
958- ) ?;
962+ ) ;
963+ match res. as_ref ( ) {
964+ Err ( err) => api_log ! ( "Finished encoding render pass ({err:?})" ) ,
965+ Ok ( _) => api_log ! ( "Finished encoding render pass (success)" ) ,
966+ }
967+ res?;
959968 }
960969 ArcCommand :: RunComputePass {
961970 pass,
962971 timestamp_writes,
963972 } => {
964- encode_compute_pass ( & mut state, pass, timestamp_writes) ?;
973+ api_log ! (
974+ "Begin encoding compute pass with '{}' label" ,
975+ pass. label. as_deref( ) . unwrap_or( "" )
976+ ) ;
977+ let res = encode_compute_pass ( & mut state, pass, timestamp_writes) ;
978+ match res. as_ref ( ) {
979+ Err ( err) => api_log ! ( "Finished encoding compute pass ({err:?})" ) ,
980+ Ok ( _) => api_log ! ( "Finished encoding compute pass (success)" ) ,
981+ }
982+ res?;
965983 }
966984 _ => unreachable ! ( ) ,
967985 }
You can’t perform that action at this time.
0 commit comments