diff --git a/src/gx/CGxDevice.cpp b/src/gx/CGxDevice.cpp index 1a354b7..d96376e 100644 --- a/src/gx/CGxDevice.cpp +++ b/src/gx/CGxDevice.cpp @@ -432,7 +432,7 @@ void CGxDevice::IRsSync(int32_t force) { this->IRsForceUpdate(); } - for (int32_t i = 0; i < this->m_dirtyStates.Count(); i++) { + for (int32_t i = this->m_dirtyStates.Count() - 1; i >= 0; i--) { auto ds = this->m_dirtyStates[i]; auto rs = &this->m_appRenderStates[ds]; auto hs = &this->m_hwRenderStates[ds];