Skip to content

Sprint 2: generalize resource allocation, textures and rendering bindings #33

Open

Description

@atcarter714

Build reusable rendering infrastructure that Fleet Battler and the independent Noesis integration can share. Depends on Sprint 1's ownership/support contract.

Priority order:

  • Implement fence-retired upload/readback rings and a descriptor allocator, with multi-frame wraparound and exhaustion behavior.
  • Add general texture descriptions, subresource uploads, mip chains and DDS/BC fixtures; then arrays/cubemaps. Keep feature/capability failures explicit.
  • Expose general root-signature/resource/sampler binding and configurable blend/rasterizer/MSAA pipeline state.
  • Add GPU-side fence handoffs between copy, compute and graphics queues. Verify shared resource lifetime across the last consuming queue.
  • Evaluate an optional D3D12MA adapter versus a minimal placed-resource allocator; record the choice, budgets and fragmentation behavior before committing the public API.
  • Move a representative multi-texture scene onto these APIs and rebuild Fleet Battler and the external Noesis consumer.

Exit: repeated allocation/reclamation stays within the declared budget, pixel/numerical fixtures pass, and resources remain valid through all consuming queue fences.

The initial two-week slice is allocator/upload/descriptor contracts plus one consumer; general texture/pipeline expansion continues in the following slice if capacity requires. No claim of complete rendering-toolkit parity from this issue alone.

Implementation entry point from the Sprint 1 source review:

  • Command recording currently retains COM references. Extend retirement to retain managed allocation leases as well; retaining a descriptor heap or upload buffer alone does not reserve a range inside it.
  • Define range/slice owner disposal separately from reuse. A recorded lease must prevent slot/range reuse until every consuming submission retires, including multiple queues.
  • Start with a bounded descriptor pool and upload ring, native alignment constants, explicit exhaustion behavior and thread/queue ownership. Preserve the existing source/solution organization.
  • Acceptance fixtures: one-slot exhaustion, early owner disposal, repeated ring wraparound, failed submission cleanup and multi-queue retirement, followed by a real multi-texture consumer with readback.
  • Extract a reusable completion/lease contract before adding the full material/pipeline layer. This is the first small integration slice after Qualify .NET 10/11 and align native bindings with retail Agility #37.

Completed first allocation slice

PR #38 merged as fe012e4414c2111e81ba93eaebaf77539fbd4482 after all six qualification jobs passed.

  • Bounded descriptor pools and aligned upload rings with explicit exhaustion and coalescing.
  • Independent per-recording leases; owner/pool disposal preserves ranges through every consuming submission.
  • Managed no-overwrite checks, SRV dependency ownership, allocation-aware native recording and descriptor table binding.
  • Shared-pool RGBA8 texture uploads and a two-texture HelloTexture consumer.
  • 20,000 bitmap-checked allocation operations and Windows JIT/NativeAOT readbacks across two independently blocked queues, timeout, early disposal, discarded recordings and repeated reuse.
  • Both-runtime external package consumers and all 12 sample builds, plus Fleet Battler presentation/resize checks, passed in Debug and Release.

The allocation implementation is published in Preview 3 at 905569ee1b6ee6d45dd047e97d7288e0af582b31. All six exact-main qualification jobs and the complete release workflow passed. All five versions are listed and downloadable from NuGet.org; all symbol uploads were accepted. Earlier Preview 3 preparation attempts did not publish packages. The final release also applies AOT lock isolation after project/sample properties and adds a direct fixture/sample AOT-to-locked-JIT restore regression gate.

This issue remains open: readback rings, general texture/mip/DDS/BC support, broader pipeline bindings, GPU-side cross-queue handoff APIs, and placed-resource allocator evaluation are not completed by this first slice. A retired recording now requires reset before resubmission because its suballocations may have been reclaimed.

Public distribution verification: downloaded all five 0.4.0-preview.3 packages from NuGet.org and compiled a fresh consumer for both .NET 10 and .NET 11, including the descriptor pool, upload ring, slice copy and shared-pool texture APIs. The test used a private package directory and a local mirror containing only NuGet.org archives, with no project references or SDK source checkout. Symbol-server indexing was not independently exercised. Future implementation changes should increment the development version to preview.4 before packaging; the published Preview 3 artifacts are immutable.

Completed readback and texture transfer slice

PR #39 merged into main as 7c5516ed9c8b8f3eec33d206329e93db1c523d37. All six qualification jobs passed before merge. The merged source tree 183cf60355cf4dae7c5c195d96eab656594ea088 exactly matches the tested PR merge tree. This is preview.4 development; Preview 3 remains the current published package.

  • Bounded readback ring, CPU result owners, and recorded/pending access guards reusing the established allocation leases.
  • Typed single-plane sampled Texture2D descriptions, explicit mip chains, arrays, cubes/cube arrays, pitched input, native footprint staging and packed readback.
  • Byte-exact WARP tests for padded RGBA8 mip arrays, BC1 block mip arrays and cube arrays; partial updates preserve other subresources; early disposal preserves GPU backing and CPU results. Both .NET 10/11 JIT and NativeAOT passed.
  • HelloTexture uploads two three-mip textures and explicitly cycles selected mip levels; its bounded sample mode exercises all three levels.
  • Debug/Release packages and both-runtime external consumers build all 12 runnable samples; Fleet Battler presentation and resize checks pass.

Next: DDS parsing and fixtures (including additional BC formats), general root-signature/sampler/pipeline configuration, GPU-side copy/compute/graphics fence handoffs, and the placed-resource allocator evaluation. The external Noesis integration has not been rebuilt against preview.4 by this increment. No automatic mip generation, depth/video plane or render/UAV texture contract is claimed.

Character and modern Framework slice

PR #40 merged as b063eeed5735af5e991715d0eaf4c8a11f92feb6. All six .NET 10/11 qualification jobs passed before merge; the merged tree 5b211889521dc2db26965a841d57c7fc71c4a6f0 exactly matches the tested merge tree.

  • Modern Framework now depends on Core/Assets, and Desktop depends on Framework. The experimental RCW-dependent Framework helpers were replaced with an explicitly documented breaking migration, not silently preserved as empty scaffolding.
  • Added GameClock, skinned GLB data and CPU reference deformation, AnimationPlayer, and persistent GPU skinning with frame-owned palette/constant buffers and four material texture bindings.
  • Corrected opposite-sign quaternion interpolation, interrupted cross-fades, one-shot playback and horizontal root-motion loops. Pose/palette evaluation has a zero-allocation regression check.
  • CharacterLab uses normal project references and joins the isolated package-consumption mechanism. All 13 samples build from fresh packages; CharacterLab executes nine bounded frames from packages on both runtimes in Debug/Release.
  • WARP compared 37,141 vertices and normals across 27 real poses under Windows JIT/NativeAOT; maximum position error was approximately 1.97e-6. Existing sample matrices and Fleet Battler presentation/resize checks passed.
  • Added native camera/message declarations, idle/Present-paced desktop rendering, and consistent Libraries solution grouping.

This remains Preview 4 development; NuGet Preview 3 is unchanged. Hardware frame pacing/performance and the separate Noesis consumer have not been qualified by this slice. Framework is now a sixth modern package in the next release candidate set.

The product vision and ordered continuation are in Framework-Vision.md: finish the Game/Application lifecycle and host contract; expand materials and content cooking; add reusable scene/input/audio services; deliver project templates and asset/animation inspection tools. Keep DDS/BC content preparation, GPU-side queue handoffs, placed-resource/residency work and Windows API parity on the active SDK backlog. This slice does not close the sprint or claim complete engine/toolkit parity.

CharacterLab history and capability-query follow-up

PR #41 merged normally as 676a992a03d6767b2114ce2aca58bed0561a7938, joining the original CharacterLab feature commits with main's previous squash merge. The resulting tree f9ca13a433ce58eb1df0b18e5933880cfcecc977 exactly matches the qualified head. All six qualification jobs passed, covering Windows Debug/Release and Windows/Linux .NET 10/11 JIT/NativeAOT, GPU fixtures, samples and isolated package consumers.

Core capability queries now use CheckFeatureSupport1 with pinned metadata SDK 620 where supported, retaining the legacy path only for E_NOINTERFACE. Debug Agility qualification emitted no deprecated-query warning; the system-runtime fallback was exercised as well. All 13 samples build from isolated packages and CharacterLab presents nine bounded package frames on each runtime.

The user supplied an additional RTX 3080 Ti Debug/.NET 10 smoke result: 892 presented frames, exit zero, 0.18 ms mean CPU recording time and smooth animation. Its metadata and evidence limits are recorded in the hardware smoke report. This is hardware smoke evidence, not a full frame-pacing or GPU benchmark. Preview 3 remains the published NuGet version; this work is Preview 4 development.

DXC build pipeline and native host slice

PR #42 merged normally as ccabe4d2307671735ac5a4934c5ba948da1ad0fb. All six qualification jobs passed on f0105e49671deafb2ed49c558eefca05a2f3b31a; the merged tree 7968769916b490a26147c94cde0be49e41130d4c exactly matches the qualified merge tree.

  • Real DXC MSBuild compilation replaces the incomplete task: pinned compiler dependency, transitive include-aware incremental state, diagnostics, PDBs, manifests and clean. Cold private-cache package tests cover unchanged builds, defines/includes, paths with spaces and failure propagation on both runtimes.
  • Core adds typed compiler options and owned precompiled bytecode with graphics/compute pipeline overloads. Framework embeds precompiled skinning shaders; runtime compilation remains available.
  • FrameRenderer now owns shared HWND frame submission, resize and retirement. The WinForms adapter and native Win32 host share it. Native window lifetime, DPI, message dispatch and ordered GPU drain are qualified, as is queued WinForms close dispatch.
  • CharacterLab.Native shares the existing scene/camera sources, with neither Windows Forms nor runtime DXC required. All 14 samples build from isolated packages on .NET 10/11 in Debug/Release; both CharacterLab hosts execute nine bounded package frames. Windows JIT/NativeAOT host/shader and WARP graphics tests pass; Linux qualifies the portable native ownership fixtures.
  • DXSharp.Tools.Builds is the seventh modern package in the next release candidate set.

This remains Preview 4 development; Preview 3 is unchanged on NuGet. These graphics results use WARP, without a new RTX performance claim. Next continuation includes WPF HWND and WinUI composition adapters, richer DXC reflection/validation/linking services and a measured native-header coverage audit, plus the outstanding video/DirectStorage/X3DAudio/GameInput and rendering-toolkit work above. This slice does not claim full DXC or Windows SDK parity or close the sprint.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions