Skip to content

Commit f3c4c2a

Browse files
authored
[Wasm64] Get test_anisotropic with MEMORY64 (#18971)
This required fixing some basic SDL and OpenGL operations.
1 parent 94ae66a commit f3c4c2a

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

src/library_glemu.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,7 @@ var LibraryGLEmulation = {
417417
(GL.currentContext.compressionExt ? ' GL_ARB_texture_compression GL_EXT_texture_compression_s3tc' : '') +
418418
(GL.currentContext.anisotropicExt ? ' GL_EXT_texture_filter_anisotropic' : '')
419419
);
420-
GL.stringCache[name_] = ret;
421-
return ret;
420+
return GL.stringCache[name_] = {{{ to64('ret') }}};
422421
}
423422
return glGetString(name_);
424423
};
@@ -3672,6 +3671,7 @@ var LibraryGLEmulation = {
36723671
GLImmediate.matrixLib.mat4.set({{{ makeHEAPView('F64', 'matrix', 'matrix+' + (16*8)) }}}, GLImmediate.matrix[GLImmediate.currentMatrix]);
36733672
},
36743673

3674+
glLoadMatrixf__sig: 'vp',
36753675
glLoadMatrixf: function(matrix) {
36763676
#if GL_DEBUG
36773677
if (GL.debug) dbg('glLoadMatrixf receiving: ' + Array.prototype.slice.call(HEAPF32.subarray(matrix >> 2, (matrix >> 2) + 16)));
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/test_browser.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,9 +2249,10 @@ def test_s3tc_ffp_only(self):
22492249
self.btest('s3tc.c', reference='s3tc.png', args=['--preload-file', 'screenshot.dds', '-sLEGACY_GL_EMULATION', '-sGL_FFP_ONLY', '-lGL', '-lSDL'])
22502250

22512251
@requires_graphics_hardware
2252-
def test_aniso(self):
2253-
shutil.copyfile(test_file('water.dds'), 'water.dds')
2254-
self.btest('aniso.c', reference='aniso.png', reference_slack=2, args=['--preload-file', 'water.dds', '-sLEGACY_GL_EMULATION', '-lGL', '-lSDL', '-Wno-incompatible-pointer-types'])
2252+
@also_with_wasm64
2253+
def test_anisotropic(self):
2254+
shutil.copyfile(test_file('browser/water.dds'), 'water.dds')
2255+
self.btest('browser/test_anisotropic.c', reference='browser/test_anisotropic.png', reference_slack=2, args=['--preload-file', 'water.dds', '-sLEGACY_GL_EMULATION', '-lGL', '-lSDL', '-Wno-incompatible-pointer-types'])
22552256

22562257
@requires_graphics_hardware
22572258
def test_tex_nonbyte(self):

0 commit comments

Comments
 (0)