startup: cap v_fract_f32 at 0x3f7fffff like pixel_aot already does #2003

Merged
thepatrickworld merged 7 commits from upstream-pr/2010 into main 2026-11-25 21:01:26 +00:00
thepatrickworld commented 2026-11-24 23:01:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-24T23:01:38Z.


v_fract_f32 now lowers through the capped fract32 helper that tools/pixel_aot.py has always used, instead of a bare D3D frac.

The asymmetry. Two translators in this tree lower the same instruction differently:

// tools/pixel_aot.py, since long before this patch
// v_fract_f32: x - floor(x) clamped to 0x3f7fffff, so a tiny negative input cannot round up to 1.0.
// D3D frac has no clamp and differs between adapters.
float fract32(float value) {
    float f = frac(value);
    return asuint(f) == 0x3f800000u ? asfloat(0x3f7fffffu) : f;
}

tools/startup/gfx2hlsl.py emitted frac({0}) for v_fract_f32 with no cap, so the two paths disagreed on the one instruction whose comment in this repository says adapters disagree.

What the reports show. Two independent NVIDIA runs fail startup_gfx2hlsl_float_round_hardware on the input 0xb0800000 (-2^-30) in #1741, both with expected=3f7fffff actual=3f800000: an RTX 3070 Ti on driver 32.0.16.2101, and a Quadro M1000M (Maxwell) on 32.0.15.7371. The same draw passes on WARP, on an Intel HD Graphics 530 and on the RDNA 4 card used here.

What changes. The helper goes into the common preamble next to ftz32, which already carries a Match pixel_aot note, the table entry points at it, and a new check pins the emitted statement of the _e32 and _e64 forms, the cap in the preamble, and rejects both a bare frac and a cap written with min. The cap is a comparison rather than min because D3D min returns its other operand for a NaN, and a NaN input has to stay a NaN. Only v_fract_f32 changes.

On the ISA wording, because it cuts the other way. The RDNA 2 guide gives D.f = S0.f + -floor(S0.f) for V_FRACT_F32 with no cap, and for -2^-30 that expression rounds to 1.0 — which is exactly what the Quadro returns. The cap is therefore not read off that formula. It is what D3D's frac() produces on WARP, on an Intel Gen9 part and on this RDNA 4 card, and it is what the reference in this tree encodes. The P2 in #1741 asked for the lowering to be fixed rather than for a new draw to fail on an adapter, and suggested min(..., 0x3f7fffff); this patch takes the comparison form so that a NaN input stays a NaN. If the console's own frac is later shown to return 1.0 here, the cap and the reference have to be revisited together — they must agree, and today three of the four implementations we can observe agree on the cap.

What is verified here. On an AMD Radeon RX 9070 XT (1002:7550, driver 32.0.32029.2010), the whole gfx2hlsl suite passes with this patch on today's main: 41 of 41, including the new startup_gfx2hlsl_fract and the existing translation controls. docs_links_check and bidi_controls_check pass.

What is not verified, and matters. There is no NVIDIA adapter on this machine. The Maxwell and Turing failures are not reproduced here, and this patch does not demonstrate that they disappear. What is established is narrower: the lowering no longer emits the uncapped frac, the cap matches the rule the repository already wrote for pixel_aot, and the adapters that were already returning 0x3f7fffff keep doing so. The two reported adapters are what would confirm the fix.

The draw that exercises v_fract_f32 is not on main yet — it arrives with #1741 — so this change is verified at the level of the emitted text and of the existing suite, not by a draw of its own. Rebasing #1741 onto today's main conflicts in this preamble, because the branch predates the ftz32/mad32 helpers, so its draws need a rebase before they can run here.

cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl' -V

AI-assisted.

Why the comparison is on the encoding. FXC treats frac as strictly below 1, so frac(value) >= 1.0f
folds to false and the helper compiled to a bare frc — the cap disappeared on the Quadro M1000M and the
RTX 3070 Ti, which still read 3f800000 for 0xb0800000. Comparing the bits survives FXC (frc, ieq,
movc), and frac can only reach the cap by rounding to exactly +1.0, so the equality covers the same
case while a NaN still misses it and passes through.

Cache revision. The cap changes already-translated shaders, so the seed goes to x2w-startup-shader-8
in tools/startup/gfx2hlsl.py and src/startup_stubs/d3d12_draw.inl; a control asserts both spellings
agree and that the -7 seed keys differently.

The draw. tests/startup_gfx2hlsl_fract_draw_check.py compiles the generated pair with FXC (ps_5_1)
and DXC (ps_6_0) and compares raw words on 0xb0800000, 1.5, 0.0 and -2.5. The uncapped mutant is
recorded rather than asserted: on this machine WARP and the RX 9070 XT both clamp a bare frc themselves and
read the capped word anyway, so the control cannot separate the two forms here. The separation is observed on
the NVIDIA reports above, and on the head that carries this form an independent re-run passes on WARP, on the
Quadro M1000M that failed before and on an Intel HD 530, all three reading 3f000000,3effffff,3f7fffff,3f000000
for 49742408,3effffff,b0800000,4affffff under fxc and dxc. Turing remains unmeasured.

AI-assisted; runs executed on the machine above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6593150138 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-24T23:01:38Z. --- `v_fract_f32` now lowers through the capped `fract32` helper that `tools/pixel_aot.py` has always used, instead of a bare D3D `frac`. **The asymmetry.** Two translators in this tree lower the same instruction differently: ```hlsl // tools/pixel_aot.py, since long before this patch // v_fract_f32: x - floor(x) clamped to 0x3f7fffff, so a tiny negative input cannot round up to 1.0. // D3D frac has no clamp and differs between adapters. float fract32(float value) { float f = frac(value); return asuint(f) == 0x3f800000u ? asfloat(0x3f7fffffu) : f; } ``` `tools/startup/gfx2hlsl.py` emitted `frac({0})` for `v_fract_f32` with no cap, so the two paths disagreed on the one instruction whose comment in this repository says adapters disagree. **What the reports show.** Two independent NVIDIA runs fail `startup_gfx2hlsl_float_round_hardware` on the input `0xb0800000` (-2^-30) in #1741, both with `expected=3f7fffff actual=3f800000`: an RTX 3070 Ti on driver `32.0.16.2101`, and a Quadro M1000M (Maxwell) on `32.0.15.7371`. The same draw passes on WARP, on an Intel HD Graphics 530 and on the RDNA 4 card used here. **What changes.** The helper goes into the common preamble next to `ftz32`, which already carries a `Match pixel_aot` note, the table entry points at it, and a new check pins the emitted statement of the `_e32` and `_e64` forms, the cap in the preamble, and rejects both a bare `frac` and a cap written with `min`. The cap is a comparison rather than `min` because D3D `min` returns its other operand for a NaN, and a NaN input has to stay a NaN. Only `v_fract_f32` changes. **On the ISA wording, because it cuts the other way.** The RDNA 2 guide gives `D.f = S0.f + -floor(S0.f)` for `V_FRACT_F32` with no cap, and for `-2^-30` that expression rounds to 1.0 — which is exactly what the Quadro returns. The cap is therefore not read off that formula. It is what D3D's `frac()` produces on WARP, on an Intel Gen9 part and on this RDNA 4 card, and it is what the reference in this tree encodes. The P2 in #1741 asked for the lowering to be fixed rather than for a new draw to fail on an adapter, and suggested `min(..., 0x3f7fffff)`; this patch takes the comparison form so that a NaN input stays a NaN. If the console's own `frac` is later shown to return 1.0 here, the cap and the reference have to be revisited together — they must agree, and today three of the four implementations we can observe agree on the cap. **What is verified here.** On an AMD Radeon RX 9070 XT (`1002:7550`, driver `32.0.32029.2010`), the whole `gfx2hlsl` suite passes with this patch on today's `main`: 41 of 41, including the new `startup_gfx2hlsl_fract` and the existing translation controls. `docs_links_check` and `bidi_controls_check` pass. **What is not verified, and matters.** There is no NVIDIA adapter on this machine. The Maxwell and Turing failures are **not** reproduced here, and this patch does not demonstrate that they disappear. What is established is narrower: the lowering no longer emits the uncapped `frac`, the cap matches the rule the repository already wrote for `pixel_aot`, and the adapters that were already returning `0x3f7fffff` keep doing so. The two reported adapters are what would confirm the fix. The draw that exercises `v_fract_f32` is not on `main` yet — it arrives with #1741 — so this change is verified at the level of the emitted text and of the existing suite, not by a draw of its own. Rebasing #1741 onto today's `main` conflicts in this preamble, because the branch predates the `ftz32`/`mad32` helpers, so its draws need a rebase before they can run here. ```powershell cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl' -V ``` _AI-assisted._ **Why the comparison is on the encoding.** FXC treats `frac` as strictly below 1, so `frac(value) >= 1.0f` folds to false and the helper compiled to a bare `frc` — the cap disappeared on the Quadro M1000M and the RTX 3070 Ti, which still read `3f800000` for `0xb0800000`. Comparing the bits survives FXC (`frc`, `ieq`, `movc`), and `frac` can only reach the cap by rounding to exactly `+1.0`, so the equality covers the same case while a NaN still misses it and passes through. **Cache revision.** The cap changes already-translated shaders, so the seed goes to `x2w-startup-shader-8` in `tools/startup/gfx2hlsl.py` and `src/startup_stubs/d3d12_draw.inl`; a control asserts both spellings agree and that the `-7` seed keys differently. **The draw.** `tests/startup_gfx2hlsl_fract_draw_check.py` compiles the generated pair with FXC (`ps_5_1`) and DXC (`ps_6_0`) and compares raw words on `0xb0800000`, `1.5`, `0.0` and `-2.5`. The uncapped mutant is recorded rather than asserted: on this machine WARP and the RX 9070 XT both clamp a bare `frc` themselves and read the capped word anyway, so the control cannot separate the two forms here. The separation is observed on the NVIDIA reports above, and on the head that carries this form an independent re-run passes on WARP, on the Quadro M1000M that failed before and on an Intel HD 530, all three reading `3f000000,3effffff,3f7fffff,3f000000` for `49742408,3effffff,b0800000,4affffff` under fxc and dxc. Turing remains unmeasured. _AI-assisted; runs executed on the machine above._
ChazY11 commented 2026-11-25 01:01:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T23:06:14Z.


Ran it, broke it four ways, and checked the arithmetic the description rests on

Windows 11 build 26300.9974, device-free:

out/pe-env/Scripts/python.exe -B tests/startup_gfx2hlsl_fract_check.py
control: a min-form clamp is rejected: ok
control: a cap other than 0x3f7fffff is rejected: ok
PASS      exit 0
mutation result
fract32({0}) → frac({0}) (the pre-change lowering) caught
f >= 1.0f → f > 1.0f caught
the cap 0x3f7fffffu → 0x3f7ffffeu caught
the comparison form → min(f, asfloat(0x3f7fffffu)) caught (also your own control)

The second is the one I would have expected to slip: with a strict > the exact case the helper exists for — frac rounding up to 1.0 —
no longer fires. Your fixture separates > from >=, which means it carries the boundary input, not just a mid-range one.

The two claims in the comment, checked as arithmetic

I reimplemented frac in float32 and evaluated the boundary:

CAP = 0.9999999404  (bits 0x3f7fffff)

x=-1e-30   frac=1            >=1.0: True   -> capped to 0.9999999404
x=-1e-20   frac=1            >=1.0: True   -> capped to 0.9999999404
x=-1e-10   frac=1            >=1.0: True   -> capped to 0.9999999404
x=-1e-08   frac=1            >=1.0: True   -> capped to 0.9999999404
x=-1e-07   frac=0.9999998808 >=1.0: False  -> passes through
x=0, 0.25, 0.5, -0.5, 1.5, -1.5, 3.75      -> pass through unchanged

So "a tiny negative input cannot round up to 1.0" is exactly right, and the threshold sits where the description says it does: the boundary is
between 1e-8 and 1e-7, because 1 - 1e-8 rounds to 1.0 in float32 and 1 - 1e-7 does not.

The NaN half also holds: nan >= 1.0 is false, so the comparison form returns the NaN and lets it propagate, whereas a min-form returns the
non-NaN operand in D3D semantics — min would turn a NaN into 0.99999994. That is a value difference, not a style preference, and the comment
says so.

On the asymmetry this PR is really about

Two translators lowering the same instruction differently is the kind of divergence that costs days later, and the fix goes toward the older,
more careful one rather than the newer one — that is the right direction. Worth keeping in docs/experiments.md (you did) that pixel_aot was
already right, so a future reader does not "unify" them the other way.

Scope

The emitted helper is checked as text plus the two controls; no shader was compiled or run here. Whether adapter frac differences are the
reason pixel_aot chose the cap is a claim from the earlier work, not something this check measures.

Verdict

Reviewed. Four mutations caught, and the numeric claim holds at the boundary.

Notes

  • AI-assisted review.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7147016626 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7147016626). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T23:06:14Z. --- ## Ran it, broke it four ways, and checked the arithmetic the description rests on Windows 11 build 26300.9974, device-free: ```powershell out/pe-env/Scripts/python.exe -B tests/startup_gfx2hlsl_fract_check.py control: a min-form clamp is rejected: ok control: a cap other than 0x3f7fffff is rejected: ok PASS exit 0 ``` | mutation | result | |---|---| | `fract32({0})` → `frac({0})` (the pre-change lowering) | **caught** | | `f >= 1.0f` → `f > 1.0f` | **caught** | | the cap `0x3f7fffffu` → `0x3f7ffffeu` | **caught** | | the comparison form → `min(f, asfloat(0x3f7fffffu))` | **caught** (also your own control) | The second is the one I would have expected to slip: with a strict `>` the exact case the helper exists for — `frac` rounding *up to* 1.0 — no longer fires. Your fixture separates `>` from `>=`, which means it carries the boundary input, not just a mid-range one. ## The two claims in the comment, checked as arithmetic I reimplemented `frac` in float32 and evaluated the boundary: ```text CAP = 0.9999999404 (bits 0x3f7fffff) x=-1e-30 frac=1 >=1.0: True -> capped to 0.9999999404 x=-1e-20 frac=1 >=1.0: True -> capped to 0.9999999404 x=-1e-10 frac=1 >=1.0: True -> capped to 0.9999999404 x=-1e-08 frac=1 >=1.0: True -> capped to 0.9999999404 x=-1e-07 frac=0.9999998808 >=1.0: False -> passes through x=0, 0.25, 0.5, -0.5, 1.5, -1.5, 3.75 -> pass through unchanged ``` So "a tiny negative input cannot round up to 1.0" is exactly right, and the threshold sits where the description says it does: the boundary is between `1e-8` and `1e-7`, because `1 - 1e-8` rounds to 1.0 in float32 and `1 - 1e-7` does not. The NaN half also holds: `nan >= 1.0` is false, so the comparison form returns the NaN and lets it propagate, whereas a `min`-form returns the non-NaN operand in D3D semantics — `min` would turn a NaN into 0.99999994. That is a value difference, not a style preference, and the comment says so. ## On the asymmetry this PR is really about Two translators lowering the same instruction differently is the kind of divergence that costs days later, and the fix goes toward the older, more careful one rather than the newer one — that is the right direction. Worth keeping in `docs/experiments.md` (you did) that `pixel_aot` was already right, so a future reader does not "unify" them the other way. ## Scope The emitted helper is checked as text plus the two controls; no shader was compiled or run here. Whether adapter `frac` differences are the reason `pixel_aot` chose the cap is a claim from the earlier work, not something this check measures. ## Verdict Reviewed. Four mutations caught, and the numeric claim holds at the boundary. ## Notes - AI-assisted review.
thepatrickworld commented 2026-11-25 01:01:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-24T23:07:18Z.


Thanks — the >= → > mutation is the sharpest of the four, and it is the one the check exists for: with a strict > the input the helper is there for, frac rounding up to 1.0, no longer fires.

On the origin of the cap, since you flagged it as not measured here: it is not in the ISA. The RDNA 2 guide gives D.f = S0.f + -floor(S0.f) for V_FRACT_F32 with no cap, and for -2^-30 that expression rounds to 1.0, so the Quadro matches the formula. The cap is D3D's observed frac behaviour on WARP, on an Intel Gen9 part and on the RDNA 4 card used here, which is also what the reference encodes. I added that to the description after your review. If the console's own frac is later shown to return 1.0, the cap and the reference have to be revisited together, not the lowering alone.

There is no NVIDIA adapter on this machine, so the adapter half of the argument still rests on the two reports in #1741 rather than on anything measurable here.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7147037510 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7147037510). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-24T23:07:18Z. --- Thanks — the `>=` → `>` mutation is the sharpest of the four, and it is the one the check exists for: with a strict `>` the input the helper is there for, `frac` rounding up to 1.0, no longer fires. On the origin of the cap, since you flagged it as not measured here: it is not in the ISA. The RDNA 2 guide gives `D.f = S0.f + -floor(S0.f)` for `V_FRACT_F32` with no cap, and for `-2^-30` that expression rounds to 1.0, so the Quadro matches the formula. The cap is D3D's observed `frac` behaviour on WARP, on an Intel Gen9 part and on the RDNA 4 card used here, which is also what the reference encodes. I added that to the description after your review. If the console's own `frac` is later shown to return 1.0, the cap and the reference have to be revisited together, not the lowering alone. There is no NVIDIA adapter on this machine, so the adapter half of the argument still rests on the two reports in #1741 rather than on anything measurable here. _AI-assisted._
Makto94 commented 2026-11-25 01:01:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Makto94 on 2026-11-24T23:19:23Z.


Hardware data for the NVIDIA gap, from an RTX 3070 Ti (driver 32.0.16.2101, Windows 11 build 26300.9974, DXC 1.9.2602.17, FXC from SDK 10.0.26100, debug layer on).

On top of the #1741 head (8ff3dddf, uncommitted) I copied the fract32 helper from this PR verbatim, changed the v_fract_f32 table entry from frac({0}) to fract32({0}) as this PR does, adapted the mutation regex of startup_gfx2hlsl_float_round_check.py (U\(frac\(F -> U\(fract32\(F), and ran that draw test. In my build the registered test passes an empty FXC argument, so I ran the script directly:

python -B tests/startup_gfx2hlsl_float_round_check.py draw <dxc.exe> <offscreen_check.exe> hardware <fxc.exe>
  • DXC (same command without the FXC argument): passes (10 draws matched, 5 mutated).
  • FXC: still fails, startup_flat_param reads 3f800000 where 3f7fffff is expected.

FXC compiles frac(value) to a lone frc and drops the comparison. Changing one line keeps ge/movc in the output:

float f = value - floor(value);

With it, FXC and DXC both pass on hardware (20 draws, 10 mutated, 0 debug errors), and WARP passes too. On this PR's head (8c99dd3f), startup_gfx2hlsl_fract_check.py and the other 22 startup_gfx2hlsl_* checks stay green with this line.

Not measured: Quadro, AMD and Intel with this variant; NaN, inf and -0 (not in the draws).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7147268157 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7147268157). Originally posted by [Makto94](https://github.com/Makto94) on 2026-11-24T23:19:23Z. --- Hardware data for the NVIDIA gap, from an RTX 3070 Ti (driver 32.0.16.2101, Windows 11 build 26300.9974, DXC 1.9.2602.17, FXC from SDK 10.0.26100, debug layer on). On top of the #1741 head (8ff3dddf, uncommitted) I copied the `fract32` helper from this PR verbatim, changed the `v_fract_f32` table entry from `frac({0})` to `fract32({0})` as this PR does, adapted the mutation regex of `startup_gfx2hlsl_float_round_check.py` (`U\(frac\(F` -> `U\(fract32\(F`), and ran that draw test. In my build the registered test passes an empty FXC argument, so I ran the script directly: ``` python -B tests/startup_gfx2hlsl_float_round_check.py draw <dxc.exe> <offscreen_check.exe> hardware <fxc.exe> ``` - DXC (same command without the FXC argument): passes (10 draws matched, 5 mutated). - FXC: still fails, `startup_flat_param` reads 3f800000 where 3f7fffff is expected. FXC compiles `frac(value)` to a lone `frc` and drops the comparison. Changing one line keeps `ge`/`movc` in the output: ```hlsl float f = value - floor(value); ``` With it, FXC and DXC both pass on hardware (20 draws, 10 mutated, 0 debug errors), and WARP passes too. On this PR's head (8c99dd3f), `startup_gfx2hlsl_fract_check.py` and the other 22 `startup_gfx2hlsl_*` checks stay green with this line. Not measured: Quadro, AMD and Intel with this variant; NaN, inf and -0 (not in the draws).
R0Y00 commented 2026-11-25 01:01:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T23:31:31Z.


The cap fixes already translated shaders. Please bump the startup shader cache revision in both gfx2hlsl.py and d3d12_draw.inl after #1997, and check that the pre-fix key no longer hits. The source-built test currently checks the form of the HLSL. Please run the generated shader with default FXC and DXC on the reported negative input and a regular fractional value, using raw pixel words and the uncapped mutant as a control. If WARP already caps the uncapped input, record that separately.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7147497505 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7147497505). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T23:31:31Z. --- The cap fixes already translated shaders. Please bump the startup shader cache revision in both gfx2hlsl.py and d3d12_draw.inl after #1997, and check that the pre-fix key no longer hits. The source-built test currently checks the form of the HLSL. Please run the generated shader with default FXC and DXC on the reported negative input and a regular fractional value, using raw pixel words and the uncapped mutant as a control. If WARP already caps the uncapped input, record that separately.
legacy-code-archaeologist commented 2026-11-25 01:02:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-25T00:16:59Z.


Measured on the Maxwell card this was missing: with #2010 as it stands, the Quadro still fails on the same input, because FXC removes the cap.

Setup: pr-1741 (8ff3dddf) merged with pr-2010 (8c99dd3f) locally (only docs/experiments.md conflicted; gfx2hlsl.py merged cleanly). The v_fract_f32 mutation pattern in tests/startup_gfx2hlsl_float_round_check.py still matches U(frac(...)), so I changed it locally to fract32( to get past the controls (that pin needs the same update when the branches meet). Then I ran startup_gfx2hlsl_float_round_{controls,warp,hardware}.

Adapter #2010 helper (f >= 1.0f ? ... : f)
WARP 10.0.26100 pass
Intel HD 530 (31.0.101.2111) pass
NVIDIA Quadro M1000M (32.0.15.7371) fail: fxc v_fract_f32, expected=...3f7fffff... actual=...3f800000... on 0xb0800000

The reason shows in FXC's own output (fxc.exe 10.0.26100.0, /T ps_5_1). FXC treats frac as strictly below 1, so frac(x) >= 1.0f folds to false and the helper compiles to the bare instruction:

frc o0.x, CB0[0][0].x

precise float f = frac(value) folds the same way (frc [precise(x)], no compare). DXC keeps the compare (fcmp fast oge + select), which is why pixel_aot, which only compiles with DXC, never hit this.

A compare on the bits survives FXC:

float fract32(float value) {
    float f = frac(value);
    return asuint(f) == 0x3f800000u ? asfloat(0x3f7fffffu) : f;
}

FXC emits frc, ieq r0.y, r0.x, l(0x3f800000), movc. frac can only reach the cap by rounding up to exactly +1.0, so the equality test covers the same case, and a NaN still fails it and passes through. With only that line changed in the preamble, all three adapters pass:

Adapter bit-compare helper
WARP pass
Intel HD 530 pass
NVIDIA Quadro M1000M pass: fxc and dxc both read 3f000000,3effffff,3f7fffff,3f000000 for 49742408, 3effffff, b0800000, 4affffff

tests/startup_gfx2hlsl_fract_check.py requires the text f >= 1.0f ? asfloat(0x3f7fffffu) : f, so it would need the new form. It might be worth having it reject the >= form under FXC explicitly. Not checked: Turing (no such card here), and whether a driver could fold DXC's fast oge too. On this Quadro it did not.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148346165 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7148346165). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-25T00:16:59Z. --- Measured on the Maxwell card this was missing: **with #2010 as it stands, the Quadro still fails on the same input**, because FXC removes the cap. Setup: `pr-1741` (8ff3dddf) merged with `pr-2010` (8c99dd3f) locally (only `docs/experiments.md` conflicted; `gfx2hlsl.py` merged cleanly). The `v_fract_f32` mutation pattern in `tests/startup_gfx2hlsl_float_round_check.py` still matches `U(frac(...))`, so I changed it locally to `fract32(` to get past the controls (that pin needs the same update when the branches meet). Then I ran `startup_gfx2hlsl_float_round_{controls,warp,hardware}`. | Adapter | #2010 helper (`f >= 1.0f ? ... : f`) | |---|---| | WARP 10.0.26100 | pass | | Intel HD 530 (31.0.101.2111) | pass | | NVIDIA Quadro M1000M (32.0.15.7371) | **fail**: `fxc v_fract_f32`, `expected=...3f7fffff... actual=...3f800000...` on `0xb0800000` | The reason shows in FXC's own output (`fxc.exe` 10.0.26100.0, `/T ps_5_1`). FXC treats `frac` as strictly below 1, so `frac(x) >= 1.0f` folds to false and the helper compiles to the bare instruction: ``` frc o0.x, CB0[0][0].x ``` `precise float f = frac(value)` folds the same way (`frc [precise(x)]`, no compare). DXC keeps the compare (`fcmp fast oge` + `select`), which is why `pixel_aot`, which only compiles with DXC, never hit this. A compare on the bits survives FXC: ```hlsl float fract32(float value) { float f = frac(value); return asuint(f) == 0x3f800000u ? asfloat(0x3f7fffffu) : f; } ``` FXC emits `frc`, `ieq r0.y, r0.x, l(0x3f800000)`, `movc`. `frac` can only reach the cap by rounding up to exactly `+1.0`, so the equality test covers the same case, and a NaN still fails it and passes through. With only that line changed in the preamble, all three adapters pass: | Adapter | bit-compare helper | |---|---| | WARP | pass | | Intel HD 530 | pass | | NVIDIA Quadro M1000M | pass: fxc and dxc both read `3f000000,3effffff,3f7fffff,3f000000` for `49742408, 3effffff, b0800000, 4affffff` | `tests/startup_gfx2hlsl_fract_check.py` requires the text `f >= 1.0f ? asfloat(0x3f7fffffu) : f`, so it would need the new form. It might be worth having it reject the `>=` form under FXC explicitly. Not checked: Turing (no such card here), and whether a driver could fold DXC's `fast oge` too. On this Quadro it did not.
thepatrickworld commented 2026-11-25 01:02:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-25T00:37:27Z.


All three points are on the branch head (5eb88127).

The cap. fract32 now compares the encoding — asuint(f) == 0x3f800000u ? asfloat(0x3f7fffffu) : f — the form legacy-code-archaeologist measured on the Quadro and Makto94 on the 3070 Ti. Thank you both: FXC folding frac(value) >= 1.0f to false is exactly what this PR could not see from here, because DXC keeps the compare and pixel_aot only ever compiles with DXC.

The cache revision. It goes to x2w-startup-shader-8 in tools/startup/gfx2hlsl.py and in src/startup_stubs/d3d12_draw.inl. A control asserts the two spellings carry the same seed and that the -7 seed produces a different pipeline_key, so a pre-fix entry cannot be hit.

The draw. tests/startup_gfx2hlsl_fract_draw_check.py compiles the generated pair with the default FXC (ps_5_1) and DXC (ps_6_0), draws one pixel through --startup-flat-param and compares raw words. On 0xb0800000, 1.5, 0.0 and -2.5 it reads 3f7fffff,3f000000,00000000,3f000000.

The uncapped control, recorded separately as you asked. On this machine it does not separate the two forms: with the lowering left uncapped, WARP and the RX 9070 XT both read 3f7fffff,3f000000,00000000,3f000000 anyway, so both adapters clamp a bare frc themselves and the mutant cannot be told apart. The check prints that observation instead of asserting a mismatch it cannot produce. The separation rests on the two NVIDIA reports above, which is the reason the form changed.

4/4 fract tests and 53/53 ^startup_gfx2hlsl green here.

AI-assisted; runs executed on the machine above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148706533 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7148706533). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-25T00:37:27Z. --- All three points are on the branch head (`5eb88127`). **The cap.** `fract32` now compares the encoding — `asuint(f) == 0x3f800000u ? asfloat(0x3f7fffffu) : f` — the form legacy-code-archaeologist measured on the Quadro and Makto94 on the 3070 Ti. Thank you both: FXC folding `frac(value) >= 1.0f` to false is exactly what this PR could not see from here, because DXC keeps the compare and `pixel_aot` only ever compiles with DXC. **The cache revision.** It goes to `x2w-startup-shader-8` in `tools/startup/gfx2hlsl.py` and in `src/startup_stubs/d3d12_draw.inl`. A control asserts the two spellings carry the same seed and that the `-7` seed produces a different `pipeline_key`, so a pre-fix entry cannot be hit. **The draw.** `tests/startup_gfx2hlsl_fract_draw_check.py` compiles the generated pair with the default FXC (`ps_5_1`) and DXC (`ps_6_0`), draws one pixel through `--startup-flat-param` and compares raw words. On `0xb0800000`, `1.5`, `0.0` and `-2.5` it reads `3f7fffff,3f000000,00000000,3f000000`. **The uncapped control, recorded separately as you asked.** On this machine it does not separate the two forms: with the lowering left uncapped, WARP and the RX 9070 XT both read `3f7fffff,3f000000,00000000,3f000000` anyway, so both adapters clamp a bare `frc` themselves and the mutant cannot be told apart. The check prints that observation instead of asserting a mismatch it cannot produce. The separation rests on the two NVIDIA reports above, which is the reason the form changed. 4/4 `fract` tests and 53/53 `^startup_gfx2hlsl` green here. _AI-assisted; runs executed on the machine above._
legacy-code-archaeologist commented 2026-11-25 01:02:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-25T00:40:24Z.


Re-ran the new head 5eb88127 on the same Maxwell card: it passes.

Setup as before: pr-1741 (8ff3dddf) merged with this head locally (docs/experiments.md and CMakeLists.txt conflicted; I took #1741's side, since the check script does not depend on either). #1741's v_fract_f32 mutation pattern changed locally from U(frac( to U(fract32(. Then startup_gfx2hlsl_float_round_check.py controls and draw … <warp|hardware> <fxc>, plus startup_gfx2hlsl_fract_check.py.

Adapter Driver Result v_fract_f32 on 49742408, 3effffff, b0800000, 4affffff (fxc and dxc)
WARP 10.0.26100.8972 pass 3f000000,3effffff,3f7fffff,3f000000
NVIDIA Quadro M1000M 32.0.15.7371 pass 3f000000,3effffff,3f7fffff,3f000000
Intel HD Graphics 530 31.0.101.2111 pass 3f000000,3effffff,3f7fffff,3f000000

Controls exit 0, and startup_gfx2hlsl_fract_check.py prints PASS. Windows 11 build 26100, debug layer unavailable. Turing remains unmeasured here. When #1741 rebases, the only test-side change it needs is that mutation pattern.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148756311 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7148756311). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-25T00:40:24Z. --- Re-ran the new head `5eb88127` on the same Maxwell card: **it passes**. Setup as before: `pr-1741` (8ff3dddf) merged with this head locally (`docs/experiments.md` and `CMakeLists.txt` conflicted; I took #1741's side, since the check script does not depend on either). #1741's `v_fract_f32` mutation pattern changed locally from `U(frac(` to `U(fract32(`. Then `startup_gfx2hlsl_float_round_check.py` controls and `draw … <warp|hardware> <fxc>`, plus `startup_gfx2hlsl_fract_check.py`. | Adapter | Driver | Result | `v_fract_f32` on `49742408, 3effffff, b0800000, 4affffff` (fxc and dxc) | |---|---|---|---| | WARP | 10.0.26100.8972 | pass | `3f000000,3effffff,3f7fffff,3f000000` | | NVIDIA Quadro M1000M | 32.0.15.7371 | pass | `3f000000,3effffff,3f7fffff,3f000000` | | Intel HD Graphics 530 | 31.0.101.2111 | pass | `3f000000,3effffff,3f7fffff,3f000000` | Controls exit 0, and `startup_gfx2hlsl_fract_check.py` prints PASS. Windows 11 build 26100, debug layer unavailable. Turing remains unmeasured here. When #1741 rebases, the only test-side change it needs is that mutation pattern.
tedin7 commented 2026-11-25 02:01:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:55:56Z.

Review: COMMENTED


Review of head 5eb8812708e16b82bc74ca2829507b29fc49e2f8 (comment only, no approval).

Verdict: no P1, no P2. Looks correct.

What I checked:

  • v_fract_f32 now lowers to fract32(), defined in the common preamble next to ftz32. Same semantics as tools/pixel_aot.py:406: the result is capped at 0x3f7fffff when frac rounds up to 1.0.
  • The bit comparison (asuint(f) == 0x3f800000u) is sound. frac can only reach the cap by returning exactly +1.0. NaN misses the equality and passes through, same as pixel_aot. The comment explains why >= 1.0f is avoided (FXC folds it).
  • Cache seed x2w-startup-shader-7 to -8 in src/startup_stubs/d3d12_draw.inl:207 matches the changed HLSL. The check pins that the old seed gives a different key.
  • CI on this head: Linux checks, Windows build and gfx1013 fixtures all pass. The /O2 job and the chart job were skipped. Mergeable. Title and body are neutral.

Commands run locally on the PR head (Linux):

  • python3 -B tests/startup_gfx2hlsl_fract_check.py -> PASS
  • python3 -B tests/startup_gfx2hlsl_fract_draw_check.py (controls mode) -> PASS
  • python3 tests/docs_links_check.py -> 18 files, 395 links, OK
  • python3 tests/bidi_controls_check.py -> OK
  • git diff --check origin/main...HEAD -> clean

Mutations (both reverted afterwards with git checkout -- .):

  1. Table entry fract32({0}) changed back to frac({0}): the check exits 1.
  2. Cap condition == 0x3f800000u changed to >= 0x3f800001u: the check exits 1 (FAIL).

Both are killed by the new test.

Not run: the startup_gfx2hlsl_fract_draw_warp and _hardware draw tests need a D3D12 device, so I did not run them here. I did not start a Win2025 run. The Windows CI job is green, and the author's draw results come from the PR body.

Nits (non-blocking):

  • N1: tools/pixel_aot.py:406-409 still uses f >= 1.0f. The new comment says FXC folds that form to false. If pixel_aot goes through FXC, it may lose the cap on the same adapters. Worth a follow-up issue or check. It is out of scope here.
  • N2: CMakeLists.txt comment says the uncapped pair "must read 0x3f800000". That is accurate, but a pointer to the check file's name would help a future reader. Optional.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6050453922 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#pullrequestreview-6050453922). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T01:55:56Z. **Review:** COMMENTED --- Review of head `5eb8812708e16b82bc74ca2829507b29fc49e2f8` (comment only, no approval). **Verdict: no P1, no P2. Looks correct.** What I checked: - `v_fract_f32` now lowers to `fract32()`, defined in the common preamble next to `ftz32`. Same semantics as `tools/pixel_aot.py:406`: the result is capped at `0x3f7fffff` when `frac` rounds up to 1.0. - The bit comparison (`asuint(f) == 0x3f800000u`) is sound. `frac` can only reach the cap by returning exactly +1.0. NaN misses the equality and passes through, same as `pixel_aot`. The comment explains why `>= 1.0f` is avoided (FXC folds it). - Cache seed `x2w-startup-shader-7` to `-8` in `src/startup_stubs/d3d12_draw.inl:207` matches the changed HLSL. The check pins that the old seed gives a different key. - CI on this head: Linux checks, Windows build and gfx1013 fixtures all pass. The `/O2` job and the chart job were skipped. Mergeable. Title and body are neutral. Commands run locally on the PR head (Linux): - `python3 -B tests/startup_gfx2hlsl_fract_check.py` -> PASS - `python3 -B tests/startup_gfx2hlsl_fract_draw_check.py` (controls mode) -> PASS - `python3 tests/docs_links_check.py` -> 18 files, 395 links, OK - `python3 tests/bidi_controls_check.py` -> OK - `git diff --check origin/main...HEAD` -> clean Mutations (both reverted afterwards with `git checkout -- .`): 1. Table entry `fract32({0})` changed back to `frac({0})`: the check exits 1. 2. Cap condition `== 0x3f800000u` changed to `>= 0x3f800001u`: the check exits 1 (FAIL). Both are killed by the new test. Not run: the `startup_gfx2hlsl_fract_draw_warp` and `_hardware` draw tests need a D3D12 device, so I did not run them here. I did not start a Win2025 run. The Windows CI job is green, and the author's draw results come from the PR body. Nits (non-blocking): - N1: `tools/pixel_aot.py:406-409` still uses `f >= 1.0f`. The new comment says FXC folds that form to false. If `pixel_aot` goes through FXC, it may lose the cap on the same adapters. Worth a follow-up issue or check. It is out of scope here. - N2: `CMakeLists.txt` comment says the uncapped pair "must read 0x3f800000". That is accurate, but a pointer to the check file's name would help a future reader. Optional. AI-assisted; commands listed were executed locally.
thepatrickworld commented 2026-11-25 03:01:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-25T02:13:27Z.


Thank you for the review, and for killing the mutations on that form.

I checked N1, because it decides whether the cap in pixel_aot is real or just nominal.

fxc appears in this repository only on the startup path: tools/startup/gfx2hlsl.py finds it and runs it to compile the translated pair. No pixel_aot output goes through it. Of the 49 test files that mention pixel_aot, four also carry ps_5_1 or cs_5_1, and in all four the SM5 profile belongs to startup fixtures — those files only do from pixel_aot import disassemble. Every file that compiles a shader produced by pixel_aot uses ps_6_0 or cs_6_0.

So the f >= 1.0f form in pixel_aot still has its cap today, and this PR is not leaving a live copy of the bug behind. That is worth saying out loud, since the review could not see it from the diff.

It is nonetheless a latent trap in exactly the direction you point at: if pixel_aot is ever compiled through FXC — an SM5 fallback, a smoke test, someone copying the pair — the cap disappears and nothing fails, which is what happened here until a Quadro read 3f800000. Two cheap ways to close it: a comment beside that comparison saying the form depends on the compiler keeping it, which is why the startup helper now carries the bit form; or use the same bit form there, which is the same semantics under both compilers.

N2 is fair. I can fold that pointer into this PR as a one-line comment change if you would rather have it here than as a follow-up.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7150462080 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7150462080). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-25T02:13:27Z. --- Thank you for the review, and for killing the mutations on that form. **I checked N1, because it decides whether the cap in `pixel_aot` is real or just nominal.** `fxc` appears in this repository only on the startup path: `tools/startup/gfx2hlsl.py` finds it and runs it to compile the translated pair. No `pixel_aot` output goes through it. Of the 49 test files that mention `pixel_aot`, four also carry `ps_5_1` or `cs_5_1`, and in all four the SM5 profile belongs to startup fixtures — those files only do `from pixel_aot import disassemble`. Every file that compiles a shader produced by `pixel_aot` uses `ps_6_0` or `cs_6_0`. So the `f >= 1.0f` form in `pixel_aot` still has its cap today, and this PR is not leaving a live copy of the bug behind. That is worth saying out loud, since the review could not see it from the diff. It is nonetheless a latent trap in exactly the direction you point at: if `pixel_aot` is ever compiled through FXC — an SM5 fallback, a smoke test, someone copying the pair — the cap disappears and nothing fails, which is what happened here until a Quadro read `3f800000`. Two cheap ways to close it: a comment beside that comparison saying the form depends on the compiler keeping it, which is why the startup helper now carries the bit form; or use the same bit form there, which is the same semantics under both compilers. N2 is fair. I can fold that pointer into this PR as a one-line comment change if you would rather have it here than as a follow-up. _AI-assisted._
stan495 commented 2026-11-25 06:01:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-25T05:42:16Z.

Review: APPROVED


Verified head 5eb88127 on Windows x64 (dev preset, MSVC 19.44.35228.0, SDK 10.0.26100.0, DXC/FXC 10.0.26100.0):

  • cmake --build --preset dev --target offscreen_check -> succeeded
  • ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_fract' -V -> 4/4 passed (startup_gfx2hlsl_fract, startup_gfx2hlsl_fract_draw_controls, startup_gfx2hlsl_fract_draw_warp, startup_gfx2hlsl_fract_draw_hardware)
    • Both FXC and DXC capped runs read 3f7fffff,3f000000,00000000,3f000000 with debug_layer=enabled, debug_errors=0 debug_warnings=0 (and as recorded in the test, both WARP and this hardware adapter also clamp bare frc on the -2^-30 input).
    • Hardware: AMD Radeon RX 7900 XTX (vendor=1002 device=744c, driver 32.0.32029.2010)
    • WARP: Microsoft Basic Render Driver (vendor=1414 device=008c, driver 10.0.26100.9818)

Verdict: Approved at 5eb88127.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6052426090 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#pullrequestreview-6052426090). Originally posted by [stan495](https://github.com/stan495) on 2026-11-25T05:42:16Z. **Review:** APPROVED --- Verified head `5eb88127` on Windows x64 (`dev` preset, MSVC `19.44.35228.0`, SDK `10.0.26100.0`, DXC/FXC `10.0.26100.0`): - `cmake --build --preset dev --target offscreen_check` -> succeeded - `ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_fract' -V` -> 4/4 passed (`startup_gfx2hlsl_fract`, `startup_gfx2hlsl_fract_draw_controls`, `startup_gfx2hlsl_fract_draw_warp`, `startup_gfx2hlsl_fract_draw_hardware`) - Both FXC and DXC capped runs read `3f7fffff,3f000000,00000000,3f000000` with `debug_layer=enabled`, `debug_errors=0 debug_warnings=0` (and as recorded in the test, both WARP and this hardware adapter also clamp bare `frc` on the `-2^-30` input). - Hardware: `AMD Radeon RX 7900 XTX` (`vendor=1002 device=744c`, driver `32.0.32029.2010`) - WARP: `Microsoft Basic Render Driver` (`vendor=1414 device=008c`, driver `10.0.26100.9818`) Verdict: Approved at `5eb88127`.
Makto94 commented 2026-11-25 11:02:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Makto94 on 2026-11-25T10:27:34Z.


Hardware result for head 5eb88127 on an NVIDIA adapter: startup_gfx2hlsl_fract_draw_hardware passes with FXC and with DXC.

.\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^startup_gfx2hlsl_fract_draw_hardware$' -V

NVIDIA GeForce RTX 3070 Ti (10de:2482), driver 32.0.16.2101, Windows 11 build 26300.9974, Debug build, fxc 10.0.26100.9457, dxc 1.9.2602.17, debug layer enabled, 0 capability skips (77). The log shows both compilers:

  • FXC capped pair reads 3f7fffff,3f000000,00000000,3f000000; uncapped control reads 3f800000,3f000000,00000000,3f000000.
  • DXC reads the same two sets of words.
  • debug_errors=0 debug_warnings=0 in all four runs.

This adds an NVIDIA Ampere adapter to stan495's AMD run on this head. legacy-code-archaeologist measured Maxwell, WARP and Intel on this head through the #1741 test, not this one.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7159723439 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7159723439). Originally posted by [Makto94](https://github.com/Makto94) on 2026-11-25T10:27:34Z. --- Hardware result for head `5eb88127` on an NVIDIA adapter: `startup_gfx2hlsl_fract_draw_hardware` passes with FXC and with DXC. ```powershell .\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^startup_gfx2hlsl_fract_draw_hardware$' -V ``` NVIDIA GeForce RTX 3070 Ti (`10de:2482`), driver 32.0.16.2101, Windows 11 build 26300.9974, Debug build, fxc 10.0.26100.9457, dxc 1.9.2602.17, debug layer enabled, 0 capability skips (77). The log shows both compilers: - FXC capped pair reads `3f7fffff,3f000000,00000000,3f000000`; uncapped control reads `3f800000,3f000000,00000000,3f000000`. - DXC reads the same two sets of words. - `debug_errors=0 debug_warnings=0` in all four runs. This adds an NVIDIA Ampere adapter to stan495's AMD run on this head. legacy-code-archaeologist measured Maxwell, WARP and Intel on this head through the #1741 test, not this one.
tedin7 commented 2026-11-25 13:01:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T12:52:48Z.


@thepatrickworld could you rebase this branch onto current main and force-push?

GitHub reports head 5eb88127 as conflicting with main, so it cannot be merged as is.

Files that conflict with current main (4aaea119):

  • CMakeLists.txt
  • src/startup_stubs/d3d12_draw.inl
  • tools/startup/gfx2hlsl.py

Commands run locally:

git fetch origin main pull/2010/head
git merge-tree --write-tree --name-only origin/main FETCH_HEAD
gh pr view 2010 --json mergeable   # CONFLICTING

Once it is rebased and CI is green it will be re-checked right away.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7162983818 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7162983818). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T12:52:48Z. --- @thepatrickworld could you rebase this branch onto current `main` and force-push? GitHub reports head `5eb88127` as conflicting with `main`, so it cannot be merged as is. Files that conflict with current `main` (`4aaea119`): - `CMakeLists.txt` - `src/startup_stubs/d3d12_draw.inl` - `tools/startup/gfx2hlsl.py` Commands run locally: ``` git fetch origin main pull/2010/head git merge-tree --write-tree --name-only origin/main FETCH_HEAD gh pr view 2010 --json mergeable # CONFLICTING ``` Once it is rebased and CI is green it will be re-checked right away. AI-assisted; commands listed were executed locally.
thepatrickworld commented 2026-11-25 17:01:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-25T16:08:14Z.


Merged origin/main (7092683a) into the branch. The conflicts were on CMakeLists.txt, src/startup_stubs/d3d12_draw.inl and tools/startup/gfx2hlsl.py; the substantive one was the cache revision, which origin/main moved to 14 (via #2059). The branch now carries 15 in tools/startup/gfx2hlsl.py, src/startup_stubs/d3d12_draw.inl, tests/startup_indirect_draw_indexed.cpp, tests/startup_gfx2hlsl_buffer_store_check.py, tests/startup_gfx2hlsl_fract_check.py and docs/startup-runtime.md. The compute revision stays at 14cs, since the compute path does not change.

On the RX 9070 XT (1002:7550, driver 32.0.32029.2010), head eb648061, backend hardware. The fixture compiles each profile itself — ps_5_1 through fxc, ps_6_0 through dxc:

  • startup_gfx2hlsl_fract_draw_check.py draw <dxc> <offscreen_check> hardware <fxc> ends with PASS (13 checks, no failure) and reads startup_flat_param words=3f7fffff,3f000000,00000000,3f000000
  • the same run records that this adapter clamps a bare frc itself, so the control cannot separate the two forms on it; the failing reports in the docstring are NVIDIA
  • startup_gfx2hlsl_fract_check.py (translator only) ends with PASS too (29 checks, no failure)

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167625065 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7167625065). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-25T16:08:14Z. --- Merged `origin/main` (`7092683a`) into the branch. The conflicts were on `CMakeLists.txt`, `src/startup_stubs/d3d12_draw.inl` and `tools/startup/gfx2hlsl.py`; the substantive one was the cache revision, which `origin/main` moved to 14 (via #2059). The branch now carries 15 in `tools/startup/gfx2hlsl.py`, `src/startup_stubs/d3d12_draw.inl`, `tests/startup_indirect_draw_indexed.cpp`, `tests/startup_gfx2hlsl_buffer_store_check.py`, `tests/startup_gfx2hlsl_fract_check.py` and `docs/startup-runtime.md`. The compute revision stays at `14cs`, since the compute path does not change. On the RX 9070 XT (`1002:7550`, driver `32.0.32029.2010`), head `eb648061`, backend `hardware`. The fixture compiles each profile itself — `ps_5_1` through fxc, `ps_6_0` through dxc: - `startup_gfx2hlsl_fract_draw_check.py draw <dxc> <offscreen_check> hardware <fxc>` ends with `PASS` (13 checks, no failure) and reads `startup_flat_param words=3f7fffff,3f000000,00000000,3f000000` - the same run records that this adapter clamps a bare `frc` itself, so the control cannot separate the two forms on it; the failing reports in the docstring are NVIDIA - `startup_gfx2hlsl_fract_check.py` (translator only) ends with `PASS` too (29 checks, no failure) _AI-assisted._
tedin7 commented 2026-11-25 20:04:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:27:29Z.

Review: COMMENTED


Review of head 5a544a3a (own diff identical to the previously reviewed 29d0fe9f; only a merge of main was added). Comment review, no approval.

Checked:

  • v_fract_f32 now lowers to fract32({0}); the helper is in the common preamble and compares the encoding (asuint(f) == 0x3f800000u), matching the pixel_aot behavior and avoiding the FXC fold of a float compare.
  • Cache revision moved to x2w-startup-shader-15 in gfx2hlsl.py, d3d12_draw.inl and tests/startup_indirect_draw_indexed.cpp. The compute revision (-14cs) is a separate key and is consistent between the two files.
  • Tests: startup_gfx2hlsl_fract (text/lowering), startup_gfx2hlsl_fract_draw_controls, and startup_gfx2hlsl_fract_draw_{warp,hardware} (real D3D12 draw, FXC 5_1 and DXC, readback of the -2^-30 lane). Sibling cache-key test updated to revision 15.
  • This is a numeric-parity fix reported by hardware runs in #1741; it does not claim a startup advance by itself.

Commands run on Linux:

  • python3 -B tests/startup_gfx2hlsl_fract_check.py -> PASS
  • python3 -B tests/startup_gfx2hlsl_buffer_store_check.py -> ok
  • python3 tests/docs_links_check.py -> pass; python3 tests/bidi_controls_check.py -> pass; git diff --check origin/main...HEAD -> clean
  • Mutation: cap comparison changed to 0x3f800001u -> fract check exits 1. Mutation: fract32({0}) reverted to frac({0}) -> fract check exits 1.

Win2025 WARP dev+release on this head follows in a separate receipt.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6063706298 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#pullrequestreview-6063706298). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:27:29Z. **Review:** COMMENTED --- Review of head 5a544a3a (own diff identical to the previously reviewed 29d0fe9f; only a merge of main was added). Comment review, no approval. Checked: - `v_fract_f32` now lowers to `fract32({0})`; the helper is in the common preamble and compares the encoding (`asuint(f) == 0x3f800000u`), matching the `pixel_aot` behavior and avoiding the FXC fold of a float compare. - Cache revision moved to `x2w-startup-shader-15` in gfx2hlsl.py, d3d12_draw.inl and tests/startup_indirect_draw_indexed.cpp. The compute revision (`-14cs`) is a separate key and is consistent between the two files. - Tests: `startup_gfx2hlsl_fract` (text/lowering), `startup_gfx2hlsl_fract_draw_controls`, and `startup_gfx2hlsl_fract_draw_{warp,hardware}` (real D3D12 draw, FXC 5_1 and DXC, readback of the -2^-30 lane). Sibling cache-key test updated to revision 15. - This is a numeric-parity fix reported by hardware runs in #1741; it does not claim a startup advance by itself. Commands run on Linux: - `python3 -B tests/startup_gfx2hlsl_fract_check.py` -> PASS - `python3 -B tests/startup_gfx2hlsl_buffer_store_check.py` -> ok - `python3 tests/docs_links_check.py` -> pass; `python3 tests/bidi_controls_check.py` -> pass; `git diff --check origin/main...HEAD` -> clean - Mutation: cap comparison changed to `0x3f800001u` -> fract check exits 1. Mutation: `fract32({0})` reverted to `frac({0})` -> fract check exits 1. Win2025 WARP dev+release on this head follows in a separate receipt. AI-assisted; commands listed were executed locally.
Makto94 commented 2026-11-25 20:04:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Makto94 on 2026-11-25T19:32:54Z.


Hardware run and Windows 11 MSVC build at head 5a544a3a (merge of main into 29d0fe9f; cache revision 15). The NVIDIA result I posted for 5eb88127 is repeated here on the new head.

Environment: Windows 11 Pro build 26300.9974, Debug (dev preset), MSVC toolset 14.44.35207 (cl 19.44.35230.0), driver 32.0.16.2101. The hardware test prints adapter=NVIDIA GeForce RTX 3070 Ti vendor=10de device=2482 and backend=hardware debug_layer=enabled, with debug_errors=0 debug_warnings=0 in every case. The runs were serial (-j1).

Build: cmake --build --preset dev exited 0. This PR changes C++ (src/startup_stubs/d3d12_draw.inl, tests/startup_indirect_draw_indexed.cpp), so this is a full build.

Tests:

  • ctest --preset dev --no-tests=error -j1 -R '^startup_gfx2hlsl_fract' -E hardware -V: 3/3 passed (startup_gfx2hlsl_fract, startup_gfx2hlsl_fract_draw_controls, startup_gfx2hlsl_fract_draw_warp).
  • ctest --preset dev --no-tests=error -j1 -R '^startup_gfx2hlsl_fract.*_hardware$' -V: 1/1 passed (startup_gfx2hlsl_fract_draw_hardware). 0 capability skips (77).

startup_gfx2hlsl_fract also checks the cache: the revision is x2w-startup-shader-15, pipeline_key hashes the seed the source spells, and the -14 seed gives a different key.

The hardware test runs the generated pair with FXC and with DXC, each with the capped helper and with the uncapped control:

  • FXC capped: 3f7fffff,3f000000,00000000,3f000000. FXC uncapped control: 3f800000,3f000000,00000000,3f000000, so the control fails as intended.
  • DXC capped and DXC uncapped control read the same two sets of words.

The WARP run (adapter=Microsoft Basic Render Driver, driver 10.0.26100.9818) reads the capped word 3f7fffff,3f000000,00000000,3f000000 for all four runs, with debug_errors=0 debug_warnings=0. WARP clamps a bare frc itself, so the control cannot separate the two forms there; the test records this.

Not covered by this run: this run is NVIDIA only (the PR already lists an AMD run); only the startup_gfx2hlsl_fract* tests were run, not the full ctest suite.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172448590 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7172448590). Originally posted by [Makto94](https://github.com/Makto94) on 2026-11-25T19:32:54Z. --- Hardware run and Windows 11 MSVC build at head `5a544a3a` (merge of `main` into `29d0fe9f`; cache revision 15). The NVIDIA result I posted for `5eb88127` is repeated here on the new head. Environment: Windows 11 Pro build 26300.9974, Debug (`dev` preset), MSVC toolset 14.44.35207 (cl 19.44.35230.0), driver 32.0.16.2101. The hardware test prints `adapter=NVIDIA GeForce RTX 3070 Ti vendor=10de device=2482` and `backend=hardware debug_layer=enabled`, with `debug_errors=0 debug_warnings=0` in every case. The runs were serial (`-j1`). Build: `cmake --build --preset dev` exited 0. This PR changes C++ (`src/startup_stubs/d3d12_draw.inl`, `tests/startup_indirect_draw_indexed.cpp`), so this is a full build. Tests: - `ctest --preset dev --no-tests=error -j1 -R '^startup_gfx2hlsl_fract' -E hardware -V`: 3/3 passed (`startup_gfx2hlsl_fract`, `startup_gfx2hlsl_fract_draw_controls`, `startup_gfx2hlsl_fract_draw_warp`). - `ctest --preset dev --no-tests=error -j1 -R '^startup_gfx2hlsl_fract.*_hardware$' -V`: 1/1 passed (`startup_gfx2hlsl_fract_draw_hardware`). 0 capability skips (77). `startup_gfx2hlsl_fract` also checks the cache: the revision is `x2w-startup-shader-15`, `pipeline_key` hashes the seed the source spells, and the `-14` seed gives a different key. The hardware test runs the generated pair with FXC and with DXC, each with the capped helper and with the uncapped control: - FXC capped: `3f7fffff,3f000000,00000000,3f000000`. FXC uncapped control: `3f800000,3f000000,00000000,3f000000`, so the control fails as intended. - DXC capped and DXC uncapped control read the same two sets of words. The WARP run (`adapter=Microsoft Basic Render Driver`, driver 10.0.26100.9818) reads the capped word `3f7fffff,3f000000,00000000,3f000000` for all four runs, with `debug_errors=0 debug_warnings=0`. WARP clamps a bare `frc` itself, so the control cannot separate the two forms there; the test records this. Not covered by this run: this run is NVIDIA only (the PR already lists an AMD run); only the `startup_gfx2hlsl_fract*` tests were run, not the full `ctest` suite.
tedin7 commented 2026-11-25 20:04:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:42:03Z.


Win2025 WARP receipt for head 5a544a3a after updating with main.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 5a544a3a72313254c8cc5b4872383f37b5a31770:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2): 31.42s (configure 0.00s)
    • Test (ctest --preset dev -R 'startup_gfx2hlsl_fract(_draw_(controls|warp))?$|startup_gfx2hlsl_buffer_store' --parallel 2 --no-tests=error --output-on-failure): 4/4 passed (1.00s: startup_gfx2hlsl_fract_draw_warp 0.65s, startup_gfx2hlsl_buffer_store 0.64s, startup_gfx2hlsl_fract 0.14s, startup_gfx2hlsl_fract_draw_controls 0.12s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2): 2.51s (configure 0.00s)
    • Test (ctest --preset release -R 'startup_gfx2hlsl_fract(_draw_(controls|warp))?$|startup_gfx2hlsl_buffer_store' --parallel 2 --no-tests=error --output-on-failure): 4/4 passed (0.85s: startup_gfx2hlsl_fract 0.10s, startup_gfx2hlsl_fract_draw_controls 0.10s, startup_gfx2hlsl_buffer_store 0.45s, startup_gfx2hlsl_fract_draw_warp 0.51s)
  • Windows Python checks: tests/mesh_heap_sampler_check.py ok (0.7s), tests/startup_buffer_address_check.py ok (0.4s), tests/startup_compute_request_offline_check.py ok (0.4s), tests/startup_compute_translate_check.py ok (0.2s), tests/startup_flat_param_check.py ok (0.1s), tests/startup_gfx2hlsl_add_sub_co_check.py ok (0.1s), tests/startup_gfx2hlsl_add_sub_co_ci_check.py ok (0.1s), tests/startup_gfx2hlsl_bit_alu_check.py ok (0.6s), tests/startup_gfx2hlsl_capture_check.py ok (0.9s), tests/startup_gfx2hlsl_cmp16_check.py ok (0.2s), tests/startup_gfx2hlsl_compare_dst_check.py ok (0.1s), tests/startup_gfx2hlsl_compute_check.py ok (0.3s), tests/startup_gfx2hlsl_cselect_mask_check.py ok (0.1s), tests/startup_gfx2hlsl_cvt_alu_check.py ok (0.1s), tests/startup_gfx2hlsl_f32_lg_check.py ok (1.3s), tests/startup_gfx2hlsl_f32_nan_check.py ok (5.1s), tests/startup_gfx2hlsl_getpc_refusal_check.py ok (0.1s), tests/startup_gfx2hlsl_handler_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_get_lod_check.py ok (0.1s), tests/startup_gfx2hlsl_int_med3_check.py ok (0.1s), tests/startup_gfx2hlsl_join_symbols_check.py ok (0.2s), tests/startup_gfx2hlsl_loop_constants_check.py ok (0.1s), tests/startup_gfx2hlsl_mask_overwrite_check.py ok (0.1s), tests/startup_gfx2hlsl_operand_count_check.py ok (0.3s), tests/startup_gfx2hlsl_readfirstlane_recompute_check.py ok (0.1s), tests/startup_gfx2hlsl_readfirstlane_uniform_check.py ok (0.1s), tests/startup_gfx2hlsl_refusals_check.py ok (0.5s), tests/startup_gfx2hlsl_root_check.py ok (0.7s), tests/startup_gfx2hlsl_saveexec_same_reg_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_arity_check.py ok (0.2s), tests/startup_gfx2hlsl_scalar_brev_fold_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_m0_check.py ok (0.1s), tests/startup_gfx2hlsl_sdwa_cvt_check.py ok (0.2s), tests/startup_gfx2hlsl_sgpr_spill_check.py ok (0.1s), tests/startup_gfx2hlsl_shift64_check.py ok (0.1s), tests/startup_gfx2hlsl_smem_offset_check.py ok (0.1s), tests/startup_gfx2hlsl_sop2_complement_check.py ok (5.7s), tests/startup_gfx2hlsl_sopk_accum_check.py ok (0.8s), tests/startup_gfx2hlsl_sopk_signext_check.py ok (0.1s), tests/startup_gfx2hlsl_swap_check.py ok (0.3s), tests/startup_gfx2hlsl_vopc_sdwa_check.py ok (4.1s), tests/startup_gfx2hlsl_waitcnt_depctr_check.py ok (0.1s), tests/startup_gfx2hlsl_watch_check.py ok (2.4s), tests/startup_image_2d_array_check.py ok (0.2s), tests/startup_image_3d_check.py ok (0.1s), tests/startup_image_gather_lz_check.py ok (0.6s), tests/startup_image_load_d16_check.py ok (0.8s), tests/startup_image_sample_a16_check.py ok (0.1s), tests/startup_image_sample_b_check.py ok (0.1s), tests/startup_image_sample_c_check.py ok (0.2s), tests/startup_image_sample_l_check.py ok (0.2s), tests/startup_image_sample_lod_check.py ok (0.6s), tests/startup_inline_sampler_check.py ok (0.2s), tests/startup_mesh57_skeleton_check.py ok (0.1s), tests/startup_run_ps1_check.py ok (8.9s), tests/startup_run_sh_check.py FAIL (0.1s), tests/startup_sampler_heap_check.py ok (0.1s), tests/startup_smem_address_check.py ok (0.1s), tests/startup_stream_fetch_check.py ok (0.2s), tests/startup_stream_interface_check.py ok (0.2s), tests/startup_translator_check.py ok (0.4s)
  • Note: tests/startup_run_sh_check.py is a Windows-host shell check unrelated to this change; the pipeline still reports PASS (dev 4/4, release 4/4 on the PR tests).
  • sccache: 3/6 hits; wall 83.3s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172651664 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7172651664). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:42:03Z. --- Win2025 WARP receipt for head 5a544a3a after updating with main. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `5a544a3a72313254c8cc5b4872383f37b5a31770`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2`): `31.42s` (configure `0.00s`) - Test (`ctest --preset dev -R 'startup_gfx2hlsl_fract(_draw_(controls|warp))?$|startup_gfx2hlsl_buffer_store' --parallel 2 --no-tests=error --output-on-failure`): **4/4 passed** (`1.00s`: `startup_gfx2hlsl_fract_draw_warp` `0.65s`, `startup_gfx2hlsl_buffer_store` `0.64s`, `startup_gfx2hlsl_fract` `0.14s`, `startup_gfx2hlsl_fract_draw_controls` `0.12s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2`): `2.51s` (configure `0.00s`) - Test (`ctest --preset release -R 'startup_gfx2hlsl_fract(_draw_(controls|warp))?$|startup_gfx2hlsl_buffer_store' --parallel 2 --no-tests=error --output-on-failure`): **4/4 passed** (`0.85s`: `startup_gfx2hlsl_fract` `0.10s`, `startup_gfx2hlsl_fract_draw_controls` `0.10s`, `startup_gfx2hlsl_buffer_store` `0.45s`, `startup_gfx2hlsl_fract_draw_warp` `0.51s`) - **Windows Python checks**: `tests/mesh_heap_sampler_check.py` ok (`0.7s`), `tests/startup_buffer_address_check.py` ok (`0.4s`), `tests/startup_compute_request_offline_check.py` ok (`0.4s`), `tests/startup_compute_translate_check.py` ok (`0.2s`), `tests/startup_flat_param_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_add_sub_co_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_add_sub_co_ci_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_bit_alu_check.py` ok (`0.6s`), `tests/startup_gfx2hlsl_capture_check.py` ok (`0.9s`), `tests/startup_gfx2hlsl_cmp16_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_compare_dst_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_compute_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_cselect_mask_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_cvt_alu_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_f32_lg_check.py` ok (`1.3s`), `tests/startup_gfx2hlsl_f32_nan_check.py` ok (`5.1s`), `tests/startup_gfx2hlsl_getpc_refusal_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_handler_arity_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_image_arity_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_image_get_lod_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_int_med3_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_join_symbols_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_loop_constants_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_mask_overwrite_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_operand_count_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_readfirstlane_recompute_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_readfirstlane_uniform_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_refusals_check.py` ok (`0.5s`), `tests/startup_gfx2hlsl_root_check.py` ok (`0.7s`), `tests/startup_gfx2hlsl_saveexec_same_reg_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_scalar_arity_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_scalar_brev_fold_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_scalar_m0_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_sdwa_cvt_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_sgpr_spill_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_shift64_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_smem_offset_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_sop2_complement_check.py` ok (`5.7s`), `tests/startup_gfx2hlsl_sopk_accum_check.py` ok (`0.8s`), `tests/startup_gfx2hlsl_sopk_signext_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_swap_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_vopc_sdwa_check.py` ok (`4.1s`), `tests/startup_gfx2hlsl_waitcnt_depctr_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_watch_check.py` ok (`2.4s`), `tests/startup_image_2d_array_check.py` ok (`0.2s`), `tests/startup_image_3d_check.py` ok (`0.1s`), `tests/startup_image_gather_lz_check.py` ok (`0.6s`), `tests/startup_image_load_d16_check.py` ok (`0.8s`), `tests/startup_image_sample_a16_check.py` ok (`0.1s`), `tests/startup_image_sample_b_check.py` ok (`0.1s`), `tests/startup_image_sample_c_check.py` ok (`0.2s`), `tests/startup_image_sample_l_check.py` ok (`0.2s`), `tests/startup_image_sample_lod_check.py` ok (`0.6s`), `tests/startup_inline_sampler_check.py` ok (`0.2s`), `tests/startup_mesh57_skeleton_check.py` ok (`0.1s`), `tests/startup_run_ps1_check.py` ok (`8.9s`), `tests/startup_run_sh_check.py` FAIL (`0.1s`), `tests/startup_sampler_heap_check.py` ok (`0.1s`), `tests/startup_smem_address_check.py` ok (`0.1s`), `tests/startup_stream_fetch_check.py` ok (`0.2s`), `tests/startup_stream_interface_check.py` ok (`0.2s`), `tests/startup_translator_check.py` ok (`0.4s`) - Note: `tests/startup_run_sh_check.py` is a Windows-host shell check unrelated to this change; the pipeline still reports PASS (dev 4/4, release 4/4 on the PR tests). - `sccache`: 3/6 hits; wall `83.3s` AI-assisted; commands listed were executed locally.
MasterDomino commented 2026-11-25 21:01:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T20:19:18Z.


Heads-up on the startup cache revision: #2467 merged as ae5d482a and moved main to x2w-startup-shader-15 / 15cs. This branch also bumps to 15, so after the next rebase please take the next free number. #2095 plans 16, so whichever of the two lands later needs 17. Bump the compute Ncs string together with the graphics one, since compute shares the preamble.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7173495833 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7173495833). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T20:19:18Z. --- Heads-up on the startup cache revision: #2467 merged as `ae5d482a` and moved `main` to `x2w-startup-shader-15` / `15cs`. This branch also bumps to `15`, so after the next rebase please take the next free number. #2095 plans `16`, so whichever of the two lands later needs `17`. Bump the compute `Ncs` string together with the graphics one, since compute shares the preamble. AI-assisted.
R0Y00 commented 2026-11-25 21:01:31 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T20:27:02Z.


Thanks for flagging the shared cache keys. The current candidate c1c99ec9 includes the mainline revision-15 change and advances graphics/compute to 16/16cs, plus the fixed slot-57 mesh key to 2. The runtime publishers and offline readers use the same versions. The exact Windows Release run passed 24/24, including FXC/DXC fract boundary and wrong-reference cases, the compute key and cache scan, slot-57 publisher/exchange, and the title-memory-retirement fixture. If #2095 lands after this, it should take the next free revision. This validates the source-built behavior; any actual EXE comparison still needs a matching cache.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7173689300 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2010#issuecomment-7173689300). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T20:27:02Z. --- Thanks for flagging the shared cache keys. The current candidate `c1c99ec9` includes the mainline revision-15 change and advances graphics/compute to `16`/`16cs`, plus the fixed slot-57 mesh key to `2`. The runtime publishers and offline readers use the same versions. The exact Windows Release run passed 24/24, including FXC/DXC fract boundary and wrong-reference cases, the compute key and cache scan, slot-57 publisher/exchange, and the title-memory-retirement fixture. If #2095 lands after this, it should take the next free revision. This validates the source-built behavior; any actual EXE comparison still needs a matching cache.
upstream-sync closed this pull request 2026-11-25 22:01:49 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!2003
No description provided.