Skip to content

Model L D3D12: runtime option l_color_early (default off): colour staging overlapped with the encoder block - #200

Merged
phantoslayer21 merged 1 commit into
mainfrom
model-l/color-early
Nov 14, 2026
Merged

phantoslayer21 merged 1 commit into
mainfrom
model-l/color-early

Conversation

@phantoslayer21

Copy link
Copy Markdown
Owner

Refs #89

This adds a runtime option, l_color_early, default off, for Model L on native D3D12 with the direct-resource route and its own post.

With l_color_early=on, l_direct_color (the post's colour staging) runs right after the input encoder instead of just before the post. The launch after it then goes without a UAV barrier (Device::unordered_next), so the staging overlaps the encoder block, which is issue-bound, while the staging is bandwidth-bound.

  • Same bytes: l_direct_color reads only the game's colour texture and pi and writes only color_net. Neither is touched by the network. The post's own barrier still orders its read of color_net, and that frame's late staging is skipped. So it's the same kernel on the same inputs.
  • Off (the default): nothing changes. The kernel line reports l_color_early=on when the option is set.
  • No kernel or DXIL changes.

This touches the own-post direct route, which is kern3's area. The change is kept to the launch position only; the kernel and the post are untouched.

Timing

Not measured here: no harness runs the direct-resource route. The release lead's next Cyberpunk payload run will time it on and off. The expected gain is up to the staging's own time (about 24 bytes per render pixel, bandwidth-bound).

Tested

  • test_l_runtime_frame.py: all 22 tests pass. The new test_color_early_option checks that the option is parsed and reported, and that on the buffer route (no staging) the frames launch exactly what they launch without it.
  • public_gates.py passes. The LOOK lines carry no hit in this branch's files.

Not tested

  • The direct-resource route with the option on: no harness covers it. The game run above will.
  • GPU timing.

… route's colour staging after the input encoder

With l_color_early=on, on the direct-resource route with Model L's own post, l_direct_color (the post's colour
staging: it reads only the game's colour texture and pi and writes color_net) runs right after the input encoder, and
the launch after it goes without a UAV barrier (Device::unordered_next), so the staging overlaps the encoder block
instead of running alone before the post. The post's barrier still orders its read of color_net, and that frame's
late staging is skipped. The same kernel on the same inputs: the same bytes. Off (the default), nothing changes. The
kernel line reports l_color_early=on. No kernel changes.

Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
@phantoslayer21
phantoslayer21 marked this pull request as ready for review November 14, 2026 21:25
@phantoslayer21
phantoslayer21 merged commit 0f65f5e into main Nov 14, 2026
9 checks passed
@phantoslayer21
phantoslayer21 deleted the model-l/color-early branch November 14, 2026 21:31
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