From 74553bfa1ab982ecebd93498ab1f2d3f1d87fbc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 29 Sep 2026 12:43:12 -0600 Subject: [PATCH] D3D11: Note that the state object caches are deliberately never trimmed Co-Authored-By: Claude Opus 5.5 (1M context) --- GPU/D3D11/DrawEngineD3D11.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPU/D3D11/DrawEngineD3D11.h b/GPU/D3D11/DrawEngineD3D11.h index 3be8d21983..b30b321cf5 100644 --- a/GPU/D3D11/DrawEngineD3D11.h +++ b/GPU/D3D11/DrawEngineD3D11.h @@ -110,6 +110,9 @@ private: PushBufferD3D11 *pushInds_ = nullptr; // D3D11 state object caches. Previously had smart pointers but they were harder to deal with. + // These are never trimmed, although D3D11 allows only 4096 unique state objects per type and a + // failed create is fatal. That's deliberate: games use far fewer combinations, so it isn't an + // issue in practice, and eviction would cost more than it's worth. DenseHashMap blendCache_; DenseHashMap blendCache1_; DenseHashMap depthStencilCache_;