mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-10 05:08:31 +09:00
[Perf] (ShaderTranspiler, ProgramState): memoize the glslang parse verdict so a repeated compile skips the parse
This commit is contained in:
+8
-7
@@ -203,13 +203,14 @@ namespace MobileGL::MG_Config {
|
||||
// immediately stay serial by their own construction). Off by default; never
|
||||
// advertise it.
|
||||
QuirkOverride AsyncOptimisticShaderStatus = QuirkOverride::Auto;
|
||||
// MOBILEGL_SHADER_CACHE: the two-level, in-memory shader translation memo
|
||||
// (MG_Util/ShaderTranspiler/TranslationCache.h) - L1 memoizes a linked
|
||||
// program's sanitized SPIR-V, L2 memoizes DirectGLES's emitted ESSL. Auto
|
||||
// is ON; ForceOff turns BOTH levels off and makes every translation run
|
||||
// from scratch. The escape hatch exists because a wrong cache hit is a
|
||||
// silently miscompiled shader: if a device ever renders differently with
|
||||
// the cache on, one run with this falsy says so.
|
||||
// MOBILEGL_SHADER_CACHE: the three-level, in-memory shader translation memo
|
||||
// (MG_Util/ShaderTranspiler/TranslationCache.h). The levels follow the GL
|
||||
// entry points - L1c memoizes one glCompileShader's PARSE VERDICT, L1 a
|
||||
// linked program's whole front end, L2 DirectGLES's emitted ESSL. Auto is
|
||||
// ON; ForceOff turns ALL THREE off and makes every translation run from
|
||||
// scratch. The escape hatch exists because a wrong cache hit is a silently
|
||||
// miscompiled shader: if a device ever renders differently with the cache
|
||||
// on, one run with this falsy says so.
|
||||
QuirkOverride ShaderTranslationCache = QuirkOverride::Auto;
|
||||
};
|
||||
extern FeaturesTable Features;
|
||||
|
||||
Reference in New Issue
Block a user