Skip to content

Integrate mesh translation, D3D12 rendering and memory handling - #2603

Draft
denn0x wants to merge 2 commits into
R0Y00:mainfrom
denn0x:startup/rendering-integration
Draft

denn0x wants to merge 2 commits into
R0Y00:mainfrom
denn0x:startup/rendering-integration

Conversation

@denn0x

@denn0x denn0x commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

This draft groups the renderer and shader translator changes so contributors can fetch one branch and test the components together.

  • Translate additional mesh, pixel and compute instructions, including scalar pair copies, embedded scalar tables, per-lane control flow and quad reads. Extend the runtime bindings for translated shaders.
  • Submit translated draws and indirect dispatches, track upload-buffer lifetimes, and add an opt-in path for comparing large buffer snapshots outside the draw lock.
  • Add resource retirement, memory accounting, XMem slab handling and texture layout support.
  • Present in the executable’s own window and start the render client at 1280 × 720 with frame and FPS information in the caption.

The Windows release build succeeded for the renderer, XMem, storage, stream, mesh and retirement fixture targets. The selected WARP suite recorded 59 passes and seven skips across 66 tests. Focused shader checks passed for integer pack conversion, scalar literal flow, embedded tables, mask lineage, descriptor words and quad operations.

One graphics regression remains in the full D16 image-load fixture. A pixel export that references an uninitialized entry register is rejected during input validation. Full-suite and end-to-end rendering verification are still pending. This branch uses shader-cache revision 3. Use a separate cache directory when switching from upstream.

@SimSalabimse

Copy link
Copy Markdown
Contributor

Host retest on 993603d8 (retire + budget + FakeUser + Render + Translate, HostCpu / MemoryGiB 40).

Vs tip bee07b90 (same recipe): tip reached in-scene UI over solid magenta (present mean ~170). This draft reaches UI over black (present mean ~0.6 late); loading/clear also black where tip showed color.

tip bee07b9 #2603 993603d
Present mean (late) ~170 (magenta) ~0.6 (black+UI)
Pipelines translated / missing 58 / 558 55 / 94
Mesh refused DispatchMesh (~11M), forwarded 0 mesh hook: ~1.27M calls, executed 0 (not-implemented)
Run timeout ~900s, in-scene subtitle ~6882 frames / 452s / 15 fps

Shaders were not cold-cache (55 pipelines translated, 1407 textures). Scene mesh still never executes; diagnostic magenta clear looks gone.

Happy to retest once mesh executed / forwarded > 0. Until then staying on tip for daily runs.

@tedin7

tedin7 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

@denn0x I tried a full Windows Server 2025 run of this branch at head 8634f27b (D3D12 WARP, MSVC 14.44.35207, dev and release presets, all targets, full ctest). It stops before the build, on two things that are quick to fix:

  1. CMake configure fails: duplicate test name. startup_image_sample_d is registered twice in CMakeLists.txt: once at line 3402 (the standalone add_test(NAME startup_image_sample_d ...) that came from main with shader: lower image_sample_d and document image_sample_c_d refusal in gfx2hlsl (Part of #1723) #2082) and once through the foreach(check IN ITEMS ... image_sample_d ...) list at line 3430.

    CMake Error at CMakeLists.txt:20 (_add_test):
      _add_test given test NAME "startup_image_sample_d" which already exists in this directory.
    Call Stack (most recent call first):
      CMakeLists.txt:3431 (add_test)
    -- Configuring incomplete, errors occurred!
    

    Dropping image_sample_d from that foreach list (or the standalone pair at 3402-3403, if both run the same script) should be enough.

  2. tests/startup_buffer_address_check.py fails on this head (also on Linux, python3 tests/startup_buffer_address_check.py):

    File "tests/startup_buffer_address_check.py", line 213, in formatted_mubuf_request_controls
      assert result == 'ok', result
    AssertionError: unsupported: pixel stage reads entry VGPR v0 (an SPI input; layout not in the request) at 0x0
    

    So the formatted MUBUF request control now hits the pixel-stage SPI input refusal before the load it means to test.

Once the configure error is gone I can run the full dev + release suite on the new head and post the pass/fail list here, separated from the failures that also happen on current main on this machine (no physical GPU, no desktop session).

Commands executed:

git fetch origin pull/2603/head && git checkout FETCH_HEAD          # 8634f27b
python tests/startup_buffer_address_check.py                          # Win2025 and Linux: fails as above
cmake --preset dev                                                    # Win2025: fails as above

AI-assisted; commands listed were executed locally.

@roansystemlabs

Copy link
Copy Markdown
Contributor

@denn0x this draft now carries slot 57 depth-only draws without a pixel stage, pos1 as clip distance, cull and front-face state, and the wave-level execz scalar handling. Before anyone claims more slot 57 items on #2413, could you say which of these you plan to split into their own PRs, and which are open for others to take as focused slices? In particular: the depth-only mesh draw without a pixel stage with a depth readback (we could add it as a second arm of the D32 fixture we are building on #2606), and pos1 as clip distance in translate_mesh57. If you'd rather keep them, no problem, we'll stay out of that area.

AI-assisted.

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.

4 participants