Skip to content

Shader cache #1407

Open
Open
@CedricGuillemet

Description

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

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions