Skip to content

Commit d482a46

Browse files
authored
Add parameter names to GL Emulation functions to fix 4GB mode link error (#19962)
Without this, we hit error: handleI64Signatures: missing name for argument 1 in glGetTexLevelParameteriv Fixes #19944
1 parent bf2fcc2 commit d482a46

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

src/library_glemu.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3810,18 +3810,18 @@ var LibraryGLEmulation = {
38103810
}
38113811
},
38123812

3813-
glTexGeni: function() { throw 'glTexGeni: TODO' },
3814-
glTexGenfv: function() { throw 'glTexGenfv: TODO' },
3815-
glTexEnvi: function() { warnOnce('glTexEnvi: TODO') },
3816-
glTexEnvf: function() { warnOnce('glTexEnvf: TODO') },
3817-
glTexEnvfv: function() { warnOnce('glTexEnvfv: TODO') },
3813+
glTexGeni: function(coord, pname, param) { throw 'glTexGeni: TODO' },
3814+
glTexGenfv: function(coord, pname, param) { throw 'glTexGenfv: TODO' },
3815+
glTexEnvi: function(target, pname, params) { warnOnce('glTexEnvi: TODO') },
3816+
glTexEnvf: function(target, pname, params) { warnOnce('glTexEnvf: TODO') },
3817+
glTexEnvfv: function(target, pname, params) { warnOnce('glTexEnvfv: TODO') },
38183818

38193819
glGetTexEnviv: function(target, pname, param) { throw 'GL emulation not initialized!'; },
38203820
glGetTexEnvfv: function(target, pname, param) { throw 'GL emulation not initialized!'; },
38213821

3822-
glTexImage1D: function() { throw 'glTexImage1D: TODO' },
3823-
glTexCoord3f: function() { throw 'glTexCoord3f: TODO' },
3824-
glGetTexLevelParameteriv: function() { throw 'glGetTexLevelParameteriv: TODO' },
3822+
glTexImage1D: function(target, level, internalformat, width, border, format, type, data) { throw 'glTexImage1D: TODO' },
3823+
glTexCoord3f: function(target, level, internalformat, width, border, format, type, data) { throw 'glTexCoord3f: TODO' },
3824+
glGetTexLevelParameteriv: function(target, level, pname, params) { throw 'glGetTexLevelParameteriv: TODO' },
38253825

38263826
glShadeModel: function() { warnOnce('TODO: glShadeModel') },
38273827

test/glgettexenv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ int main(int argc, char *argv[])
6868
assert(colora[1] == colorb[1]);
6969
assert(colora[2] == colorb[2]);
7070
assert(colora[3] == colorb[3]);
71+
7172
SDL_Quit();
72-
73+
7374
#ifdef REPORT_RESULT
7475
REPORT_RESULT(1);
7576
#endif

test/test_other.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8774,7 +8774,8 @@ def test(check, extra):
87748774
@parameterized({
87758775
'': ([],),
87768776
'asyncify': (['-sASYNCIFY'],),
8777-
'gl_emu': (['-sLEGACY_GL_EMULATION'],),
8777+
# set max_memory to 4GB to test handleI64Signatures() with GL emulation
8778+
'gl_emu': (['-sLEGACY_GL_EMULATION', '-sMAXIMUM_MEMORY=4GB', '-sALLOW_MEMORY_GROWTH'],),
87788779
'no_exception_throwing': (['-sDISABLE_EXCEPTION_THROWING'],),
87798780
'minimal_runtime': (['-sMINIMAL_RUNTIME'],),
87808781
})

0 commit comments

Comments
 (0)