Skip to content

Conversation

floryst
Copy link
Contributor

@floryst floryst commented Nov 10, 2022

Context

gl.getExtension() calls generally are very fast, but we can skip these calls entirely in webgl2 codepaths.

Results

Slight perf improvement.

Changes

  • OpenGLTexture now conditionally calls getExtension() in webgl2 code pathways. While the half_float extension result can technically be cached, I'm not going to introduce that here, since it's only relevant in webgl1 pathways. refactor(WebGL): remove support for WebGL1 #2212 is related here.

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

CI will run tests.

@floryst floryst requested a review from finetjul November 10, 2022 17:00
@finetjul
Copy link
Member

@bruyeret

Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

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

LGTM

@FezVrasta
Copy link
Contributor

Can confirm performance is greatly improved when a Float32 input is provided.

@floryst floryst merged commit 63762f7 into master Nov 14, 2022
@floryst floryst deleted the perf-conditionally-call-getExtension branch November 14, 2022 17:12
@github-actions
Copy link

🎉 This PR is included in version 25.13.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Automated label label Nov 14, 2022
@github-actions
Copy link

🎉 This PR is included in version 26.0.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released on @beta Automated label label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @beta Automated label released Automated label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants