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

Shader cache #1407

Open
CedricGuillemet opened this issue Aug 14, 2024 · 0 comments
Open

Shader cache #1407

CedricGuillemet opened this issue Aug 14, 2024 · 0 comments
Assignees
Milestone

Comments

@CedricGuillemet
Copy link
Contributor

CedricGuillemet commented Aug 14, 2024

Parse and convert shader once during app lifetime or bundle the cache with the app. This implies a fixed number of shaders and variations.
Performance gain are noticeable on BN validation tests or with users app.

This works at Native level. I don't see a need to expose it to JS.

  • 1 cache per engine. Construct it once per App, then add a reference in engine
  • Use (optional?) compressor like LZ4 for extra compression
  • Store API in cache header so it's not possible to mismatch
  • It makes sense to use UnitTests to generate the cache and inject it back in the build. How to do it efficiently on the CI? Is it possible to generate GLSL on win32 platform. Or Metal from a MacOS CI agent? -> leave the work to users
  • Logging/exception when a shader is not found in cache and GLSLANG/SPIRV is disabled
  • Add build options to disable SPIRV/GLSlang build and link.

PR : #1402

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

No branches or pull requests

2 participants