File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1478,8 +1478,12 @@ impl crate::Queue<super::Api> for super::Queue {
14781478 ) -> Result < ( ) , crate :: DeviceError > {
14791479 let shared = Arc :: clone ( & self . shared ) ;
14801480 let gl = & shared. context . lock ( ) ;
1481- unsafe { self . reset_state ( gl) } ;
14821481 for cmd_buf in command_buffers. iter ( ) {
1482+ // The command encoder assumes a default state when encoding the command buffer.
1483+ // Always reset the state between command_buffers to reflect this assumption. Do
1484+ // this at the beginning of the loop in case something outside of wgpu modified
1485+ // this state prior to commit.
1486+ unsafe { self . reset_state ( gl) } ;
14831487 #[ cfg( not( target_arch = "wasm32" ) ) ]
14841488 if let Some ( ref label) = cmd_buf. label {
14851489 unsafe { gl. push_debug_group ( glow:: DEBUG_SOURCE_APPLICATION , DEBUG_ID , label) } ;
You can’t perform that action at this time.
0 commit comments