mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-16 22:43:24 +09:00
[Test] (MG_Test/Program, MG_Util/ShaderTranspiler, MobileGL): probe the prewarm by its log line
- test hooks stay out of production code: ShaderCompiler::BuiltinsPrewarmed() existed only for ShaderPrewarmTest and is gone - Initialize() logs at INFO whether it prewarmed the built-in tables or skipped them for MOBILEGL_DISABLE_SHADER_PREWARM; the test reads that line from a private log file - still red with the knob's gate removed and with Destroy's latch reset removed; passes on the split and monolith builds
This commit is contained in:
@@ -456,10 +456,6 @@ namespace MobileGL {
|
||||
g_builtinsPrewarmed = false;
|
||||
}
|
||||
|
||||
Bool ShaderCompiler::BuiltinsPrewarmed() {
|
||||
return g_builtinsPrewarmed;
|
||||
}
|
||||
|
||||
void ShaderCompiler::PrewarmBuiltins() {
|
||||
if (g_builtinsPrewarmed) return;
|
||||
g_builtinsPrewarmed = true;
|
||||
@@ -491,6 +487,7 @@ namespace MobileGL {
|
||||
// The parses above left this thread's glslang allocator pointing at the last
|
||||
// TShader's pool, and that TShader is about to be destroyed with it.
|
||||
glslang::SetThreadPoolAllocator(nullptr);
|
||||
MGLOG_I("ShaderCompiler: prewarmed the glslang built-in tables for #version 460 and 330 core");
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -533,8 +533,6 @@ namespace MobileGL {
|
||||
// it, the second eglInitialize of a process comes back up unwarmed and with
|
||||
// no way left to warm it.
|
||||
static void ResetPrewarmLatch();
|
||||
// Whether PrewarmBuiltins has run since the last ResetPrewarmLatch.
|
||||
static Bool BuiltinsPrewarmed();
|
||||
|
||||
// Validation is an explicit immutable option of each compiler operation. The
|
||||
// program-link task snapshots MOBILEGL_ENABLE_SPIRV_VALIDATION before it can run
|
||||
|
||||
Reference in New Issue
Block a user