Skip to content

feat: ConstantBuffers are now all pooled. D3D11Texture is loaded into staging memory and finally into IMMUTABLE texture#417

Open
kirides wants to merge 6 commits into
masterfrom
feat/cb-pool
Open

feat: ConstantBuffers are now all pooled. D3D11Texture is loaded into staging memory and finally into IMMUTABLE texture#417
kirides wants to merge 6 commits into
masterfrom
feat/cb-pool

Conversation

@kirides

@kirides kirides commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Reworks how the engine allocates GPU constant buffers and uploads texture data, cutting down on descriptor/VA churn and enabling immutable textures.

Constant buffers: Introduces ConstantBufferPool, a per-frame ring-buffer pool for constant buffers, and migrates every shader stage (V/G/P/H/CS) plus all the ad-hoc CB owners (forward+ renderer, point lights, shadow maps, TAA, vegetation boxes, PFX passes) off individually-owned D3D11ConstantBuffer instances and onto pooled, ring-backed buffers. D3D11ConstantBuffer is removed entirely. Net effect: far fewer live CB allocations, less 32-bit VA space pressure, one consistent update path.

Texture uploads: Textures are no longer built mip-by-mip via UpdateSubresource into a DEFAULT texture. Mip data is now staged into a CPU-side buffer as it streams in, and once the full chain has arrived the final texture is created directly as IMMUTABLE from the assembled mip chain (skipping the staging step entirely when there's only one mip).

@kirides kirides force-pushed the feat/cb-pool branch 2 times, most recently from 55dc2a6 to 9f5e6dc Compare July 13, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant