[Test] (MG_Util, MG_State): remove the TEMP stage-timing probes - the async-compile measurement campaign is done

This commit is contained in:
2026-08-10 09:56:05 -04:00
parent c3412ca394
commit d868e1c476
6 changed files with 8 additions and 228 deletions
@@ -32,7 +32,6 @@
#include <MG_Backend/BackendObjects.h>
#include <MG_Util/Converters/GLToStr/GLEnumConverter.h>
#include <MG_Util/Converters/GLToGlslang/ProgramEnumConverter.h>
#include <MG_Util/Debug/TempStageProbe.h> // TEMP-STAGE-PROBE
#include <cstdlib>
namespace MobileGL {
@@ -225,18 +224,8 @@ namespace MobileGL {
return std::unexpected(r);
}
// TEMP-STAGE-PROBE: "parse" - one glslang TShader::parse. Both the first
// attempt and the legacy-#version retry below go through here, and so does
// ProgramLinkTask's consume-once re-parse (separately counted there as
// "parse-reparse") and ShaderCompiler::PrewarmBuiltins' three warm-up parses.
const auto tempStageProbeParseShaderSource = [&](const String& tempStageProbeSource) {
const MobileGL::MG_Util::Debug::TempStageProbeScope tempStageProbeParse(
MobileGL::MG_Util::Debug::kTempStageProbeParse);
return ParseShaderSource(lang, shaderType, tempStageProbeSource, attrib.flags, attrib.env);
};
const String source(attrib.sourceStr);
auto result = tempStageProbeParseShaderSource(source);
auto result = ParseShaderSource(lang, shaderType, source, attrib.flags, attrib.env);
if (result) return result;
// Legacy desktop sources are normalized to "#version 330 core" (with a marker on the
@@ -252,7 +241,7 @@ namespace MobileGL {
return result;
}
auto retryResult = tempStageProbeParseShaderSource(retrySource); // TEMP-STAGE-PROBE
auto retryResult = ParseShaderSource(lang, shaderType, retrySource, attrib.flags, attrib.env);
if (!retryResult) return result;
MGLOG_D("CompileShader: %s only parsed after retargeting its legacy #version to 460",
@@ -385,19 +374,6 @@ namespace MobileGL {
return optimizer.Run(inputBinary.data(), inputBinary.size(), &outputBinary, options);
}
// TEMP-STAGE-PROBE tempStageProbeNullOptimize: SanitizeAndOptimizeBinary minus
// every pass - measures the pure IR plumbing (BuildModule + serialize +
// IRContext teardown) so a device run can separate allocator-bound plumbing
// from transformation work. Remove with the probes.
bool ShaderCompiler::TempProbeNullOptimizeBinary(const Vector<Uint32>& inputBinary,
Vector<uint32_t>& outputBinary) {
using namespace spvtools;
OptimizerOptions options;
options.set_run_validator(false);
Optimizer optimizer(SPV_ENV_VULKAN_1_1);
return optimizer.Run(inputBinary.data(), inputBinary.size(), &outputBinary, options);
}
bool ShaderCompiler::LowerDrawParametersForEssl(const Vector<Uint32>& inputBinary,
Vector<uint32_t>& outputBinary) {
using namespace spvtools;