Skip to content

Disable VAO cache under Emscripten#678

Closed
jdarpinian wants to merge 1 commit intoioquake:mainfrom
jdarpinian:disable-vao-cache
Closed

Disable VAO cache under Emscripten#678
jdarpinian wants to merge 1 commit intoioquake:mainfrom
jdarpinian:disable-vao-cache

Conversation

@jdarpinian
Copy link
Copy Markdown

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
Copy Markdown

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.

@zturtleman
Copy link
Copy Markdown

Fixed via #723.

@zturtleman zturtleman closed this Jun 12, 2025
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