Fix #111699: Remove deleted interface from the VAO cache

Newer interfaces can share the same address as the old one,
causing a deleted VAO to be bound.

Pull Request: https://projects.blender.org/blender/blender/pulls/111929
This commit is contained in:
Miguel Pozo
2023-09-05 15:34:12 +02:00
parent bcd0198a46
commit 22e4e94d57

View File

@@ -129,6 +129,11 @@ void GLVaoCache::remove(const GLShaderInterface *interface)
break; /* cannot have duplicates */
}
}
if (interface_ == interface) {
interface_ = nullptr;
vao_id_ = 0;
}
}
void GLVaoCache::clear()