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

webgl: Fix errors on some glUniform calls with memory size over 2GiB in WebGL2 #21819

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

ntwbvdbl-oe
Copy link
Contributor

In #21445, temporary buffers were appropriately included in dependencies. But in the following #21462 they were overlooked, resulting in errors on certain GL calls when memory size exceeded 2GiB in WebGL2. This pull request aims to fix this issue.

…in WebGL2

In emscripten-core#21445, temporary buffers were appropriately included in
dependencies. But in the following emscripten-core#21462 they were overlooked,
resulting in errors on certain GL calls when memory size exceeded 2GiB
in WebGL2. This pull request aims to fix this issue.
@@ -2412,7 +2412,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
},

glUniform1iv__deps: ['$webglGetUniformLocation'
#if GL_POOL_TEMP_BUFFERS && MIN_WEBGL_VERSION == 1
#if GL_POOL_TEMP_BUFFERS && !(MIN_WEBGL_VERSION >= 2 && WEBGL_USE_GARBAGE_FREE_APIS)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this maybe reads better as (MIN_WEBGL_VERSION == 1 || !WEBGL_USE_GARBAGE_FREE_APIS).

I can read that as "if we are using WebGL 1 or we can't use the garbage free API".

I know that is kind of the opposite of how its written in the code ..

@ntwbvdbl-oe ntwbvdbl-oe requested a review from sbc100 April 25, 2024 04:23
@sbc100 sbc100 merged commit 4e7c86a into emscripten-core:main Apr 25, 2024
27 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants