feat(render): unify physical residency accounting

This commit is contained in:
Erik 2026-07-24 16:20:48 +02:00
parent 1866ea0c6d
commit 3e18fc2730
25 changed files with 642 additions and 48 deletions

View file

@ -523,6 +523,15 @@ namespace AcDream.App.Rendering.Wb {
}
}
/// <summary>
/// True only after every retained bindless-handle, GL-name, and memory
/// accounting release stage has completed. Logical disposal can become
/// durable earlier while the frame fence still owns the physical array.
/// </summary>
internal bool IsPhysicalRetirementComplete =>
Volatile.Read(ref _disposeQueued) != 0
&& Volatile.Read(ref _disposeRelease) is null;
public void Unbind() {
GL.BindTexture(GLEnum.Texture2DArray, 0);
GLHelpers.CheckErrors(GL);