[Feat] (MG_Backend/DirectVulkan): ProgramFactory and some refactoring

This commit is contained in:
2026-02-16 22:29:04 +08:00
parent 91326025f3
commit 2ad1207a31
10 changed files with 197 additions and 57 deletions
@@ -179,6 +179,10 @@ namespace MobileGL {
return m_shaders;
}
const Vector<SharedPtr<ShaderObject>>& ProgramObject::GetAttachedShaders() const {
return m_shaders;
}
void ProgramObject::DoReflection() {
if (!m_program) {
MGLOG_E("ProgramObject %u: DoReflection called but m_program is null", m_externalIndex);
@@ -30,6 +30,7 @@ namespace MobileGL {
Int GetFragmentDataLocation(const char* name);
Vector<SharedPtr<ShaderObject>>& GetAttachedShaders();
const Vector<SharedPtr<ShaderObject>>& GetAttachedShaders() const;
const String& GetInfoLog() const { return m_infoLog; }
Int GetUniformMaxLength() const { return m_uniformNameMaxLength; }
Uint GetUniformCount() { return m_activeUniformCount; }
@@ -111,6 +112,7 @@ namespace MobileGL {
Uint GetUniformBlockBinding(Uint index) const { return m_uniformBlockBinding[index]; }
Vector<Vector<unsigned>>& GetGeneratedSpirv() { return m_generatedSpirv; }
const Vector<Vector<unsigned>>& GetGeneratedSpirv() const { return m_generatedSpirv; }
Int GetShaderIndexByStage(ShaderStage stage) const {
auto it = std::find_if(m_shaders.begin(), m_shaders.end(),