[Feat|Perf] (MG_Backend/DirectGLES): Skip whole texture params sync when not dirty.

This commit is contained in:
BZLZHH
2026-02-03 00:17:02 +08:00
parent 7daa69cf73
commit 4225cc4333
2 changed files with 8 additions and 0 deletions
@@ -644,6 +644,13 @@ namespace MobileGL::MG_Backend::DirectGLES {
return;
}
Uint16 currentTextureParamsVersion = stateTextureObject->GetTextureParamsVersion();
if (m_syncedTextureParamsVersion == currentTextureParamsVersion) {
MGLOG_D("Texture parameters have not changed for texture ID: %u, skipping sync.", m_backendTextureId);
return;
}
m_syncedTextureParamsVersion = currentTextureParamsVersion;
MGLOG_D("Syncing texture params with backend ID %u to backend for state ID %u", m_backendTextureId,
stateTextureObject->GetExternalIndex());