Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix glDrawElements under CAN_ADDRESS_2GB #21247

Merged
merged 1 commit into from
Feb 2, 2024
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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,9 @@ jobs:
browser_2gb.test_fetch_to_memory
browser_2gb.test_emscripten_animate_canvas_element_size_manual_css
browser_2gb.test_fulles2_sdlproc
browser_2gb.test_cubegeom
browser_2gb.test_cubegeom_normal
browser_2gb.test_cubegeom_normal_dap
"
test-browser-chrome-wasm64-4gb:
executor: bionic
Expand Down
6 changes: 4 additions & 2 deletions src/library_glemu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3527,8 +3527,10 @@ var LibraryGLEmulation = {
GLImmediate.mode = mode;
if (!GLctx.currentArrayBufferBinding) {
GLImmediate.firstVertex = end ? start : HEAP8.length; // if we don't know the start, set an invalid value and we will calculate it later from the indices
GLImmediate.lastVertex = end ? end+1 : 0;
GLImmediate.vertexData = HEAPF32.subarray(GLImmediate.vertexPointer >> 2, end ? (GLImmediate.vertexPointer + (end+1)*GLImmediate.stride) >> 2 : undefined); // XXX assuming float
GLImmediate.lastVertex = end ? end + 1 : 0;
start = GLImmediate.vertexPointer;
end = end ? GLImmediate.vertexPointer + (end+1)*GLImmediate.stride : undefined;
GLImmediate.vertexData = HEAPF32.subarray({{{ getHeapOffset('start', 'float') }}}, end ? {{{ getHeapOffset('end', 'float') }}} : undefined);
}
GLImmediate.flush(count, 0, indices);
GLImmediate.mode = -1;
Expand Down
Loading