Skip to content

Recompiler: drop dead raw loads/f16 convs (#2212), specialize const v_perm_b32 (#2267), fold const reversebits - #3503

Merged
Prime1997 merged 1 commit into
xcl-dev:mainfrom
Kalmarv:pr/9-dxil-2212-2267-reversebits
Nov 30, 2026
Merged

Prime1997 merged 1 commit into
xcl-dev:mainfrom
Kalmarv:pr/9-dxil-2212-2267-reversebits

Conversation

@Kalmarv

@Kalmarv Kalmarv commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Rebases #2212 (by @tibzejoker) and #2267 (by @ramon-victor) cleanly onto current main and folds in constant reversebits simplification in direct DXIL.

What is in it

Tested

  • Hardware: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1074), AMD Ryzen 9 9950X, Windows 11, DXC 1.9.2609
  • Verified in full 24-thread cold archive precompile (23m 28s, errors) and 29-min live title run ( crashes, device removals).
  • scripts/smoke.ps1 on this exact head queued next.

Regression run

main:

xcl-smoke v1
commit: 91244db94d2f402237c6a8e428dbe5da07673c48
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1514 (PresentX 1514)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 15133 MB

PR head:

xcl-smoke v1
commit: 6ff86e30eddab944fc2309aa99a465ec57eac6e3
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1586 (PresentX 1586)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 15377 MB

Not tested

  • AMD / Intel GPUs

AI use

@github-actions github-actions Bot added area:recompiler RDNA2 decoder, HLSL/direct-DXIL recompiler, wave64/wave32 gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks) needs-rebase Has merge conflicts with its base branch labels Nov 30, 2026
…ecialize const v_perm_b32

Rebases xcl-dev#2212 and xcl-dev#2267 onto main and adds constant reversebits folding.

Co-authored-by: tibzejoker <tibzejoker@users.noreply.github.com>
Co-authored-by: ramon-victor <ramon-victor@users.noreply.github.com>
@Kalmarv
Kalmarv force-pushed the pr/9-dxil-2212-2267-reversebits branch from 23b3f5b to 6ff86e3 Compare November 30, 2026 04:14
@github-actions github-actions Bot removed the needs-rebase Has merge conflicts with its base branch label Nov 30, 2026
@Prime1997 Prime1997 added the test-only A maintainer reviewed the diff: tests only, no smoke run needed for this revision (CONTRIBUTING.md) label Nov 30, 2026
@Prime1997
Prime1997 merged commit 5b3c9a4 into xcl-dev:main Nov 30, 2026
5 of 6 checks passed
dudenudem pushed a commit to dudenudem/xcl that referenced this pull request Nov 30, 2026
Keeps upstream's DXIL IR cuts (xcl-dev#3500-xcl-dev#3503/xcl-dev#3495-xcl-dev#3499: sampler waterfall,
descriptor windows, split-wave64 mask exchange, per-lane exec, direct PS
masks, quad shuffles, packed/normalized buffer decode, commit-aware
compiles), xcl-dev#3269 fixed-point optimizer, xcl-dev#3154 compact compute prologue,
xcl-dev#2123 split atomic add, xcl-dev#2070 offline 64 MB stacks, xcl-dev#3442 split-whole,
xcl-dev#1319 root-constant bounds, xcl-dev#3356 late Reset releases, xcl-dev#1322 empty-BVH/NaN
rays, xcl-dev#2753 3-D texture sizing, XMA/VFS/TLS/loader fixes.

Resolutions:
- real.rs: union of T-156 res_release pinning with upstream's InListReset
  and abi_rs_for_stages; dropped upstream's warm_graphics (T-095 removed
  that path); kept ComputeBuild::IndirectChain for our split-chain variant.
- dispatch_chain.rs: kept our IndirectBuild split-chain architecture (the
  T-095 port removed the preload/whole-worker machinery upstream builds
  on); ported upstream's huge-PSO refusal log.
- pso_async.rs: took upstream's commit-aware build_pieces/build_scoped and
  WORKER_STACK, removed the preload/backlog subsystem our port does not
  have (and its tests), kept our profile_is_series_s.
- late_release.rs: took upstream's Dead enum, Busy/InListReset and
  hold_pipeline/hold_heap/hold_unmap, with our vram release path (no
  recycle pool).
- emit.rs: upstream's additions moved into emit/memory.rs (ADD_TID_ENABLE),
  emit/exp.rs (misc-vector layer/viewport), emit/mimg.rs (SampleCmp with
  bias gradients), emit/valu.rs (abs/neg on shift/align), emit.rs out_struct.
- bind.rs: root-constant bounds clamp + its test; kept our bool
  execute_indirect API.
- bvh.rs: our grow/tri_ret/watertight model plus upstream's empty-root
  bounds and NaN-ray refusal.
- kernel.rs: upstream's mask/waterfall/rodata cuts plus our lanes_upper.
- shaders.rs: upstream's worker stack helpers and mesh/GS precompile paths,
  with our PipelineJob record identity.
- eh.rs: upstream's CLWB TF guard + test, our termination test.
- lower.rs test: 574bda4 makes wave32 SALU words compute S_WQM without
  quad lanes; assert that and keep the wave64 refusal.
lucsoft added a commit to lucsoft/xcl that referenced this pull request Dec 1, 2026
graphics_stages_emit_a_repeated_load_once (from amd-dev, xcl-dev#2446) counts
rawBufferLoad calls in vertex and pixel programs whose loaded SGPRs are
never observed: a VS or PS writes no SGPRs back at its end. Main's
xcl-dev#3503 (6ff86e3) made rawBufferLoad eligible for dead-code elimination
and keeps a single raw load only so the shader flags stay valid, so in
the merge every program in the test compiled to exactly one load. The
store case then failed (1 vs 1 + 4), and the repeat case passed only
because both sides were that one surviving load.

Neither side's lowering is wrong and the merge did not combine the
reload or window code badly: reload.rs, the follow_loads stages and the
s_load path are amd-dev's as is. Each program now stores the sum it
computes, so the loads it reads stay live and both assertions measure
the reload again.
@lucsoft lucsoft mentioned this pull request Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:recompiler RDNA2 decoder, HLSL/direct-DXIL recompiler, wave64/wave32 gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks) test-only A maintainer reviewed the diff: tests only, no smoke run needed for this revision (CONTRIBUTING.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants