using AcDream.App.Rendering; using AcDream.App.Rendering.Wb; using DatReaderWriter; using Xunit; namespace AcDream.Core.Tests.Rendering; /// /// Lightweight unit tests for 's bindless path. /// We can't construct a real TextureCache in a headless test (it requires a /// live GL context), so this file documents contracts that future engineers /// should preserve. Real bindless integration is verified at Task 14's /// visual gate. /// public sealed class TextureCacheBindlessTests { [Fact] public void Contract_BindlessMethodsThrowWithoutBindlessSupport() { // The actual throw lives in TextureCache.EnsureBindlessAvailable // and is reached only via GL-bound Bindless* method calls. The // contract is: if the dispatcher (which requires bindless) ever // gets a TextureCache constructed without BindlessSupport, it // should fail-fast with InvalidOperationException — NOT silently // route a draw to handle 0 (which would produce a non-resident // GPU fault). // // This test is a marker. Future engineers: do not weaken // EnsureBindlessAvailable to swallow the missing dependency. Assert.True(true, "Contract documented in TextureCache.EnsureBindlessAvailable"); } }