Upload D3D12 field resources

This commit is contained in:
Meta Vens 2026-05-09 13:55:19 +01:00
commit f32772c052
11 changed files with 456 additions and 3 deletions

View file

@ -36,6 +36,10 @@ resource graph beyond smoke-pass scaffolding.
up-facing gravity quad per body. The target is scalar `R16_Float`: height is
one value, and the format still supports the additive render-target blending
the brush pass needs. Mode `11` exposes it.
- D3D12 uploads the live froxel primitive table and field instance table into
default-heap structured buffers each frame, using the upload ring only as the
copy source. Their SRVs are created in the transient descriptor heap used by
the consuming pass, avoiding impossible static+transient heap co-binding.
- Renderer calls receive current window dimensions, and the D3D12 backend can
recreate swapchain buffers plus dependent smoke resources on resize.
- Resize waits for the GPU, disposes swapchain-dependent targets, rebuilds
@ -63,6 +67,9 @@ resource graph beyond smoke-pass scaffolding.
- The offscreen smoke target copies to the swapchain. Keep this only if the real
post-process graph needs it; otherwise present from the final render target
path with no ornamental copy.
- The D3D11 and D3D12 field table builders are temporarily duplicated. Extract
them into one shared field ABI owner before the second backend starts to
drift.
## Required Before Real Pass Migration

View file

@ -24,6 +24,11 @@ has feature parity.
draws one additive up-facing gravity quad per body into a 128x128
scalar `R16_Float` Grid height target. Render debug mode `11` displays that
target.
- D3D12 now owns the first field-resource upload path: CPU-built froxel
primitive ids and field instances upload through the per-frame upload ring,
copy into default-heap structured buffers, and bind as transient SRVs for the
diagnostic shader. This proves the backend can feed real Aquarium field data
without reading directly from upload memory.
- Resize waits for the GPU, releases swapchain-dependent resources, rebuilds
static shader/RTV descriptor arenas, then recreates backbuffer views and
dependent render targets. Descriptor exhaustion on resize is no longer a

View file

@ -83,6 +83,13 @@ scalar `R16_Float` Grid height target. D3D12 render debug mode `11` displays
that target. D3D11 remains the visual reference until the full pass chain
reaches parity.
D3D12 also uploads the current froxel primitive id table and field instance
table into default-heap structured buffers every frame. The diagnostic smoke
shader reads both SRVs through the transient descriptor heap; this is only a
resource-path proof, not the migrated scene or medium pass yet. The D3D11 and
D3D12 table builders should be collapsed into one shared field ABI before more
field consumers are ported.
The shader far distance is frame-derived, not a fixed constant. C# sends the
distance from the camera to the Grid origin plus the Grid radius, which matches
the circular Grid fade boundary and avoids wasting raymarch work past the