forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for zero count in glUniform family of functions
The previous fix for this was in emscripten-core#16837, but I looks like that only covered the new "garbage-free" webgl2 path. When old webgl1 path was still using the zero count value. For example the following line was unguarded: ``` var view = miniTempWebGLFloatBuffers[4 * count - 1]; ``` This recently resurfaced because I introduced `WEBGL_USE_GARBAGE_FREE_APIS` which is currently disabled for memories larger 2gb. This meant that users with large memories were forces onto the old path where the bug still existed. Rather than adding yet more `count &&` prefixes, this patch simply adds a single early return at the top of each function. As part of this change I resurrected `test_webgl_draw_triangle_with_uniform_color.c` which has not actually be used since emscripten-core#20925. Fixes: emscripten-core#21567
- Loading branch information
Showing
7 changed files
with
63 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"a.html": 569, | ||
"a.html.gz": 379, | ||
"a.js": 4539, | ||
"a.js.gz": 2315, | ||
"a.js": 4541, | ||
"a.js.gz": 2317, | ||
"a.wasm": 10454, | ||
"a.wasm.gz": 6727, | ||
"total": 15562, | ||
"total_gz": 9421 | ||
"total": 15564, | ||
"total_gz": 9423 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"a.html": 354, | ||
"a.html.gz": 266, | ||
"a.js": 22282, | ||
"a.js.gz": 11608, | ||
"total": 22636, | ||
"total_gz": 11874 | ||
"a.js": 22284, | ||
"a.js.gz": 11611, | ||
"total": 22638, | ||
"total_gz": 11877 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"a.html": 569, | ||
"a.html.gz": 379, | ||
"a.js": 4056, | ||
"a.js.gz": 2152, | ||
"a.js": 4061, | ||
"a.js.gz": 2154, | ||
"a.wasm": 10454, | ||
"a.wasm.gz": 6727, | ||
"total": 15079, | ||
"total_gz": 9258 | ||
"total": 15084, | ||
"total_gz": 9260 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"a.html": 354, | ||
"a.html.gz": 266, | ||
"a.js": 21784, | ||
"a.js.gz": 11435, | ||
"total": 22138, | ||
"total_gz": 11701 | ||
"a.js": 21789, | ||
"a.js.gz": 11437, | ||
"total": 22143, | ||
"total_gz": 11703 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters