@@ -4322,22 +4322,22 @@ def test_webgl_vao_without_automatic_extensions(self):
43224322
43234323  # Tests that offscreen framebuffer state restoration works 
43244324  @requires_graphics_hardware  
4325-   def   test_webgl_offscreen_framebuffer_state_restoration ( self ): 
4326-     for   args   in  [ 
4327-          # full state restoration path on WebGL 1.0 
4328-         [ '-sMAX_WEBGL_VERSION' ,  '-sOFFSCREEN_FRAMEBUFFER_FORBID_VAO_PATH' ], 
4329-          # VAO path on WebGL 1.0 
4330-          ['-sMAX_WEBGL_VERSION'  ] ,
4331-         [ '-sMAX_WEBGL_VERSION=2' ,  '-DTEST_WEBGL2=0' ], 
4332-          # VAO path on WebGL 2.0 
4333-         [ '-sMAX_WEBGL_VERSION=2' ,  '-DTEST_WEBGL2=1' ,  '-DTEST_ANTIALIAS=1' ,  '-DTEST_REQUIRE_VAO=1' ], 
4334-          # full state restoration path on WebGL 2.0 
4335-         [ '-sMAX_WEBGL_VERSION=2' ,  '-DTEST_WEBGL2=1' ,  '-DTEST_ANTIALIAS=1' ,  '-sOFFSCREEN_FRAMEBUFFER_FORBID_VAO_PATH' ], 
4336-          # blitFramebuffer path on WebGL 2.0 (falls back to VAO on Firefox < 67) 
4337-         [ '-sMAX_WEBGL_VERSION=2' ,  '-DTEST_WEBGL2=1' ,  '-DTEST_ANTIALIAS=0' ], 
4338-       ] :
4339-        cmd  =  args  +  ['-lGL' , '-sOFFSCREEN_FRAMEBUFFER' , '-DEXPLICIT_SWAP=1' ]
4340-        self .btest_exit ('webgl_offscreen_framebuffer_swap_with_bad_state.c' , args = cmd )
4325+   @ parameterized ({ 
4326+     # full state restoration path on WebGL 1.0  
4327+     'gl1_no_vao' : ([ '-sMAX_WEBGL_VERSION=1' ,  '-DTEST_DISABLE_VAO' ],),  
4328+     # VAO path on WebGL 1.0  
4329+     'gl1' : ([ '-sMAX_WEBGL_VERSION=1' ],),  
4330+     'gl1_max_gl2' : ( ['-sMAX_WEBGL_VERSION=2'  ],) , 
4331+     # VAO path on WebGL 2.0  
4332+     'gl2' : ([ '-sMAX_WEBGL_VERSION=2' ,  '-DTEST_WEBGL2=1' ,  '-DTEST_ANTIALIAS=1' ,  '-DTEST_REQUIRE_VAO=1' ],),  
4333+     # full state restoration path on WebGL 2.0  
4334+     'gl2_no_vao' : ([ '-sMAX_WEBGL_VERSION=2' ,  '-DTEST_WEBGL2=1' ,  '-DTEST_ANTIALIAS=1' ,  '-DTEST_DISABLE_VAO' ],),  
4335+     # blitFramebuffer path on WebGL 2.0 (falls back to VAO on Firefox < 67)  
4336+     'gl2_no_aa' : ([ '-sMAX_WEBGL_VERSION=2' ,  '-DTEST_WEBGL2=1' ,  '-DTEST_ANTIALIAS=0' ],),  
4337+   })  
4338+   def   test_webgl_offscreen_framebuffer_state_restoration ( self ,  args ,  skip_vao = False ) :
4339+     cmd  =  args  +  ['-lGL' , '-sOFFSCREEN_FRAMEBUFFER' , '-DEXPLICIT_SWAP=1' ]
4340+     self .btest_exit ('webgl_offscreen_framebuffer_swap_with_bad_state.c' , args = cmd )
43414341
43424342  @parameterized ({ 
43434343    '' : ([],), 
0 commit comments