Skip to content

Commit dfca95b

Browse files
committed
Avoid garbage-free WebGL APIs when memory size is over 2gb.
Both chrome and firefox see have some issues with passing 2gb+ and 4gb+ offsets to these APIs. Once the browser issues are addressed we can lift these restrictions over time. Fixes: #20533
1 parent 1b3950d commit dfca95b

File tree

4 files changed

+77
-90
lines changed

4 files changed

+77
-90
lines changed

src/library_webgl.js

Lines changed: 65 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
if (MIN_WEBGL_VERSION >= 2) return 'true';
1414
if (MAX_WEBGL_VERSION <= 1) return 'false';
1515
return 'GL.currentContext.version >= 2';
16-
}
16+
};
17+
1718
null;
1819
}}}
1920

@@ -1517,14 +1518,14 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
15171518
glCompressedTexImage2D: (target, level, internalFormat, width, height, border, imageSize, data) => {
15181519
#if MAX_WEBGL_VERSION >= 2
15191520
if ({{{ isCurrentContextWebGL2() }}}) {
1520-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
1521-
// those always when possible.
15221521
if (GLctx.currentPixelUnpackBufferBinding || !imageSize) {
15231522
GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data);
1524-
} else {
1525-
GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, HEAPU8, data, imageSize);
1523+
return;
15261524
}
1525+
#if WEBGL_USE_GARBAGE_FREE_APIS
1526+
GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, HEAPU8, data, imageSize);
15271527
return;
1528+
#endif
15281529
}
15291530
#endif
15301531
GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, data ? {{{ makeHEAPView('U8', 'data', 'data+imageSize') }}} : null);
@@ -1534,14 +1535,14 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
15341535
glCompressedTexSubImage2D: (target, level, xoffset, yoffset, width, height, format, imageSize, data) => {
15351536
#if MAX_WEBGL_VERSION >= 2
15361537
if ({{{ isCurrentContextWebGL2() }}}) {
1537-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
1538-
// those always when possible.
15391538
if (GLctx.currentPixelUnpackBufferBinding || !imageSize) {
15401539
GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
1541-
} else {
1542-
GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, HEAPU8, data, imageSize);
1540+
return;
15431541
}
1542+
#if WEBGL_USE_GARBAGE_FREE_APIS
1543+
GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, HEAPU8, data, imageSize);
15441544
return;
1545+
#endif
15451546
}
15461547
#endif
15471548
GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data ? {{{ makeHEAPView('U8', 'data', 'data+imageSize') }}} : null);
@@ -1636,20 +1637,21 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
16361637
}
16371638
#endif
16381639
if ({{{ isCurrentContextWebGL2() }}}) {
1639-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
1640-
// those always when possible.
16411640
if (GLctx.currentPixelUnpackBufferBinding) {
16421641
GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels);
1643-
} else if (pixels) {
1642+
return;
1643+
}
1644+
#if WEBGL_USE_GARBAGE_FREE_APIS
1645+
if (pixels) {
16441646
var heap = heapObjectForWebGLType(type);
16451647
GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, heap, toTypedArrayIndex(pixels, heap));
1646-
} else {
1647-
GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, null);
1648+
return;
16481649
}
1649-
return;
1650+
#endif
16501651
}
16511652
#endif
1652-
GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null);
1653+
var pixelData = pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null;
1654+
GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixelData);
16531655
},
16541656

16551657
glTexSubImage2D__deps: ['$emscriptenWebGLGetTexPixelData'
@@ -1669,21 +1671,20 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
16691671
}
16701672
#endif
16711673
if ({{{ isCurrentContextWebGL2() }}}) {
1672-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
1673-
// those always when possible.
16741674
if (GLctx.currentPixelUnpackBufferBinding) {
16751675
GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
1676-
} else if (pixels) {
1676+
return;
1677+
}
1678+
#if WEBGL_USE_GARBAGE_FREE_APIS
1679+
if (pixels) {
16771680
var heap = heapObjectForWebGLType(type);
16781681
GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, heap, toTypedArrayIndex(pixels, heap));
1679-
} else {
1680-
GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, null);
1682+
return;
16811683
}
1682-
return;
1684+
#endif
16831685
}
16841686
#endif
1685-
var pixelData = null;
1686-
if (pixels) pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0);
1687+
var pixelData = pixels? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0) : null;
16871688
GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixelData);
16881689
},
16891690

@@ -1695,16 +1696,16 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
16951696
glReadPixels: (x, y, width, height, format, type, pixels) => {
16961697
#if MAX_WEBGL_VERSION >= 2
16971698
if ({{{ isCurrentContextWebGL2() }}}) {
1698-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
1699-
// those always when possible.
17001699
if (GLctx.currentPixelPackBufferBinding) {
17011700
GLctx.readPixels(x, y, width, height, format, type, pixels);
1702-
} else {
1703-
var heap = heapObjectForWebGLType(type);
1704-
var target = toTypedArrayIndex(pixels, heap);
1705-
GLctx.readPixels(x, y, width, height, format, type, heap, target);
1701+
return;
17061702
}
1703+
#if WEBGL_USE_GARBAGE_FREE_APIS
1704+
var heap = heapObjectForWebGLType(type);
1705+
var target = toTypedArrayIndex(pixels, heap);
1706+
GLctx.readPixels(x, y, width, height, format, type, heap, target);
17071707
return;
1708+
#endif
17081709
}
17091710
#endif
17101711
var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format);
@@ -1841,36 +1842,30 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
18411842
}
18421843
#endif
18431844

1844-
#if MAX_WEBGL_VERSION >= 2
1845+
#if WEBGL_USE_GARBAGE_FREE_APIS
18451846
if ({{{ isCurrentContextWebGL2() }}}) {
1846-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
1847-
// those always when possible. If size is zero, WebGL would interpret
1848-
// uploading the whole input arraybuffer (starting from given offset),
1849-
// which would not make sense in WebAssembly, so avoid uploading if size
1850-
// is zero. However we must still call bufferData to establish a backing
1851-
// storage of zero bytes.
1847+
// If size is zero, WebGL would interpret uploading the whole input
1848+
// arraybuffer (starting from given offset), which would not make sense in
1849+
// WebAssembly, so avoid uploading if size is zero. However we must still
1850+
// call bufferData to establish a backing storage of zero bytes.
18521851
if (data && size) {
18531852
GLctx.bufferData(target, HEAPU8, usage, data, size);
18541853
} else {
18551854
GLctx.bufferData(target, size, usage);
18561855
}
1857-
} else {
1858-
#endif
1859-
// N.b. here first form specifies a heap subarray, second form an integer
1860-
// size, so the ?: code here is polymorphic. It is advised to avoid
1861-
// randomly mixing both uses in calling code, to avoid any potential JS
1862-
// engine JIT issues.
1863-
GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage);
1864-
#if MAX_WEBGL_VERSION >= 2
1856+
return;
18651857
}
18661858
#endif
1859+
// N.b. here first form specifies a heap subarray, second form an integer
1860+
// size, so the ?: code here is polymorphic. It is advised to avoid
1861+
// randomly mixing both uses in calling code, to avoid any potential JS
1862+
// engine JIT issues.
1863+
GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage);
18671864
},
18681865

18691866
glBufferSubData: (target, offset, size, data) => {
1870-
#if MAX_WEBGL_VERSION >= 2
1867+
#if WEBGL_USE_GARBAGE_FREE_APIS
18711868
if ({{{ isCurrentContextWebGL2() }}}) {
1872-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
1873-
// those always when possible.
18741869
size && GLctx.bufferSubData(target, offset, HEAPU8, data, size);
18751870
return;
18761871
}
@@ -2433,8 +2428,8 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
24332428
count && GLctx.uniform1iv(webglGetUniformLocation(location), HEAP32, {{{ getHeapOffset('value', 'i32') }}}, count);
24342429
#else
24352430

2436-
#if MAX_WEBGL_VERSION >= 2
2437-
if ({{{ isCurrentContextWebGL2() }}}) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible.
2431+
#if WEBGL_USE_GARBAGE_FREE_APIS
2432+
if ({{{ isCurrentContextWebGL2() }}}) {
24382433
count && GLctx.uniform1iv(webglGetUniformLocation(location), HEAP32, {{{ getHeapOffset('value', 'i32') }}}, count);
24392434
return;
24402435
}
@@ -2474,8 +2469,8 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
24742469
count && GLctx.uniform2iv(webglGetUniformLocation(location), HEAP32, {{{ getHeapOffset('value', 'i32') }}}, count*2);
24752470
#else
24762471

2477-
#if MAX_WEBGL_VERSION >= 2
2478-
if ({{{ isCurrentContextWebGL2() }}}) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible.
2472+
#if WEBGL_USE_GARBAGE_FREE_APIS
2473+
if ({{{ isCurrentContextWebGL2() }}}) {
24792474
count && GLctx.uniform2iv(webglGetUniformLocation(location), HEAP32, {{{ getHeapOffset('value', 'i32') }}}, count*2);
24802475
return;
24812476
}
@@ -2516,8 +2511,8 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
25162511
count && GLctx.uniform3iv(webglGetUniformLocation(location), HEAP32, {{{ getHeapOffset('value', 'i32') }}}, count*3);
25172512
#else
25182513

2519-
#if MAX_WEBGL_VERSION >= 2
2520-
if ({{{ isCurrentContextWebGL2() }}}) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible.
2514+
#if WEBGL_USE_GARBAGE_FREE_APIS
2515+
if ({{{ isCurrentContextWebGL2() }}}) {
25212516
count && GLctx.uniform3iv(webglGetUniformLocation(location), HEAP32, {{{ getHeapOffset('value', 'i32') }}}, count*3);
25222517
return;
25232518
}
@@ -2559,9 +2554,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
25592554
count && GLctx.uniform4iv(webglGetUniformLocation(location), HEAP32, {{{ getHeapOffset('value', 'i32') }}}, count*4);
25602555
#else
25612556

2562-
#if MAX_WEBGL_VERSION >= 2
2563-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2564-
// those always when possible.
2557+
#if WEBGL_USE_GARBAGE_FREE_APIS
25652558
if ({{{ isCurrentContextWebGL2() }}}) {
25662559
count && GLctx.uniform4iv(webglGetUniformLocation(location), HEAP32, {{{ getHeapOffset('value', 'i32') }}}, count*4);
25672560
return;
@@ -2605,8 +2598,8 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
26052598
count && GLctx.uniform1fv(webglGetUniformLocation(location), HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count);
26062599
#else
26072600

2608-
#if MAX_WEBGL_VERSION >= 2
2609-
if ({{{ isCurrentContextWebGL2() }}}) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible.
2601+
#if WEBGL_USE_GARBAGE_FREE_APIS
2602+
if ({{{ isCurrentContextWebGL2() }}}) {
26102603
count && GLctx.uniform1fv(webglGetUniformLocation(location), HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count);
26112604
return;
26122605
}
@@ -2646,9 +2639,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
26462639
count && GLctx.uniform2fv(webglGetUniformLocation(location), HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*2);
26472640
#else
26482641

2649-
#if MAX_WEBGL_VERSION >= 2
2650-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2651-
// those always when possible.
2642+
#if WEBGL_USE_GARBAGE_FREE_APIS
26522643
if ({{{ isCurrentContextWebGL2() }}}) {
26532644
count && GLctx.uniform2fv(webglGetUniformLocation(location), HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*2);
26542645
return;
@@ -2690,9 +2681,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
26902681
count && GLctx.uniform3fv(webglGetUniformLocation(location), HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*3);
26912682
#else
26922683

2693-
#if MAX_WEBGL_VERSION >= 2
2694-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2695-
// those always when possible.
2684+
#if WEBGL_USE_GARBAGE_FREE_APIS
26962685
if ({{{ isCurrentContextWebGL2() }}}) {
26972686
count && GLctx.uniform3fv(webglGetUniformLocation(location), HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*3);
26982687
return;
@@ -2735,9 +2724,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
27352724
count && GLctx.uniform4fv(webglGetUniformLocation(location), HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*4);
27362725
#else
27372726

2738-
#if MAX_WEBGL_VERSION >= 2
2739-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2740-
// those always when possible.
2727+
#if WEBGL_USE_GARBAGE_FREE_APIS
27412728
if ({{{ isCurrentContextWebGL2() }}}) {
27422729
count && GLctx.uniform4fv(webglGetUniformLocation(location), HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*4);
27432730
return;
@@ -2785,9 +2772,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
27852772
count && GLctx.uniformMatrix2fv(webglGetUniformLocation(location), !!transpose, HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*4);
27862773
#else
27872774

2788-
#if MAX_WEBGL_VERSION >= 2
2789-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2790-
// those always when possible.
2775+
#if WEBGL_USE_GARBAGE_FREE_APIS
27912776
if ({{{ isCurrentContextWebGL2() }}}) {
27922777
count && GLctx.uniformMatrix2fv(webglGetUniformLocation(location), !!transpose, HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*4);
27932778
return;
@@ -2831,9 +2816,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
28312816
count && GLctx.uniformMatrix3fv(webglGetUniformLocation(location), !!transpose, HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*9);
28322817
#else
28332818

2834-
#if MAX_WEBGL_VERSION >= 2
2835-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2836-
// those always when possible.
2819+
#if WEBGL_USE_GARBAGE_FREE_APIS
28372820
if ({{{ isCurrentContextWebGL2() }}}) {
28382821
count && GLctx.uniformMatrix3fv(webglGetUniformLocation(location), !!transpose, HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*9);
28392822
return;
@@ -2882,9 +2865,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
28822865
count && GLctx.uniformMatrix4fv(webglGetUniformLocation(location), !!transpose, HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*16);
28832866
#else
28842867

2885-
#if MAX_WEBGL_VERSION >= 2
2886-
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2887-
// those always when possible.
2868+
#if WEBGL_USE_GARBAGE_FREE_APIS
28882869
if ({{{ isCurrentContextWebGL2() }}}) {
28892870
count && GLctx.uniformMatrix4fv(webglGetUniformLocation(location), !!transpose, HEAPF32, {{{ getHeapOffset('value', 'float') }}}, count*16);
28902871
return;
@@ -4158,12 +4139,14 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
41584139
return 0;
41594140
}
41604141

4161-
if (!(mapping.access & 0x10)) /* GL_MAP_FLUSH_EXPLICIT_BIT */
4162-
if ({{{ isCurrentContextWebGL2() }}}) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible.
4142+
if (!(mapping.access & 0x10)) { /* GL_MAP_FLUSH_EXPLICIT_BIT */
4143+
#if WEBGL_USE_GARBAGE_FREE_APIS
4144+
if ({{{ isCurrentContextWebGL2() }}}) {
41634145
GLctx.bufferSubData(target, mapping.offset, HEAPU8, mapping.mem, mapping.length);
4164-
} else {
4165-
GLctx.bufferSubData(target, mapping.offset, HEAPU8.subarray(mapping.mem, mapping.mem+mapping.length));
4166-
}
4146+
} else
4147+
#endif
4148+
GLctx.bufferSubData(target, mapping.offset, HEAPU8.subarray(mapping.mem, mapping.mem+mapping.length));
4149+
}
41674150
_free(mapping.mem);
41684151
mapping.mem = 0;
41694152
return 1;

src/settings_internal.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,9 @@ var MINIFY_WHITESPACE = true;
275275
var ASYNCIFY_IMPORTS_EXCEPT_JS_LIBS = [];
276276

277277
var WARN_DEPRECATED = true;
278+
279+
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
280+
// those always when possible.
281+
// We currently set this to false for memory sizes over 2GB due to browser
282+
// bugs.
283+
var WEBGL_USE_GARBAGE_FREE_APIS = false;

test/test_browser.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,6 @@ def test_webgl_parallel_shader_compile(self):
13251325
self.btest_exit('webgl_parallel_shader_compile.cpp')
13261326

13271327
@requires_graphics_hardware
1328-
@no_4gb('readPixels fails: https://crbug.com/324992397')
13291328
def test_webgl_explicit_uniform_location(self):
13301329
self.btest_exit('webgl_explicit_uniform_location.c', args=['-sGL_EXPLICIT_UNIFORM_LOCATION', '-sMIN_WEBGL_VERSION=2'])
13311330

@@ -1334,7 +1333,6 @@ def test_webgl_sampler_layout_binding(self):
13341333
self.btest_exit('webgl_sampler_layout_binding.c', args=['-sGL_EXPLICIT_UNIFORM_BINDING'])
13351334

13361335
@requires_graphics_hardware
1337-
@no_4gb('readPixels fails: https://crbug.com/324992397')
13381336
def test_webgl2_ubo_layout_binding(self):
13391337
self.btest_exit('webgl2_ubo_layout_binding.c', args=['-sGL_EXPLICIT_UNIFORM_BINDING', '-sMIN_WEBGL_VERSION=2'])
13401338

@@ -1536,7 +1534,6 @@ def test_sdl_gl_read(self):
15361534
self.btest_exit('test_sdl_gl_read.c', args=['-lSDL', '-lGL'])
15371535

15381536
@requires_graphics_hardware
1539-
@no_4gb('readPixels fails: https://crbug.com/324992397')
15401537
def test_sdl_gl_mapbuffers(self):
15411538
self.btest_exit('test_sdl_gl_mapbuffers.c', args=['-sFULL_ES3', '-lSDL', '-lGL'])
15421539

@@ -2039,12 +2036,10 @@ def test_gl_stride(self):
20392036
self.reftest('gl_stride.c', 'gl_stride.png', args=['-sGL_UNSAFE_OPTS=0', '-sLEGACY_GL_EMULATION', '-lGL', '-lSDL'])
20402037

20412038
@requires_graphics_hardware
2042-
@no_4gb('assertion failure')
20432039
def test_gl_vertex_buffer_pre(self):
20442040
self.reftest('gl_vertex_buffer_pre.c', 'gl_vertex_buffer_pre.png', args=['-sGL_UNSAFE_OPTS=0', '-sLEGACY_GL_EMULATION', '-lGL', '-lSDL'])
20452041

20462042
@requires_graphics_hardware
2047-
@no_4gb('assertion failure')
20482043
def test_gl_vertex_buffer(self):
20492044
self.reftest('gl_vertex_buffer.c', 'gl_vertex_buffer.png', args=['-sGL_UNSAFE_OPTS=0', '-sLEGACY_GL_EMULATION', '-lGL', '-lSDL'], reference_slack=1)
20502045

@@ -2842,7 +2837,6 @@ def test_webgl2_pbo(self):
28422837

28432838
@no_firefox('fails on CI likely due to GPU drivers there')
28442839
@requires_graphics_hardware
2845-
@no_4gb('fails to render')
28462840
def test_webgl2_sokol_mipmap(self):
28472841
self.reftest('third_party/sokol/mipmap-emsc.c', 'third_party/sokol/mipmap-emsc.png',
28482842
args=['-sMAX_WEBGL_VERSION=2', '-lGL', '-O1'], reference_slack=2)
@@ -4691,7 +4685,6 @@ def test_webgl_draw_base_vertex_base_instance(self):
46914685
'-DWEBGL_CONTEXT_VERSION=2'])
46924686

46934687
@requires_graphics_hardware
4694-
@no_4gb('fails to render')
46954688
def test_webgl_sample_query(self):
46964689
self.btest_exit('webgl_sample_query.cpp', args=['-sMAX_WEBGL_VERSION=2', '-lGL'])
46974690

@@ -4749,7 +4742,6 @@ def test_webgl_offscreen_framebuffer_state_restoration(self):
47494742

47504743
# Tests that using an array of structs in GL uniforms works.
47514744
@requires_graphics_hardware
4752-
@no_4gb('fails to render')
47534745
def test_webgl_array_of_structs_uniform(self):
47544746
self.reftest('webgl_array_of_structs_uniform.c', 'webgl_array_of_structs_uniform.png', args=['-lGL', '-sMAX_WEBGL_VERSION=2'])
47554747

0 commit comments

Comments
 (0)