// Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors. // All rights reserved. // Code licensed under the BSD License. // http://www.anki3d.org/LICENSE #pragma once #include #include namespace anki { /// @addtogroup shader_compiler /// @{ enum class MaliOfflineCompilerHwUnit : U8 { kNone, kFma, kCvt, kSfu, kLoadStore, kVarying, kTexture }; /// Mali offline compiler output. class MaliOfflineCompilerOut { public: // Instructions F32 m_fma = 0.0f; F32 m_cvt = 0.0f; F32 m_sfu = 0.0f; F32 m_loadStore = 0.0f; F32 m_varying = 0.0f; F32 m_texture = 0.0f; MaliOfflineCompilerHwUnit m_boundUnit = MaliOfflineCompilerHwUnit::kNone; U32 m_workRegisters = 0; U32 m_spilling = 0; F32 m_fp16ArithmeticPercentage = 0.0f; String toString() const; }; /// Run the mali offline compiler and get some info back. Error runMaliOfflineCompiler(ConstWeakArray spirv, ShaderType shaderType, MaliOfflineCompilerOut& out); /// @} } // end namespace anki