diff --git a/.circleci/config.yml b/.circleci/config.yml index dffff08b436fd..520a08d52a8c7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -817,6 +817,7 @@ jobs: browser64_4gb.test_audio_worklet* browser64_4gb.test_emscripten_log browser64_4gb.test_clientside_vertex_arrays_es3 + browser64_4gb.test_emscripten_animate_canvas_element_size* " test-browser-firefox: executor: bionic diff --git a/src/library_html5_webgl.js b/src/library_html5_webgl.js index 468fe487c6423..85f3cf103dce0 100644 --- a/src/library_html5_webgl.js +++ b/src/library_html5_webgl.js @@ -30,12 +30,12 @@ var LibraryHtml5WebGL = { HEAP32[a+i] = 0; } - HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.alpha }}}>>2)] = - HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.depth }}}>>2)] = - HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.antialias }}}>>2)] = - HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.premultipliedAlpha }}}>>2)] = - HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.majorVersion }}}>>2)] = - HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.enableExtensionsByDefault }}}>>2)] = 1; + HEAP8[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.alpha }}})] = + HEAP8[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.depth }}})] = + HEAP8[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.antialias }}})] = + HEAP8[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.premultipliedAlpha }}})] = + HEAP8[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.majorVersion }}})] = + HEAP8[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.enableExtensionsByDefault }}})] = 1; #if PTHREADS // Default context initialization state (user can override): @@ -80,25 +80,25 @@ var LibraryHtml5WebGL = { #if ASSERTIONS assert(attributes); #endif - var a = attributes >> 2; - var powerPreference = HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.powerPreference }}}>>2)]; + var powerPreference = {{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.powerPreference, 'i32') }}}; var contextAttributes = { - 'alpha': !!HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.alpha }}}>>2)], - 'depth': !!HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.depth }}}>>2)], - 'stencil': !!HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.stencil }}}>>2)], - 'antialias': !!HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.antialias }}}>>2)], - 'premultipliedAlpha': !!HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.premultipliedAlpha }}}>>2)], - 'preserveDrawingBuffer': !!HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.preserveDrawingBuffer }}}>>2)], + 'alpha': !!{{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.alpha, 'i32') }}}, + 'depth': !!{{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.depth, 'i32') }}}, + 'stencil': !!{{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.stencil, 'i32') }}}, + 'antialias': !!{{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.antialias, 'i32') }}}, + 'premultipliedAlpha': !!{{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.premultipliedAlpha, 'i32') }}}, + 'preserveDrawingBuffer': !!{{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.preserveDrawingBuffer, 'i32') }}}, 'powerPreference': emscripten_webgl_power_preferences[powerPreference], - 'failIfMajorPerformanceCaveat': !!HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.failIfMajorPerformanceCaveat }}}>>2)], + 'failIfMajorPerformanceCaveat': !!{{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.failIfMajorPerformanceCaveat, 'i32') }}}, // The following are not predefined WebGL context attributes in the WebGL specification, so the property names can be minified by Closure. - majorVersion: HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.majorVersion }}}>>2)], - minorVersion: HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.minorVersion }}}>>2)], - enableExtensionsByDefault: HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.enableExtensionsByDefault }}}>>2)], - explicitSwapControl: HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.explicitSwapControl }}}>>2)], - proxyContextToMainThread: HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.proxyContextToMainThread }}}>>2)], - renderViaOffscreenBackBuffer: HEAP32[a + ({{{ C_STRUCTS.EmscriptenWebGLContextAttributes.renderViaOffscreenBackBuffer }}}>>2)] + majorVersion: {{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.majorVersion, 'i32') }}}, + minorVersion: {{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.minorVersion, 'i32') }}}, + enableExtensionsByDefault: {{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.enableExtensionsByDefault, 'i32') }}}, + explicitSwapControl: {{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.explicitSwapControl, 'i32') }}}, + proxyContextToMainThread: {{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.proxyContextToMainThread, 'i32') }}}, + renderViaOffscreenBackBuffer: {{{ makeGetValue('attributes', C_STRUCTS.EmscriptenWebGLContextAttributes.renderViaOffscreenBackBuffer, 'i32') }}} }; + err(contextAttributes); var canvas = findCanvasEventTarget(target); @@ -243,10 +243,8 @@ var LibraryHtml5WebGL = { }, emscripten_webgl_do_commit_frame: () => { -#if TRACE_WEBGL_CALLS var threadId = (typeof _pthread_self != 'undefined') ? _pthread_self : () => 1; err(`[Thread ${threadId()}, GL ctx: ${GL.currentContext.handle}]: emscripten_webgl_do_commit_frame()`); -#endif if (!GL.currentContext || !GL.currentContext.GLctx) { #if GL_DEBUG dbg('emscripten_webgl_commit_frame() failed: no GL context set current via emscripten_webgl_make_context_current()!'); diff --git a/src/library_webgl.js b/src/library_webgl.js index c4c507255a2c3..bb9d4e1ef80a1 100644 --- a/src/library_webgl.js +++ b/src/library_webgl.js @@ -136,7 +136,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; emscripten_webgl_enable_WEBGL_multi_draw: (ctx) => webgl_enable_WEBGL_multi_draw(GL.contexts[ctx].GLctx), $getEmscriptenSupportedExtensions__internal: true, - $getEmscriptenSupportedExtensions: function(ctx) { + $getEmscriptenSupportedExtensions: (ctx) => { // Restrict the list of advertised extensions to those that we actually // support. var supportedExtensions = [ @@ -280,7 +280,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; // glGetError() to fetch it. As per GLES2 spec, only the first error is // remembered, and subsequent errors are discarded until the user has // cleared the stored error by a call to glGetError(). - recordError: function recordError(errorCode) { + recordError: (errorCode) => { #if GL_TRACK_ERRORS if (!GL.lastError) { GL.lastError = errorCode; @@ -370,7 +370,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; } }, - getTempVertexBuffer: function getTempVertexBuffer(sizeBytes) { + getTempVertexBuffer: (sizeBytes) => { var idx = GL.log2ceilLookup(sizeBytes); var ringbuffer = GL.currentContext.tempVertexBuffers1[idx]; var nextFreeBufferIndex = GL.currentContext.tempVertexBufferCounters1[idx]; @@ -387,7 +387,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; return ringbuffer[nextFreeBufferIndex]; }, - getTempIndexBuffer: function getTempIndexBuffer(sizeBytes) { + getTempIndexBuffer: (sizeBytes) => { var idx = GL.log2ceilLookup(sizeBytes); var ibo = GL.currentContext.tempIndexBuffers[idx]; if (ibo) { @@ -405,7 +405,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; // doublebuffered temp VB memory pointers, so that every second frame // utilizes different set of temp buffers. The aim is to keep the set of // buffers being rendered, and the set of buffers being updated disjoint. - newRenderingFrameStarted: function newRenderingFrameStarted() { + newRenderingFrameStarted: () => { if (!GL.currentContext) { return; } @@ -450,13 +450,13 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; #if GL_FFP_ONLY enabledClientAttribIndices: [], - enableVertexAttribArray: function enableVertexAttribArray(index) { + enableVertexAttribArray: (index) => { if (!GL.enabledClientAttribIndices[index]) { GL.enabledClientAttribIndices[index] = true; GLctx.enableVertexAttribArray(index); } }, - disableVertexAttribArray: function disableVertexAttribArray(index) { + disableVertexAttribArray: (index) => { if (GL.enabledClientAttribIndices[index]) { GL.enabledClientAttribIndices[index] = false; GLctx.disableVertexAttribArray(index); @@ -465,7 +465,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; #endif #if FULL_ES2 - calcBufLength: function calcBufLength(size, type, stride, count) { + calcBufLength: (size, type, stride, count) => { if (stride > 0) { return count * stride; // XXXvlad this is not exactly correct I don't think } @@ -475,7 +475,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; usedTempBuffers: [], - preDrawHandleClientVertexAttribBindings: function preDrawHandleClientVertexAttribBindings(count) { + preDrawHandleClientVertexAttribBindings: (count) => { GL.resetBufferBinding = false; // TODO: initial pass to detect ranges we need to upload, might not need @@ -499,7 +499,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; } }, - postDrawHandleClientVertexAttribBindings: function postDrawHandleClientVertexAttribBindings() { + postDrawHandleClientVertexAttribBindings: () => { if (GL.resetBufferBinding) { GLctx.bindBuffer(0x8892 /*GL_ARRAY_BUFFER*/, GL.buffers[GLctx.currentArrayBufferBinding]); } @@ -1607,6 +1607,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; #endif ], glTexImage2D: (target, level, internalFormat, width, height, border, format, type, pixels) => { + err("glTexImage2D", pixels); #if MAX_WEBGL_VERSION >= 2 #if WEBGL2_BACKWARDS_COMPATIBILITY_EMULATION if ({{{ isCurrentContextWebGL2() }}}) { @@ -3100,6 +3101,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; #if GL_ASSERTIONS GL.validateGLObjectID(GL.shaders, shader, 'glShaderSource', 'shader'); #endif + out('glShaderSource', shader, count, string, length); var source = GL.getSource(shader, count, string, length); #if WEBGL2_BACKWARDS_COMPATIBILITY_EMULATION @@ -3673,7 +3675,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; , '$emulGlGenVertexArrays' #endif ], - glGenVertexArrays: function (n, arrays) { + glGenVertexArrays: (n, arrays) => { #if LEGACY_GL_EMULATION emulGlGenVertexArrays(n, arrays); #else diff --git a/test/float_tex.cpp b/test/float_tex.cpp index 6c14f5168cf3a..f0e426bd9d2b7 100644 --- a/test/float_tex.cpp +++ b/test/float_tex.cpp @@ -9,10 +9,9 @@ #include #include #include -extern "C" { #include #include -} + static const char vertex_shader[] = "#ifdef GL_ES\n" "precision lowp float;\n" @@ -44,6 +43,7 @@ static const char fragment_shader[] = "}\n" "if ( dst > 0.5) discard;\n" "}"; + struct NodeInfo { //structure that we want to transmit to our shaders float x; float y; @@ -55,8 +55,9 @@ GLuint nodeSamplerLocation; //shader sampler address GLuint indicesAttributeLocation; //shader attribute address GLuint indicesVBO; //Vertex Buffer Object Id; const int nbNodes = 512; -NodeInfo * data = new NodeInfo[nbNodes]; //our data that will be transmitted using float texture. +NodeInfo data[nbNodes]; //our data that will be transmitted using float texture. double alpha = 0; //use to make a simple funny effect; + static void updateFloatTexture() { int count = 0; for (float x=0; x < nbNodes; ++x ) { @@ -79,7 +80,9 @@ static void updateFloatTexture() { glBindTexture(GL_TEXTURE_2D, 0); alpha -= 0.001; } + static void glut_draw_callback(void) { + printf("glut_draw_callback\n"); glDisable(GL_CULL_FACE); glDisable(GL_DEPTH_TEST); glEnable(GL_BLEND); @@ -96,6 +99,7 @@ static void glut_draw_callback(void) { glDrawArrays(GL_POINTS, 0, nbNodes); glutSwapBuffers(); } + GLuint createShader(const char source[], int type) { GLint status; char msg[512]; @@ -110,6 +114,7 @@ GLuint createShader(const char source[], int type) { assert(status == GL_TRUE); return shader; } + static void gl_init(void) { GLuint program = glCreateProgram(); glAttachShader(program, createShader(vertex_shader , GL_VERTEX_SHADER)); @@ -145,6 +150,7 @@ static void gl_init(void) { glEnable(GL_POINT_SPRITE); #endif } + int main(int argc, char *argv[]) { glutInit(&argc, argv); glutInitWindowSize(640, 480); @@ -153,6 +159,7 @@ int main(int argc, char *argv[]) { /* Set up glut callback functions */ glutDisplayFunc(glut_draw_callback ); gl_init(); + printf("done setup\n"); glutMainLoop(); return 0; } diff --git a/test/test_browser.py b/test/test_browser.py index b38a3a85385cb..bbafa2c13493b 100644 --- a/test/test_browser.py +++ b/test/test_browser.py @@ -1812,6 +1812,7 @@ def test_glgears_animation(self): self.run_browser('something.html', '/report_gl_result?true') @requires_graphics_hardware + @no_4gb('assertion fails') def test_fulles2_sdlproc(self): self.btest_exit('full_es2_sdlproc.c', assert_returncode=1, args=['-sGL_TESTING', '-DHAVE_BUILTIN_SINCOS', '-sFULL_ES2', '-lGL', '-lSDL', '-lglut', '-sGL_ENABLE_GET_PROC_ADDRESS']) @@ -1822,6 +1823,7 @@ def test_glgears_deriv(self): assert 'gl-matrix' not in read_file('test.html'), 'Should not include glMatrix when not needed' @requires_graphics_hardware + @no_4gb('fails to render') def test_glbook(self): self.emcc_args.append('-Wno-int-conversion') self.emcc_args.append('-Wno-pointer-sign') @@ -2013,6 +2015,7 @@ def test_gl_glteximage(self): }) @requires_graphics_hardware @requires_threads + @no_4gb('assertion failure') def test_gl_textures(self, args): self.btest_exit('gl_textures.cpp', args=['-lGL', '-g', '-sSTACK_SIZE=1MB'] + args) @@ -2047,14 +2050,17 @@ def test_gl_renderers(self): self.btest('gl_renderers.c', reference='gl_renderers.png', args=['-sGL_UNSAFE_OPTS=0', '-sLEGACY_GL_EMULATION', '-lGL', '-lSDL']) @requires_graphics_hardware + @no_4gb('render fails') def test_gl_stride(self): self.btest('gl_stride.c', reference='gl_stride.png', args=['-sGL_UNSAFE_OPTS=0', '-sLEGACY_GL_EMULATION', '-lGL', '-lSDL']) @requires_graphics_hardware + @no_4gb('assertion failure') def test_gl_vertex_buffer_pre(self): self.btest('gl_vertex_buffer_pre.c', reference='gl_vertex_buffer_pre.png', args=['-sGL_UNSAFE_OPTS=0', '-sLEGACY_GL_EMULATION', '-lGL', '-lSDL']) @requires_graphics_hardware + @no_4gb('assertion failure') def test_gl_vertex_buffer(self): self.btest('gl_vertex_buffer.c', reference='gl_vertex_buffer.png', args=['-sGL_UNSAFE_OPTS=0', '-sLEGACY_GL_EMULATION', '-lGL', '-lSDL'], reference_slack=1) @@ -2337,6 +2343,7 @@ def test_tex_nonbyte(self): self.btest('tex_nonbyte.c', reference='tex_nonbyte.png', args=['-sLEGACY_GL_EMULATION', '-lGL', '-lSDL']) @requires_graphics_hardware + @no_4gb('fails to render') def test_float_tex(self): self.btest('float_tex.cpp', reference='float_tex.png', args=['-lGL', '-lglut']) @@ -4821,6 +4828,7 @@ def test_preallocated_heap(self): # Tests emscripten_fetch() usage to XHR data directly to memory without persisting results to IndexedDB. @also_with_wasm2js + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_to_memory(self): # Test error reporting in the negative case when the file URL doesn't exist. (http 404) self.btest_exit('fetch/to_memory.cpp', @@ -4838,6 +4846,7 @@ def test_fetch_to_memory(self): }) @no_firefox('https://github.com/emscripten-core/emscripten/issues/16868') @requires_threads + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_from_thread(self, args): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/from_thread.cpp', @@ -4845,6 +4854,7 @@ def test_fetch_from_thread(self, args): also_wasm2js=True) @also_with_wasm2js + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_to_indexdb(self): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/to_indexeddb.cpp', @@ -4852,6 +4862,7 @@ def test_fetch_to_indexdb(self): # Tests emscripten_fetch() usage to persist an XHR into IndexedDB and subsequently load up from there. @also_with_wasm2js + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_cached_xhr(self): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/cached_xhr.cpp', @@ -4861,12 +4872,14 @@ def test_fetch_cached_xhr(self): @no_firefox('https://github.com/emscripten-core/emscripten/issues/16868') @also_with_wasm2js @requires_threads + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_response_headers(self): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/response_headers.cpp', args=['-sFETCH_DEBUG', '-sFETCH', '-pthread', '-sPROXY_TO_PTHREAD']) # Test emscripten_fetch() usage to stream a XHR in to memory without storing the full file in memory @also_with_wasm2js + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_stream_file(self): self.skipTest('moz-chunked-arraybuffer was firefox-only and has been removed') # Strategy: create a large 128MB file, and compile with a small 16MB Emscripten heap, so that the tested file @@ -4880,9 +4893,11 @@ def test_fetch_stream_file(self): self.btest_exit('fetch/stream_file.cpp', args=['-sFETCH_DEBUG', '-sFETCH', '-sINITIAL_MEMORY=536870912']) + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_headers_received(self): self.btest_exit('fetch/headers_received.cpp', args=['-sFETCH_DEBUG', '-sFETCH']) + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_xhr_abort(self): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/xhr_abort.cpp', args=['-sFETCH_DEBUG', '-sFETCH']) @@ -4892,6 +4907,7 @@ def test_fetch_xhr_abort(self): @no_firefox('https://github.com/emscripten-core/emscripten/issues/16868') @also_with_wasm2js @requires_threads + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_sync_xhr(self): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/sync_xhr.cpp', args=['-sFETCH_DEBUG', '-sFETCH', '-pthread', '-sPROXY_TO_PTHREAD']) @@ -4900,6 +4916,7 @@ def test_fetch_sync_xhr(self): # In that case, in append is implicitly understood. @no_firefox('https://github.com/emscripten-core/emscripten/issues/16868') @requires_threads + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_implicit_append(self): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/example_synchronous_fetch.c', args=['-sFETCH', '-pthread', '-sPROXY_TO_PTHREAD']) @@ -4907,6 +4924,7 @@ def test_fetch_implicit_append(self): # Tests synchronous emscripten_fetch() usage from wasm pthread in fastcomp. @no_firefox('https://github.com/emscripten-core/emscripten/issues/16868') @requires_threads + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_sync_xhr_in_wasm(self): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/example_synchronous_fetch.c', args=['-sFETCH', '-pthread', '-sPROXY_TO_PTHREAD']) @@ -4915,6 +4933,7 @@ def test_fetch_sync_xhr_in_wasm(self): @no_firefox('https://github.com/emscripten-core/emscripten/issues/16868') @also_with_wasm2js @requires_threads + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_sync_xhr_in_proxy_to_worker(self): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/sync_xhr.cpp', @@ -4938,6 +4957,7 @@ def test_fetch_idb_delete(self): shutil.copyfile(test_file('gears.png'), 'gears.png') self.btest_exit('fetch/idb_delete.cpp', args=['-pthread', '-sFETCH_DEBUG', '-sFETCH', '-sWASM=0', '-sPROXY_TO_PTHREAD']) + @no_4gb('TODO: fetch + wasm64_4gb support') def test_fetch_post(self): self.btest_exit('fetch/test_fetch_post.c', args=['-sFETCH']) @@ -5588,6 +5608,7 @@ def test_4gb(self): # Tests that emmalloc supports up to 4GB Wasm heaps. @no_firefox('no 4GB support yet') + @no_4gb('depends on specific memory limits') def test_emmalloc_4gb(self): # For now, keep this in browser as this suite runs serially, which # means we don't compete for memory with anything else (and run it @@ -5598,6 +5619,7 @@ def test_emmalloc_4gb(self): # Test that it is possible to malloc() a huge 3GB memory block in 4GB mode using emmalloc. # Also test emmalloc-memvalidate and emmalloc-memvalidate-verbose build configurations. @no_firefox('no 4GB support yet') + @no_4gb('depends on specific memory limits') @parameterized({ '': (['-sMALLOC=emmalloc'],), 'debug': (['-sMALLOC=emmalloc-debug'],), @@ -5610,6 +5632,7 @@ def test_emmalloc_3gb(self, args): # Test that it is possible to malloc() a huge 3GB memory block in 4GB mode using dlmalloc. @no_firefox('no 4GB support yet') + @no_4gb('depends on specific memory limits') def test_dlmalloc_3gb(self): self.btest_exit('alloc_3gb.c', args=['-sMALLOC=dlmalloc', '-sMAXIMUM_MEMORY=4GB', '-sALLOW_MEMORY_GROWTH=1']) @@ -5665,6 +5688,7 @@ def test_wasmfs_opfs_errors(self): self.btest(test, args=args, expected="0") @no_firefox('no 4GB support yet') + @no_4gb('depends on specific memory limits') def test_emmalloc_memgrowth(self, *args): self.btest('emmalloc_memgrowth.cpp', expected='0', args=['-sMALLOC=emmalloc', '-sALLOW_MEMORY_GROWTH=1', '-sABORTING_MALLOC=0', '-sASSERTIONS=2', '-sMINIMAL_RUNTIME=1', '-sMAXIMUM_MEMORY=4GB']) @@ -5917,4 +5941,6 @@ def setUp(self): self.set_setting('INITIAL_MEMORY', '4200mb') self.set_setting('GLOBAL_BASE', '4gb') self.emcc_args.append('-Wno-experimental') + # Without this we get a warning about GLOBAL_BASE being ignored when used with SIDE_MODULE + self.emcc_args.append('-Wno-unused-command-line-argument') self.require_wasm64()