Repository navigation
Model L: D3D12 direct form of the halo input encoder (lev/input_encoder_direct), byte for byte against its HIP twin - #144
Merged
Conversation
…er_direct), byte for byte against its HIP twin kernel_replay gets a direct-resource mode (textures bound as one direct frame) so the direct form is checked against HIP's input_encoder of l_enc_values.co on the same values. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
marked this pull request as ready for review
November 14, 2026 03:53
Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com> # Conflicts: # clean/l/runner/l_d3d12_ops_check.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Model L (#89): the D3D12 direct form of Model L's halo input encoder,
lev/input_encoder_direct, byte for byte againstits HIP twin. The native D3D12 route with the game's own resources (Cyberpunk 2077's route) runs Model M's
input_encoder_direct; #127 ported only the buffer form of Model L's encoder.Like Model M's
input_encoder_direct, this kernel has no HIP kernel of its own. It is the buffer kernel reading thegame's textures. Its HIP twin is
input_encoderofl_enc_values.co(encoder.hipwithWG_ENC_VALUES_OUT=1).Targets main. CI needs no GPU: nothing here runs without one.
clean/dx12/kernels/encoder.hlsl: the@wg-kernelline oflev/input_encoder_direct, which isWG_DIRECT_TEXTURES=1withWG_ENC_VALUES_OUT=1,rs=direct. Model M's direct-texture loads stay unchanged andthe halo switch of Model L: D3D12 port of the halo input encoder (lev/input_encoder), byte for byte against its HIP kernel #127 applies on top. The
#errornow refuses only the combination with motion at outputresolution.
clean/dx12/tests/kernel_replay.cpp: a direct-resource mode, so a direct kernel can be checked byte for byte.direct <slot> <format> <w> <h> <file>(slots color, depth, motion, output) anddirect_params <rx> <ry> <rw> <rh>.and the output UNORDERED_ACCESS.
NativeD3D12Ext::bind_direct_frame(motion scale 1, offset 0, color_pi 1, no exposuretexture) around the launch, then ends the frame. All through the device's own API.
clean/l/runner/l_d3d12_ops_check.py:lev/input_encoder_directcases.input_encoderon the frame's buffers. The D3D12 port reads the same FP32 values from textures:color RGBA32F, depth R32F, motion RG32F, so every texel load is exact.
the direct form does not read them. The same four outputs are compared.
Refs #89
Tested
Local, Windows, Radeon RX 9000 series card, against main's
l_enc_values.co:l_d3d12_ops_check.py --run --seeds 6 --kernels lev/input_encoder_direct,lev/input_encoder:lev/input_encoder_direct: 36 of 36 cases identical (6 seeds x 6 frames; halo map + 3 motion surfaces,3,854,688 output bytes);
lev/input_encoder(Model L: D3D12 port of the halo input encoder (lev/input_encoder), byte for byte against its HIP kernel #127): still 36 of 36 identical (3,854,688 bytes);swin_block_c96_nc: 36 of 36 identical (3,167,424 bytes);differed;
(HIP 0xA5, D3D12 0x5A).
input_encoder,input_encoder_direct,emo/input_encoder_mo,emo/input_encoder_mo_direct): 4 of 4 byte-identical, main against this branch (DXIL SHA-256).lev/input_encoder's DXIL is also unchanged.python tools/ci/check_line_endings.py: 0 problems. Public gates (secrets, personal data, licence, chunks) pass.Not tested
typed loads as Model M's direct encoder, and the values they deliver are what both forms consume.