Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/library_webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1663,6 +1663,9 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
if (internalFormat == 0x84f9 /*GL_DEPTH_STENCIL*/) {
internalFormat = 0x88F0 /*GL_DEPTH24_STENCIL8*/;
}
if (internalFormat == 0x1908 /*GL_RGBA*/ && type == 0x1406 /*GL_FLOAT*/) {
internalFormat = 0x8814 /*GL_RGBA32F*/;
}
}
#endif
if ({{{ isCurrentContextWebGL2() }}}) {
Expand Down
10 changes: 8 additions & 2 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2323,8 +2323,14 @@ def test_float_tex(self):
self.btest('float_tex.c', reference='float_tex.png', args=['-lGL', '-lglut'])

@requires_graphics_hardware
def test_subdata(self):
self.btest('gl_subdata.c', reference='float_tex.png', args=['-lGL', '-lglut'])
@parameterized({
'': ([],),
'es2': (['-sMIN_WEBGL_VERSION=2', '-sFULL_ES2', '-sWEBGL2_BACKWARDS_COMPATIBILITY_EMULATION'],),
})
def test_subdata(self, args):
if self.is_4gb() and args:
self.skipTest('texSubImage2D fails: https://crbug.com/325090165')
self.btest('gl_subdata.c', reference='float_tex.png', args=['-lGL', '-lglut'] + args)

@requires_graphics_hardware
def test_perspective(self):
Expand Down