-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Remove OFFSCREEN_FRAMEBUFFER_FORBID_VAO_PATH. NFC #23056
base: main
Are you sure you want to change the base?
Conversation
a76ddbe
to
6f8d24b
Compare
assert(GL.currentContext.defaultVao); | ||
GL.currentContext.defaultVao = undefined; | ||
}); | ||
#endif | ||
|
||
#if !TEST_WEBGL2 && TEST_VAO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anything set TEST_VAO? I can't find any other references to it. I think maybe we want this to be
#if !TEST_WEBGL2 && !TEST_DISABLE_VAO
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know I'm afraid, but that seems like a pre-existing condition here.
test/test_browser.py
Outdated
'gl1': (['-sMAX_WEBGL_VERSION=1'],), | ||
'gl1_max_gl2': (['-sMAX_WEBGL_VERSION=2'],), | ||
# VAO path on WebGL 2.0 | ||
'gl2': (['-sMAX_WEBGL_VERSION=2', '-DTEST_WEBGL2=1', '-DTEST_ANTIALIAS=1', '-DTEST_REQUIRE_VAO=1'],), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly I don't see any references to TEST_REQUIRE_VAO
, does it do anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, this pre-existing state seems maybe wrong. I'll see if I can make a separate PR to fix that before I land this one.
#ifdef TEST_DISABLE_VAO | ||
EM_ASM({ | ||
console.log(GL.currentContext.defaultVao); | ||
assert(GL.currentContext.defaultVao); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assert seems like it should fail on WebGL 1.0 because we won't have created a defaultVao
unless OES_vertex_array_object has been enabled, which it hasn't yet (that happens below).
Except the code that creates defaultVao
runs early, in createContext
>registerContext
>createOffscreenFramebuffer
, so evidently webgl_enable_OES_vertex_array_object
has already run by that point.
I don't know how that happens.
This was the only remaining test-only setting. The same effect can be achieved instead using some EM_ASM.
6f8d24b
to
c9f87e8
Compare
Updated. PTAL |
This was the only remaining test-only setting. The same effect can be achieved instead using some EM_ASM.