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

Disable VAO cache under Emscripten #678

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jdarpinian
Copy link

The VAO surface cache uses bufferSubData and triggers a very slow path in some GLES implementations. Specifically I have observed 10x frame times with ANGLE/Metal on macOS and with Mali on Android.

Of course disabling the cache is not ideal. But at least this fixes wildly inconsistent frame times for now.

The VAO surface cache uses bufferSubData and triggers a very slow path
in some GLES implementations. Specifically I have observed 10x frame
times with ANGLE/Metal on macOS and with Mali on Android.
@zturtleman
Copy link
Member

The VAO cache is slow on practically everything except Nvidia's driver. (The handling could use being reworked.)

  • You can remove the cvar from code/renderergl1/
  • Rename r_disableStaticSurfaceVaoCache to r_vaoCache (and invert the usage, if (!r_vaoCache->integer))
  • Default it to 0 for all platforms (disabling the VAO cache)
  • Remove the code comment explaining changing it for Emscripten

Commit message suggestion:

OpenGL2: Disable the VAO cache by default

The VAO surface cache uses glBufferSubData and triggers a very slow path
in some GLES implementations. Specifically I have observed 10x frame
times under Emscripten with ANGLE/Metal on macOS and with Mali on
Android.

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