\ #3357

Closed
github-bot wants to merge 5 commits from github-bot/gh-3355 into main AGit
Owner

@⁠KelboLive on GitHub · 2026-11-28 13:25 UTC · original
KelboLive:fix/xmem-fresh-slot-commit → main · +142 −92 · 7 files · 5 commits · closed without merging

xmem: always commit fresh slot in section_for()

In section_for(), when creating a new slab for a fresh page, make_slab commits offset 0 of the slab. The original code only committed the target slot (at slot.offset) when first_slot_committed was false — which never happens because make_slab returns true only after successfully committing offset 0.

This left fresh slots at non-zero offsets uncommitted in non-lazy mode, causing access faults on first use. Remove the !first_slot_committed guard so the target slot is always committed before recording it.

**@⁠KelboLive** on GitHub · 2026-11-28 13:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3355) `KelboLive:fix/xmem-fresh-slot-commit` → `main` · +142 −92 · 7 files · 5 commits · closed without merging xmem: always commit fresh slot in section_for() In `section_for()`, when creating a new slab for a fresh page, `make_slab` commits offset 0 of the slab. The original code only committed the target slot (at `slot.offset`) when `first_slot_committed` was false — which never happens because `make_slab` returns true only after successfully committing offset 0. This left fresh slots at non-zero offsets uncommitted in non-lazy mode, causing access faults on first use. Remove the `!first_slot_committed` guard so the target slot is always committed before recording it.
Record BVH hardware test results on NVIDIA GeForce RTX 4070 Ti SUPER
with driver 32.0.16.2101. Tests: bvh_waves_hardware passed,
bvh_wave64_hardware skipped, bvh_differential_hardware passed.

Update README hardware coverage table and add gpu-report-hardware.md
for the issue #1 comment thread.

Refs #1
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 13:38:12 +00:00
Author
Owner

@⁠Leyukaka on GitHub · 2026-11-28 17:07 UTC · original · requested changes

.github/workflows/sync.yml should not be part of this PR. It is a fork-sync job, and nothing restricts it to forks (no if: github.repository != 'R0Y00/Xbox2Windows'). Merged here, it would run on this repository every 6 h (cron: '0 */6 * * *') with permissions: contents: write and end in git push origin main --force-with-lease. Here origin and upstream (https://github.com/R0Y00/Xbox2Windows.git) are the same repository, so the job does nothing useful but keeps a scheduled force-push step with write access on main. Please drop the file from the branch.

**@⁠Leyukaka** on GitHub · 2026-11-28 17:07 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3355#pullrequestreview-6099192354) · **requested changes** `.github/workflows/sync.yml` should not be part of this PR. It is a fork-sync job, and nothing restricts it to forks (no `if: github.repository != 'R0Y00/Xbox2Windows'`). Merged here, it would run on this repository every 6 h (`cron: '0 */6 * * *'`) with `permissions: contents: write` and end in `git push origin main --force-with-lease`. Here `origin` and `upstream` (`https://github.com/R0Y00/Xbox2Windows.git`) are the same repository, so the job does nothing useful but keeps a scheduled force-push step with write access on `main`. Please drop the file from the branch.
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-29 13:06 UTC · original

Independent review of head 6242dd34 against main af1cab5c. Verdict: 4 MUST. Holding, not merging. The sync.yml point is already covered by the open change request and is not repeated here.

MUST

  1. Windows CI is red, caused by the branch itself. The configure step fails with _add_test given test NAME "startup_gfx2hlsl_cmp_class" which already exists in this directory (CMakeLists.txt:3799). main already registers that test, and the branch adds it again (grep -c 'NAME startup_gfx2hlsl_cmp_class COMMAND': main 1, merged tree 2).

  2. The xmem change rests on a premise the code doesn't support. In take_fresh() (src/xmem_slab_slots.h), make() runs only when a new slab is opened, and the slot it then hands out is at offset fresh_used_ * slot_bytes_ = 0 of that slab. Offset 0 is the one make_slab already committed. A slot at a non-zero offset always comes from an existing slab. In that call make_slab doesn't run, so the local first_slot_committed stays false and main already calls commit_slot. The only effect of the change is a second commit_slot (a map plus commit) of offset 0 for each new slab. This is on the default xmem path.

  3. There is no test or failing case for the xmem change. If a slot really is left uncommitted, please add a fixture that faults on main and passes here, plus a negative control.

  4. The branch is 254 commits behind and reverts or duplicates work already on main. On the merged tree:

    • tests/startup_gfx2hlsl_cmp_class_f16_check.py goes from 19 to 11 check( calls. That reverts main's 3177daed and drops the e32 v_cmpx_class_f16 cases.
    • The RX 9060 XT README row loses 5 of its 12 report links and its Shader Model 6.5 skip text.
    • The README gets a second RTX 4070 Ti SUPER row (the same report as #3390).
    • docs/experiments.md gets a second copy of the binary32 class-comparison paragraph.
    • A report file gpu-report-hardware.md is added at the repo root.

    Fix: rebase onto current main and keep only the xmem change, and only together with item 3. The title is also just \. A short description of the change would help.

AI-assisted review.

**@⁠JohnConnorNPC** on GitHub · 2026-11-29 13:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3355#issuecomment-7256291839) Independent review of head `6242dd34` against `main` `af1cab5c`. Verdict: 4 MUST. Holding, not merging. The sync.yml point is already covered by the open change request and is not repeated here. **MUST** 1. Windows CI is red, caused by the branch itself. The configure step fails with `_add_test given test NAME "startup_gfx2hlsl_cmp_class" which already exists in this directory` (CMakeLists.txt:3799). `main` already registers that test, and the branch adds it again (`grep -c 'NAME startup_gfx2hlsl_cmp_class COMMAND'`: main 1, merged tree 2). 2. The xmem change rests on a premise the code doesn't support. In `take_fresh()` (src/xmem_slab_slots.h), `make()` runs only when a new slab is opened, and the slot it then hands out is at offset `fresh_used_ * slot_bytes_` = 0 of that slab. Offset 0 is the one `make_slab` already committed. A slot at a non-zero offset always comes from an existing slab. In that call `make_slab` doesn't run, so the local `first_slot_committed` stays `false` and `main` already calls `commit_slot`. The only effect of the change is a second `commit_slot` (a map plus commit) of offset 0 for each new slab. This is on the default xmem path. 3. There is no test or failing case for the xmem change. If a slot really is left uncommitted, please add a fixture that faults on `main` and passes here, plus a negative control. 4. The branch is 254 commits behind and reverts or duplicates work already on `main`. On the merged tree: - `tests/startup_gfx2hlsl_cmp_class_f16_check.py` goes from 19 to 11 `check(` calls. That reverts `main`'s 3177daed and drops the e32 `v_cmpx_class_f16` cases. - The RX 9060 XT README row loses 5 of its 12 report links and its Shader Model 6.5 skip text. - The README gets a second RTX 4070 Ti SUPER row (the same report as #3390). - docs/experiments.md gets a second copy of the binary32 class-comparison paragraph. - A report file `gpu-report-hardware.md` is added at the repo root. Fix: rebase onto current `main` and keep only the xmem change, and only together with item 3. The title is also just `\`. A short description of the change would help. AI-assisted review.
github-bot closed this pull request 2026-11-29 16:22:41 +00:00
Author
Owner

@⁠KelboLive on GitHub · 2026-11-29 16:20 UTC · original

Closing. This branch is superseded, and its one substantive change does not hold up.

  • CI was red because of this branch: it registers startup_gfx2hlsl_cmp_class a second time, so configure fails with given test NAME ... which already exists in this directory. main already registers that test.
  • The xmem change rests on a false premise. In take_fresh() (src/xmem_slab_slots.h), make() runs only when a new slab is opened, and the slot handed out then is at fresh_used_ * slot_bytes_ with fresh_used_ reset to 0 — offset 0 of that slab. make_slab has already committed offset 0. A slot at a non-zero offset always comes from an existing slab, where make_slab does not run and first_slot_committed stays false. So !first_slot_committed is exactly the guard that prevents a second commit, and removing it adds a redundant commit_slot of offset 0 on every new slab, on the default xmem path.
  • No fixture showed a slot left uncommitted, which is what the change would have needed.
  • The branch reverts merged work. It drops the e32 v_cmpx_class_f16 cases from startup_gfx2hlsl_cmp_class_f16_check.py, removes five report links and the Shader Model 6.5 note from the RX 9060 XT row, and adds a second RTX 4070 Ti SUPER row, a second copy of the binary32 class-comparison paragraph, and gpu-report-hardware.md. The title is also just a backslash.

The clean one-line version of the xmem change was #3366, closed for the same reason.

**@⁠KelboLive** on GitHub · 2026-11-29 16:20 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3355#issuecomment-7258810650) Closing. This branch is superseded, and its one substantive change does not hold up. - **CI was red because of this branch:** it registers `startup_gfx2hlsl_cmp_class` a second time, so configure fails with `given test NAME ... which already exists in this directory`. `main` already registers that test. - **The xmem change rests on a false premise.** In `take_fresh()` (`src/xmem_slab_slots.h`), `make()` runs only when a new slab is opened, and the slot handed out then is at `fresh_used_ * slot_bytes_` with `fresh_used_` reset to 0 — offset 0 of that slab. `make_slab` has already committed offset 0. A slot at a non-zero offset always comes from an existing slab, where `make_slab` does not run and `first_slot_committed` stays false. So `!first_slot_committed` is exactly the guard that prevents a second commit, and removing it adds a redundant `commit_slot` of offset 0 on every new slab, on the default xmem path. - **No fixture showed a slot left uncommitted**, which is what the change would have needed. - **The branch reverts merged work.** It drops the e32 `v_cmpx_class_f16` cases from `startup_gfx2hlsl_cmp_class_f16_check.py`, removes five report links and the Shader Model 6.5 note from the RX 9060 XT row, and adds a second RTX 4070 Ti SUPER row, a second copy of the binary32 class-comparison paragraph, and `gpu-report-hardware.md`. The title is also just a backslash. The clean one-line version of the xmem change was #3366, closed for the same reason.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.