Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed Oct 10, 2024
1 parent fcb5161 commit 00dd710
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
11 changes: 5 additions & 6 deletions src/library_glemu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ var LibraryGLEmulation = {
GLImmediate.rendererComponents[name] = 1;
#if ASSERTIONS
if (GLImmediate.enabledClientAttributes[name]) {
out("Warning: glTexCoord used after EnableClientState for TEXTURE_COORD_ARRAY for TEXTURE0. Disabling TEXTURE_COORD_ARRAY...");
warnOnce("Warning: glTexCoord used after EnableClientState for TEXTURE_COORD_ARRAY for TEXTURE0. Disabling TEXTURE_COORD_ARRAY...");
}
#endif
GLImmediate.enabledClientAttributes[name] = true;
Expand Down Expand Up @@ -2980,11 +2980,10 @@ var LibraryGLEmulation = {
var attr = attributes[i];
var srcStride = Math.max(attr.sizeBytes, attr.stride);
if ((srcStride & 3) == 0 && (attr.sizeBytes & 3) == 0) {
var size4 = attr.sizeBytes>>2;
var srcStride4 = Math.max(attr.sizeBytes, attr.stride)>>2;
for (var j = 0; j < count; j++) {
for (var k = 0; k < size4; k++) { // copy in chunks of 4 bytes, our alignment makes this possible
HEAP32[((start + attr.offset + bytes*j)>>2) + k] = HEAP32[(attr.pointer>>2) + j*srcStride4 + k];
for (var k = 0; k < attr.sizeBytes; k+=4) { // copy in chunks of 4 bytes, our alignment makes this possible
var val = {{{ makeGetValue('attr.pointer', 'j*srcStride + k', 'i32') }}};
{{{ makeSetValue('start + attr.offset', 'bytes*j + k', 'val', 'i32') }}};
}
}
} else {
Expand Down Expand Up @@ -3533,7 +3532,7 @@ var LibraryGLEmulation = {
if (!GLctx.currentElementArrayBufferBinding) {
assert(type == GLctx.UNSIGNED_SHORT); // We can only emulate buffers of this kind, for now
}
out("DrawElements doesn't actually prepareClientAttributes properly.");
warnOnce("DrawElements doesn't actually prepareClientAttributes properly.");
#endif
GLImmediate.prepareClientAttributes(count, false);
GLImmediate.mode = mode;
Expand Down
4 changes: 0 additions & 4 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3050,8 +3050,6 @@ def test_sdl2_gl_read(self):
# SDL, OpenGL, readPixels
self.btest_exit('test_sdl2_gl_read.c', args=['-sUSE_SDL=2'])

@no_4gb('https://github.com/libsdl-org/SDL/issues/9052')
@no_2gb('https://github.com/libsdl-org/SDL/issues/9052')
@requires_graphics_hardware
def test_sdl2_glmatrixmode_texture(self):
self.reftest('test_sdl2_glmatrixmode_texture.c', 'test_sdl2_glmatrixmode_texture.png',
Expand Down Expand Up @@ -3105,8 +3103,6 @@ def test_sdl2_fog_linear(self):
def test_sdl2_unwasteful(self):
self.btest_exit('test_sdl2_unwasteful.c', args=['-sUSE_SDL=2', '-O1'])

@no_2gb('https://github.com/libsdl-org/SDL/issues/9052')
@no_4gb('https://github.com/libsdl-org/SDL/issues/9052')
def test_sdl2_canvas_write(self):
self.btest_exit('test_sdl2_canvas_write.c', args=['-sUSE_SDL=2'])

Expand Down
2 changes: 1 addition & 1 deletion tools/ports/sdl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_lib_name(settings):

def get(ports, settings, shared):
# get the port
ports.fetch_project('sdl2', f'https://github.com/libsdl-org/SDL/archive/{TAG}.zip', sha512hash=HASH)
ports.fetch_project('sdl2', f'https://github.com/sbc100/SDL/archive/{TAG}.zip', sha512hash=HASH)

def create(final):
# copy includes to a location so they can be used as 'SDL2/'
Expand Down

0 comments on commit 00dd710

Please sign in to comment.