[Feat] (MG_Util/ShaderTranspiler): do FloatEqualsZero elimination by leveraging SPIRV-Tool opt pass

This commit is contained in:
2026-01-24 17:35:33 +08:00
parent 3b5047f2c4
commit 484174767d
8 changed files with 224 additions and 40 deletions
@@ -20,6 +20,7 @@ namespace MobileGL {
static Result<SharedPtr<glslang::TShader>> CompileShader(const ShaderAttrib& attrib);
static Result<SharedPtr<glslang::TProgram>> LinkProgram(const ProgramAttrib& attrib);
static Result<Vector<Vector<unsigned>>> GetSpirvBinaryFromProgram(const ProgramBinaryAttrib& attrib);
static bool SanitizeBinary(const Vector<Uint32>& inputBinary, Vector<uint32_t>& outputBinary);
static Result<String> DecompileShader(SpvcSession& session);
};
} // namespace ShaderTranspiler