mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 22:28:32 +09:00
[Fix] (Impl): move the DeleteSync fill of the orphan sweep inside its null-entry guard
- D7 says a verb whose table entry is null never bumps the serial; the sweep's fill sat before `if (backendDeleteSync && syncObject->backendHandle)`, so a backend without DeleteSync, or a sync without a backend handle, bumped once per orphan with nothing reading the fill. - The sibling sweep in GL_Query.cpp (DeleteBackendQuery) already fills inside its guard; this makes the two the same shape and leaves the declared list of guarded-expression sites at nine. - Pull build unchanged: MGP_FILL is ((void)0) there.
This commit is contained in:
@@ -232,8 +232,8 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
// the function table itself is cleared.
|
// the function table itself is cleared.
|
||||||
const auto backendDeleteSync = MG_Backend::gBackendFunctionsTable.GL.DeleteSync;
|
const auto backendDeleteSync = MG_Backend::gBackendFunctionsTable.GL.DeleteSync;
|
||||||
for (const auto& [_, syncObject] : orphans) {
|
for (const auto& [_, syncObject] : orphans) {
|
||||||
MGP_FILL(DeleteSync);
|
|
||||||
if (backendDeleteSync && syncObject->backendHandle) {
|
if (backendDeleteSync && syncObject->backendHandle) {
|
||||||
|
MGP_FILL(DeleteSync);
|
||||||
backendDeleteSync(syncObject->backendHandle);
|
backendDeleteSync(syncObject->backendHandle);
|
||||||
}
|
}
|
||||||
delete syncObject;
|
delete syncObject;
|
||||||
|
|||||||
Reference in New Issue
Block a user