Compare commits

...
73 changed files with 621 additions and 63 deletions

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
## Related issue
Closes #
Closes #<number>, or state the direct maintainer assignment if no issue applies.
For stacked work, name the base PR and any dependencies absent from its base.
## Summary
+7 -3
View File
@@ -1,6 +1,6 @@
# BetterXen engineering rules
These rules apply to every contributor and coding agent. They were rewritten on the `planning/hybrid-first-transition` branch when BetterXen moved from native-first to CrossOver-based hybrid development. `CLAUDE.md` is a symlink to this file. The decision is recorded in `docs/adr/0005-crossover-hybrid-direction.md`; the plan is `docs/roadmap.md`.
These rules apply to every contributor and coding agent. They reflect the accepted CrossOver-based hybrid direction; earlier native-first instructions are historical. `CLAUDE.md` is a symlink to this file. The decision is recorded in `docs/adr/0005-crossover-hybrid-direction.md`; the plan is `docs/roadmap.md`.
### Direction
@@ -63,11 +63,11 @@ These rules apply to every contributor and coding agent. They were rewritten on
No AI slop (section 29).
Read docs/roadmap.md, docs/interfaces.md and docs/progress.md before implementation.
Read docs/roadmap.md, docs/architecture.md, docs/interfaces.md and docs/progress.md before implementation. Read crates/README.md and docs/testing/README.md for component scope and validation. Native contracts, generated coverage tables and historical gate checklists do not authorize native expansion or establish hybrid acceptance.
## Claiming work before you start
Several people and coding agents work on this repository at the same time. Claim an issue before you edit anything, and never take work someone else has claimed.
Several people and coding agents work on this repository at the same time. For issue-based work, claim the issue before editing and never take work someone else has claimed. A direct maintainer task with no issue (including a documentation-only stacked PR) does not require creating an issue; record that assignment and scope in the PR and check overlapping open work.
1. **Check.** Read every comment on the issue and look for open pull requests that link it. A claim is any comment in which someone says they are taking the issue, in any words (for example "I'll take this" or `/claim`). If a claim exists and is not stale (step 4), pick another issue.
2. **Claim.** Reply on the issue in plain words, for example: "I'm taking this. Plan: …". No command, label or bot step is needed. The earliest claim wins. Claim one issue per comment.
@@ -100,6 +100,10 @@ A coding agent claims in the name of the person it works for and follows the sam
## Checkout commands
These maintain workspace regressions, including the paused native implementation.
They do not certify CrossOver execution. Hybrid checks and prerequisites are in
`docs/testing/README.md`; documentation-only changes use its documentation checks.
- Format: `cargo fmt --all -- --check`
- Lint: `cargo clippy --workspace --all-targets -- -D warnings`
- Test: `cargo test --workspace`
+4 -2
View File
@@ -11,8 +11,9 @@ remains unsupported.
### Added
- Fixed the two wave-operation failures the vendored victory-shader tests showed under D3DMetal (`docs/research/shader-wave-semantics.md`). Device capabilities were measured with a new original D3D12 host (`workloads/d3d12-wave-probe`): shader model 6.6, wave operations, waves exactly 32 lanes, no double-precision shader operations. One failure was a wrong test precondition (a 64-lane lowering run on the 32-lane device); the test now checks the device width and asserts the recompiler's refusal. The other was unsupported double-precision operations: shaders compiled from original HLSL by Microsoft's DXC that use a `double` ran without writing anything, while float wave operations worked. The recompiler's one native-double site (`active_f64_sum`) now builds the console's balanced sum tree with its existing integer fp64 add and no longer declares doubles. Local results on one Apple M4 under CrossOver 26.3, not independently reproduced: the whole suite passes (229 passed, 3 ignored; the vendored original had 2 failures); 24 new GPU cases compare full 64-bit sums with a CPU model of the tree; both regression tests fail against the original lowering. Cost not measured; tree-order fidelity relies on the recompiler's own recognizer.
- Added `scripts/hybrid/run-shader-gpu-tests.sh`, which cross-builds the vendored `victory-shader` test executable for Windows and runs it under CrossOver through `betterxen-hybrid run` (supervision, memory guard, stall detection, JSON record), either BetterXen's four fixture tests or the whole upstream suite. It takes the test executable's path from cargo's own build message instead of guessing the target layout (the first version looked in `debug/build/.../out/`; the usual location is `debug/deps/`, which is the fallback). It needs the runner from #384 and #388. Verified on the Apple M4 with CrossOver 26.3: fixtures pass; the whole suite shows the known failures; the `debug/deps` fallback is untested on this machine, whose cargo layout puts the executable elsewhere. Not independently reviewed.
- Integrated skakwy's `victory-shader` (GFX10/RDNA 2 machine code to DXIL SM 6.6 recompiler, about 43,500 lines of Rust) as `crates/victory-shader`, with provenance in its `UPSTREAM.md`, the Mesa notice preserved and 19 lines of lint-only edits to upstream files. Added `translate_native` and tests that translate BetterXen's own gfx1030 fixtures to DXIL and, on Windows targets, run them on the GPU through D3D12. Local results on one Apple M4 with CrossOver 26.3 (D3DMetal), not independently reproduced: 177 upstream CPU-side tests pass on macOS; all 6 fixtures with expected words matched the manifest on the GPU, with a negative control; the GPU tests fail without D3D12 instead of skipping; the full upstream suite under CrossOver has 224 passed, 2 failed, 3 ignored. DXIL validation by `dxil.dll` was not run. The native RDNA-to-Metal compiler is unchanged. See `docs/research/victory-shader-integration.md`.
- Added the upstream research registry and component reuse matrix (`docs/research/`), a public-documentation review (evidence class D, nothing executed) of CrossOver, Wine, DXMT, DXVK, VKD3D-Proton, MoltenVK, FEX, VIctory, VIctory-macOS and PortWatch. VIctory-family projects are excluded from reuse on provenance grounds. The GitHub project board is not yet configured because the token lacks the `project` scope (#346).
- Added the upstream research registry and component reuse matrix (`docs/research/`), a public-documentation review (evidence class D, nothing executed) of CrossOver, Wine, DXMT, DXVK, VKD3D-Proton, MoltenVK, FEX, VIctory, VIctory-macOS and PortWatch. At that initial review, VIctory-family projects were excluded from reuse on provenance grounds; the subsequent shader-only snapshot has a separate component record above. The GitHub project board is not yet configured because the token lacks the `project` scope (#346).
- Added hybrid research records: `docs/research/hybrid-backlog-research-2026-11-25.md` (findings and registry candidates, from search summaries) and `docs/research/primary-source-verification-2026-11-25.md` (re-check against CodeWeavers, Apple, DXMT and Wine primary pages). It confirms CrossOver's backend list, finds no public documentation of `CX_GRAPHICS_BACKEND`, and records that two Apple notices on Rosetta's end disagree; D3DMetal's license text and CrossOver's Rosetta and ARM64 plans remain unverified. Eleven issues created from the research were reviewed the same day: #364 and #365 stay in Phase 1, the others are parked and recorded under "Parked ideas" in the roadmap. Rust 1.100.0 (already installed) is the required toolchain; the default `stable` was 1.94.1. Planning only; nothing was installed or run.
- Added File > Open Executable… with Command-O to the app (#252). It opens the focused window's read-only file importer, the same one as that window's button, and is disabled when no window can present it; each window keeps its own importer, so with several windows only the focused one shows the picker. The chosen file goes through the same inspection path as the button, drag and drop and Finder Open With; nothing is executed. A file-importer failure is now shown in red with the system's description instead of being ignored, a cancelled picker shows nothing, and the message clears on the next selection. `BetterXen --smoke-import-result`, run by `scripts/build-app.sh`, checks cancellation, a shown failure and its clearing; it fails on the previous importer handling. Checked locally on Apple Silicon in the running app (Command-O and the menu item open the picker, cancel shows no error, a second Command-O opens it again, with two windows only the focused one presents it, and with every window closed the menu item is disabled); not yet independently reviewed.
- Added `docs/research/texture-formats.md`, an inventory of the texture formats and layouts BetterXen handles (#260). For BC1–BC7, RGBA8 and Depth32Float it separates container recognition, CPU decoding, layout conversion, native Metal upload and readback, translated sampling, the host-side D3D12-shaped API (called from Rust, not wired to guest imports) and guest reachability through imported services, and links each cell's implementing files and tests and each format's exact public specification sections, including the packed BC footprints from #241. It cross-references #208 and #209 instead of opening duplicate tasks, lists console layouts, console descriptors and asset or audio containers as unknowns, and ranks three proposed follow-ups with fixture recipes and owners. Research only; no implementation changed.
@@ -25,7 +26,8 @@ remains unsupported.
- Removed the "PR template" check (`.github/workflows/pr-template.yml`, `scripts/pr_template_check.py` and its tests) and its CI test step. Also removed `.github/PULL_REQUEST_TEMPLATE.md`. Pull request descriptions are no longer validated or pre-filled; CONTRIBUTING.md still asks for the same information and the claim-first rule still applies.
### Changed
- Replaced the native-first development plan with a CrossOver-based hybrid roadmap (`docs/roadmap.md`: five provisional phases, only Phase 1 active; the earlier H0 to H7 breakdown is archived) and an accepted-direction ADR 0005. No hybrid component exists yet and no Xbox title is shown to run; this is planning and research scheduling only, and no phase is verified complete.
- Aligned contributor and agent guidance, architecture boundaries, crate documentation and testing instructions with active CrossOver hybrid integration. Marked native plans, contracts and campaigns as preserved or historical, documented split-stack runner dependencies and retained the original evidence limits. Documentation only; no new runtime validation or phase acceptance.
- Replaced the native-first development plan with a CrossOver-based hybrid roadmap (`docs/roadmap.md`: five provisional phases, only Phase 1 active; the earlier H0 to H7 breakdown is archived) and an accepted-direction ADR 0005. At that transition checkpoint no hybrid component existed; later shader integration is recorded above. No Xbox title is shown to run, and no phase is verified complete.
- Rewrote the engineering rules in `AGENTS.md` (`CLAUDE.md` is a symlink to it) to permit CrossOver, Wine-based infrastructure, Rosetta 2 and D3DMetal subject to licensing, while keeping the honesty, independent-verification, provenance and clean-room rules and adding dependency and reuse rules. Resolves #345.
- Native work is preserved and paused: tag `native-first-final` marks the last `main` commit before this change, `docs/research/native-roadmap.md`, and archived native-first plan and milestones under `docs/archive/`. GitHub backlog: all native issues except four with assigned contributors and open pull requests were closed as not planned and indexed in `docs/research/native-issue-archive.md`; future-phase issues were parked in the roadmap; only the Phase 1 milestone is open.
- Replaced the issue templates with hybrid task, bug, research, performance, validation and documentation forms and added a pull request template. Fixed invalid YAML in the agent-task template. README, CONTRIBUTING and the docs index now describe the hybrid direction.
+16 -13
View File
@@ -8,15 +8,16 @@ The only active development track is the CrossOver-based hybrid architecture in
## Getting started
- Read `README.md` and, when present, `AGENTS.md`, `docs/interfaces.md`, `docs/status.toml` and the relevant architecture decisions.
- Discuss substantial changes in an issue before implementing them; small fixes do not require prior approval.
- Claim an issue before working on it by replying on it in plain words, after checking its comments for an existing claim. Never claim over someone else. A claim with no pull request after about one week may be taken over with a reply saying so. Coding agents follow the same rules; see "Claiming work before you start" in `AGENTS.md`.
- Read `README.md`, `AGENTS.md`, `CHANGELOG.md`, `docs/roadmap.md`, `docs/architecture.md`, `docs/interfaces.md`, `docs/progress.md` and the relevant architecture decisions. Generated native status tables describe fixtures, not active priorities.
- Discuss substantial changes in an issue before implementing them, unless directly assigned by a maintainer. Small fixes do not require prior approval; direct assignments without an issue do not require a new issue.
- For issue-based work, claim the issue before working on it by replying on it in plain words, after checking its comments for an existing claim. Never claim over someone else. A claim with no pull request after about one week may be taken over with a reply saying so. Coding agents follow the same rules; see "Claiming work before you start" in `AGENTS.md`.
- Use a native ARM64 macOS environment with Rust and the appropriate Xcode/Metal tools. LLVM AMDGPU tools are needed for ISA fixture generation; extra tooling depends on the subsystem.
- Keep changes focused and preserve existing public interfaces unless a change is justified and documented.
## Development and verification
When the Cargo workspace exists, run from its root:
Use the [testing guide](docs/testing/README.md) to select hybrid, documentation or
preserved-native checks. The workspace regression commands are:
```sh
cargo fmt --all -- --check
@@ -26,7 +27,7 @@ cargo test --workspace
Follow repository documentation for actual GPU tests, fuzzing, mutation testing and benchmarks. Report commands, versions, pass/fail/skip counts and hardware used. A successful shader compile is not successful GPU execution. Do not report unavailable tools or skipped tests as passes.
For an instruction or compiler change, cite the applicable ISA section, state the exact architecture, document operand and execution-mask semantics, and add tests for encodings, edge cases, unsupported cases and independent expected results. Where applicable, verify the resulting MSL through actual Metal execution. Do not convert unsupported instructions into silent no-ops.
For an explicitly authorized native instruction or compiler change, cite the applicable ISA section, state the exact architecture, document operand and execution-mask semantics, and add tests for encodings, edge cases, unsupported cases and independent expected results. Where applicable, verify the resulting MSL through actual Metal execution. Do not convert unsupported instructions into silent no-ops.
For a performance change, provide reproducible before-and-after results using equivalent inputs, hardware and settings. For a new dependency, explain why it is needed, verify its license and native ARM64 compatibility, and record its provenance.
@@ -36,19 +37,21 @@ Use publicly accessible specifications and authorized materials only. Do not sub
Distinguish desktop RDNA behavior from Xbox-specific behavior. Cite primary sources with exact applicable architectures and record uncertainties using the project's evidence classification when available. Tests on Apple GPUs do not establish verification on Xbox hardware.
BetterXen implements its own Rust guest runtime, decoder, typed IR, shader
compiler and native Metal backend from public technical specifications
and independently derived tests. Contributions must not copy, port or
adapt code, decoder tables, internal metadata or implementation
architecture from other emulators. External results can inform test
selection. Author the resulting code and fixtures independently.
The preserved native runtime, decoder, typed intermediate representation, shader
compiler and Metal backend use original implementations and independent tests.
Active hybrid work reuses established upstream infrastructure after per-file
license and provenance review. The vendored `victory-shader` snapshot has a
separate [provenance record](crates/victory-shader/UPSTREAM.md); its inclusion
does not authorize adopting other VIctory-family components or game material.
Do not copy from projects built around leaked or unauthorized inputs without the
recorded review required by `AGENTS.md`. Game-specific and decryption code stay excluded.
Before incorporating third-party code, verify per-file license compatibility with GPL-3.0-or-later, record the exact upstream revision and original paths, preserve copyright notices and document changes. Update applicable attribution records. Public visibility alone is not proof of authorization or license compatibility.
## Pull requests
- Branch from the current main branch, keep commits focused, and link relevant issues.
- Describe what changes and why, link the issue you claimed with `Closes #<number>`, state which checks you actually ran, and disclose material AI assistance. Separate unverified work from supported behavior.
- Branch from current `main`, or the explicitly requested top of a PR stack. For stacked work, name the base PR and dependencies. Keep commits focused and link relevant issues; a direct maintainer assignment without an issue needs no new issue.
- Describe what changes and why, link the issue you claimed with `Closes #<number>` when applicable, state which checks you actually ran, and disclose material AI assistance. Separate unverified work from supported behavior.
- Include a clear explanation, tests and any documentation/status updates. Separate unverified work from supported behavior.
- Disclose material AI assistance and personally review generated changes. AI output is not an authoritative source, test oracle or substitute for independent review.
- Never include secrets, personal paths, credentials or private data in patches or logs.
+40 -7
View File
@@ -11,10 +11,10 @@
![Status: experimental](https://img.shields.io/badge/status-experimental-d29922)
![License: GPL-3.0-or-later](https://img.shields.io/badge/license-GPL--3.0--or--later-2ea043)
**The paused native implementation described below uses no Wine, CrossOver, Rosetta or Vulkan runtime. The active hybrid direction intends to use CrossOver and Rosetta 2, subject to research and licensing review.**
**Active work integrates an externally installed CrossOver. The independent native runtime and Metal compiler are preserved and paused.**
> [!IMPORTANT]
> **Current direction.** BetterXen's only active development track is a CrossOver-based hybrid architecture: CrossOver (installed externally) as the compatibility foundation, with BetterXen providing whatever integration, configuration, diagnostics, benchmarking and optimization research shows is missing. This is the *intended* architecture, **not a verified Xbox compatibility stack**: no Xbox title has been shown to run through it, and CrossOver is not assumed to provide Xbox runtime compatibility. Work is at the research stage (Phase 1). Planning is progressive: only the current phase has open issues. The independent native implementation described below is **preserved but paused indefinitely**. See the [roadmap](docs/roadmap.md), [ADR 0005](docs/adr/0005-crossover-hybrid-direction.md), the [upstream research registry](docs/research/upstream-registry.md) and the [deferred native roadmap](docs/research/native-roadmap.md). The rewritten engineering rules are in [AGENTS.md](AGENTS.md).
> **Current direction.** BetterXen's only active development track is a CrossOver-based hybrid architecture: CrossOver (installed externally) as the compatibility foundation, with BetterXen providing whatever integration, configuration, diagnostics, benchmarking and optimization research shows is missing. This is the *intended* architecture, **not a verified Xbox compatibility stack**: no Xbox title has been shown to run through it, and CrossOver is not assumed to provide Xbox runtime compatibility. Phase 1 remains active; integration work and local fixture results do not establish phase completion. Planning is progressive: only the current phase has open issues. The independent native implementation described below is **preserved but paused indefinitely**. See the [roadmap](docs/roadmap.md), [ADR 0005](docs/adr/0005-crossover-hybrid-direction.md), the [upstream research registry](docs/research/upstream-registry.md) and the [deferred native roadmap](docs/research/native-roadmap.md). The rewritten engineering rules are in [AGENTS.md](AGENTS.md).
</div>
@@ -28,6 +28,35 @@ BetterXen is a community-maintained, open-source project written primarily in Ru
---
## Active hybrid architecture
BetterXen develops integration, environment configuration, diagnostics, reproducible
workloads, run records and measured optimization around CrossOver. Wine-based
runtime services and the installed CPU/graphics translation components belong to
the external compatibility stack; BetterXen does not replace them by default.
Backend capabilities and integration interfaces must be verified per version.
| Component | Scope at this stack revision |
| --- | --- |
| CrossOver, Rosetta 2, D3DMetal and other selected backends | External dependencies, subject to their own licenses and host support. No proprietary binaries are bundled. |
| `victory-shader` | Vendored GFX10-to-DXIL recompiler and bridge for original compute fixtures. Local GPU observations and failures are recorded in the [integration report](docs/research/victory-shader-integration.md); no console shader corpus was validated. |
| `scripts/hybrid/run-shader-gpu-tests.sh` | Cross-builds a Windows test executable and invokes `betterxen-hybrid run`. It requires the runner from [PR #384](https://github.com/MacosPorters/betterxen/pull/384) and [PR #388](https://github.com/MacosPorters/betterxen/pull/388), absent from this split stack's base. |
| Native `xenora-*` crates and Swift app | Preserved synthetic research and regression tests, paused as an independent development track. Not the CrossOver runtime. |
See the [architecture and integration boundaries](docs/architecture.md),
[crate guide](crates/README.md), [testing guide](docs/testing/README.md) and
[roadmap](docs/roadmap.md). The six original compute fixtures have recorded
single-host results, with independent reproduction outstanding. No Xbox title
execution, general console runtime compatibility or performance improvement is claimed.
## Preserved native implementation
The detailed diagrams, capability counts, results and build instructions below
refer to the **paused native research path**, unless explicitly labelled hybrid.
They remain useful for regression testing, not as instructions to expand native
CPU, runtime or Metal coverage. Native work needs a demonstrated hybrid dependency
or an explicit maintainer decision. Earlier phase and X-number milestones are historical.
## How it fits together
One guest program travels through three native subsystems. Every stage is checked against an independently derived expectation.
@@ -240,7 +269,7 @@ The texture upload and readback paths use authored Metal kernels. They should no
Xbox-specific texture layouts and additional compression formats require further research and validation.
## Architecture
## Preserved native architecture
BetterXen is organized around three connected subsystems: guest execution, shader translation and native GPU execution.
@@ -302,7 +331,7 @@ BetterXen's host execution environment is native ARM64. The guest architecture b
The native graphics pipeline runs translated vertex and pixel stages, the indexed-draw and blend passes and the depth pass into offscreen Metal targets, with GPU readback compared against independent CPU references.
The native ARM64 dynamic recompiler covers a bounded subset of x86-64 instructions; the rest run through the shared interpreter semantics (see the [CPU coverage map](docs/testing/cpu-coverage.md) once it lands). The project does not provide a complete Xbox operating-system implementation.
The native ARM64 dynamic recompiler covers a bounded subset of x86-64 instructions; the rest run through the shared interpreter semantics (see the [CPU coverage map](docs/testing/cpu-coverage.md)). The project does not provide a complete Xbox operating-system implementation.
See [Interface Contracts](docs/interfaces.md) for the documented execution and resource boundaries.
@@ -310,6 +339,10 @@ See [Interface Contracts](docs/interfaces.md) for the documented execution and r
## Current limitations
Hybrid limitations include version-specific external interfaces, incomplete independent
reproduction and the absence of demonstrated Xbox execution. The table below
describes the preserved native implementation; it is not an active backlog.
BetterXen is an engineering research project, not a working commercial-game emulator.
The following remain unsupported or incomplete:
@@ -419,12 +452,12 @@ Compiling a shader is not equivalent to proving its GPU output is correct.
### Contributing
Contributions are welcome, and several people and coding agents work in this repository at once. To avoid duplicated work:
Contributions are welcome, and several people and coding agents work in this repository at once. For issue-based work, follow these steps. Direct maintainer assignments without an issue need no new issue; record their scope and stack base in the PR.
1. Read every comment on an issue and check for open pull requests that link it.
2. Claim the issue with a plain reply (for example "I'm taking this. Plan: ...") before you edit anything. The earliest live claim wins, and a claim is stale only after about seven days without a pull request.
3. Stay inside the files the issue lists, and put `Closes #<n>` in the pull request description.
4. Sign off every commit (DCO) and use only public documentation and original code. Anyone who has seen leaked or confidential Xbox material must not contribute.
4. Sign off every commit (DCO); use public documentation, original code and reviewed, compatibly licensed upstream code. Anyone who has seen leaked or confidential Xbox material must not contribute.
5. Update `CHANGELOG.md` for meaningful changes. Changes to `main` need maintainer review through [CODEOWNERS](.github/CODEOWNERS).
See [CONTRIBUTING.md](CONTRIBUTING.md), [docs/legal.md](docs/legal.md) and the [documentation index](docs/README.md) for the full rules.
@@ -435,7 +468,7 @@ See the [roadmap](docs/roadmap.md) for the current phase and the [changelog](CHA
---
**The goal is to build a trustworthy native Apple Silicon compatibility framework, one verifiable subsystem at a time.**
**Active work builds reproducible CrossOver integration on Apple Silicon, with evidence before compatibility or performance claims.**
---
+30
View File
@@ -0,0 +1,30 @@
# Crate guide
The active direction is [CrossOver-based hybrid integration](../docs/architecture.md).
A crate's presence in the workspace or its API documentation does not make it an
active development priority. Legacy `xenora-*` package names and guest ABI symbols
remain for compatibility; they do not name a second active architecture.
| Directory | Role | Development scope |
| --- | --- | --- |
| `victory-shader` | Vendored GFX10-to-DXIL compiler with an original compute-fixture bridge | Active hybrid integration; see [its guide](victory-shader/README.md) and [provenance](victory-shader/UPSTREAM.md). |
| `cli` | `betterxen` CLI for the bounded native experiments and inspection | Preserved native tooling; distinct from the separate `betterxen-hybrid` runner. |
| `loader` | PE32+ parsing, checked guest memory, x86-64 interpreter, ARM64 translator and synthetic services | Preserved, paused; not Wine or the CrossOver loader. |
| `import-gen` | Deterministic import classification and binding generation | Preserved native tooling; not proof of Xbox service compatibility. |
| `isa` | Typed gfx1030 instruction forms and generated ISA data | Preserved native shader path. |
| `decoder` | Bounded gfx1030 decoder | Preserved native shader path; separate from the vendored compiler's decoder. |
| `shader` | Synthetic gfx1030 compute/graphics to Metal Shading Language | Preserved, paused; not the DXIL bridge. |
| `ref` | Independent CPU expectations for native synthetic shader and rendering tests | Preserve independence from production implementations. |
| `metal` | Bounded trusted MSL execution, rendering and readback | Preserved native backend; not D3DMetal. |
| `texture` | Original synthetic texture layout and block-format helpers | Preserved native fixture support; not a verified Xbox layout. |
| `ffi` | Versioned C interface used by the Swift app | Preserved native application boundary; not CrossOver integration. |
`tests/validation` and `benchmarks` are additional workspace members for
independent native validation and correctness-gated measurements. The Swift app
is under `app/`. Keep their regressions passing; extending them requires an
explicit hybrid need or a maintainer decision.
`betterxen-hybrid` is not in this split stack's base. Its separate integration
PRs and the GPU script prerequisites are documented in the
[testing guide](../docs/testing/README.md). Use `cargo +1.100.0 doc --locked --workspace --no-deps` for crate API documentation; compiling documentation does not validate
GPU behavior or upstream provenance.
+22
View File
@@ -0,0 +1,22 @@
# victory-shader in BetterXen
This is the active hybrid shader integration, distinct from the paused native
`xenora-shader` MSL compiler. The pinned upstream snapshot translates GFX10
machine code to PC DXIL. BetterXen's `emit::translate_native` entry point and
fixture tests exercise original compute shaders with explicit root layouts.
Read [UPSTREAM.md](UPSTREAM.md) for attribution, exact source, modifications and
scope, and the [integration report](../../docs/research/victory-shader-integration.md)
for initial failures and the local results after the included wave fixes. Upstream container-parsing APIs are
present, but no authorized console shader container was validated. Their API
documentation describes formats, not BetterXen compatibility guarantees.
```sh
CARGO_BUILD_JOBS=2 cargo +1.100.0 test --locked -p victory-shader
```
On macOS this runs CPU-side tests; Windows-only GPU modules are not compiled.
The [hybrid testing guide](../../docs/testing/README.md) explains cross-building,
external CrossOver requirements and the separate runner dependencies needed for
GPU readback. Preserve skipped-test distinctions and do not generalize original
fixture results to arbitrary console shaders or games.
+20 -9
View File
@@ -3,10 +3,11 @@
## Getting started
Start with the [project README](../README.md) for scope and build commands,
then read the [interface contracts](interfaces.md). Reproduce an
[original guest test program](../experiments/x1/README.md) or run the
[independent validation suite](../tests/validation/README.md) before changing
either path. The [changelog](../CHANGELOG.md) records notable changes.
then read the [hybrid architecture](architecture.md), [crate guide](../crates/README.md)
and [testing guide](testing/README.md). The [interface contracts](interfaces.md),
[original guest experiments](../experiments/x1/README.md) and
[independent native validation](../tests/validation/README.md) describe preserved
research, not the active runtime. The [changelog](../CHANGELOG.md) records notable changes.
Use the [roadmap](roadmap.md) for the active CrossOver-based hybrid plan, phases,
critical path and completion criteria; see [ADR 0005](adr/0005-crossover-hybrid-direction.md)
@@ -19,18 +20,27 @@ paused: [deferred native roadmap](research/native-roadmap.md) and the archived
[component reuse matrix](research/component-reuse-matrix.md). Historical phase
checkpoints retain their original evidence scope.
## Architecture and technical design
## Active hybrid architecture
- [Architecture and integration boundaries](architecture.md) — Responsibilities, split-stack dependencies, implemented fixture bridge and unverified capabilities.
- [Crate guide](../crates/README.md) — Active vendored compiler versus preserved native components.
- [Shader integration report](research/victory-shader-integration.md) — Recorded local CrossOver results, known failures and reproduction limits.
## Preserved native architecture and technical design
The native sections below document regression contracts and historical evidence.
Their extension recipes and next tasks are not an active roadmap.
- [Interface contracts](interfaces.md) — Translated shader stages, guest services, native command submission, and synthetic textures.
- [Fixture memory model](adr/0003-demo-memory-model.md) and [CPU boundary](adr/0004-cpu-boundary.md) — Buffer bindings, guest address translation, and dependency direction.
## Native Metal graphics
## Preserved native Metal graphics
- [Translated offscreen stages](interfaces.md#translated-offscreen-stages) — Translated vertex and pixel stages for the bounded gfx1030 subset.
- [Blend and depth passes](interfaces.md) — Native blend and depth graphics passes with per-draw state.
- [Apple GPU evidence](research/apple-gpu.md) and [host lab record](research/host-lab.md) — Observed behavior and historical floating-point results.
## RDNA 2 decoding and shader translation
## Preserved native RDNA 2 decoding and shader translation
- [Instruction coverage](shaders/instruction-coverage.md) — Desktop gfx1030 instruction forms, operand limits, and CPU and GPU results.
- [Semantic coverage](shaders/semantic-coverage.md) — Generated per-family counts of identified, declared, decoded, lowered and verified gfx1030 forms.
@@ -41,7 +51,7 @@ checkpoints retain their original evidence scope.
- [VOPC integer compares](shaders/vector-compare.md) — Wave32 compare forms, the VCC/EXEC contract, runtime `s_cbranch_vccz` and the Metal mapping.
- [Metal Shading Language generation](shaders/msl.md) and [independent CPU reference](shaders/reference-interpreter.md) — Translation rules and separate CPU execution models.
## Guest CPU and runtime experiments
## Preserved native guest CPU and runtime experiments
- [Guest experiment guide](../experiments/x1/README.md) — Bounded x86-64 execution, executable loading, experimental services, native compute, and offscreen rendering.
- [x86-64 instruction registry](cpu/instruction-registry.md) — Shared decoder, generated tables, semantics, native lowering and how to add a verified instruction form.
@@ -82,9 +92,10 @@ checkpoints retain their original evidence scope.
- [Legal scope](legal.md), [dependency licensing](licenses.md), and [third-party notices](../THIRD_PARTY_NOTICES.md) — Input policy, attribution, and redistribution findings.
- [Contribution guidelines](../CONTRIBUTING.md) — Original authorship, Developer Certificate of Origin sign-off, and evidence requirements.
- [Agent task queue](coordination/agent-tasks.md) — Areas, claiming, leases, upstream sync, verification and the security model for parallel contributors and coding agents.
- [CPU/runtime expansion campaign ledger](coordination/cpu-campaign-ledger.md) — Progress ledger for the BetterXen native CPU and runtime compatibility campaign: starting/current commits, completed batches, new forms, verification evidence and the next implementation target.
- [CPU/runtime expansion campaign ledger](coordination/cpu-campaign-ledger.md) — Historical native campaign checkpoints, batches and evidence; its next target is paused.
- [Infrastructure QA ownership](coordination/infrastructure-qa-ownership.md) — Non-overlapping paths for infrastructure and QA tooling.
- [Agent queue smoke evidence](coordination/agent-queue-smoke.md) — Live Actions results from the disposable smoke repository.
- [Infrastructure QA tooling](testing/infrastructure/README.md) — Advisory orchestration, PR validation, benchmark analysis and release checks.
- [Documentation alignment audit](testing/documentation-alignment.md) — Audit coverage, retained history and documentation checks for the hybrid transition.
- [Migration to BetterXen](migration.md): source attribution, imported history and compatibility names.
+2
View File
@@ -1,5 +1,7 @@
# 0003. Use disjoint lane-indexed buffers for the first fixture
Status: **Retained for the paused native implementation.** [ADR 0005](0005-crossover-hybrid-direction.md) supersedes native-first project direction. This contract still governs its existing synthetic fixtures and dependency boundaries; it does not define CrossOver integration or authorize new native work.
For the synthetic compute fixture, the resource beginning at SGPR 0 denotes the read-only input words and the one beginning at SGPR 4 denotes the output words. VGPR 0 starts at the lane index and must remain unchanged when used as a resource index. Each allocation has the same word count, and each dispatched invocation accesses only its own lane's word. The fixture ABI provides no raw resource descriptor bits or guest virtual addresses.
The compiler must reject descriptor forms, offsets, index changes and control flow outside this contract. Both engines must honor the load dependency and completion order. The host reads output after command completion. Supporting shared writable buffers will require a new ordering and aliasing contract.
+2
View File
@@ -1,5 +1,7 @@
# 0004. Keep CPU recompilation outside the graphics dependency graph
Status: **Retained for the paused native implementation.** [ADR 0005](0005-crossover-hybrid-direction.md) supersedes native-first project direction. This contract still governs its existing synthetic fixtures and dependency boundaries; it does not define CrossOver integration or authorize new native work.
Phase 01 accepts synthetic shader code and explicit buffer bindings. A later guest CPU runtime will submit graphics commands using opaque resource handles, addresses, lengths and access modes. The graphics side will resolve addresses through checked mappings, retain resources through command completion and return fence completions or interrupt events via the command interface. CPU code may consume that interface. Graphics crates may depend on shared boundary types and graphics crates only, with no dependency on guest CPU or host x86-specific code.
Keep guest address arithmetic separate from host virtual addresses. Validate ranges before constructing a Metal view and retain the backing allocation for all queued users. Define aliasing and synchronization before supporting shared writable mappings. The first fixture uses independent input and output buffers and has no guest virtual address space.
+10 -2
View File
@@ -19,14 +19,22 @@ BetterXen provides integration, configuration, environment management, diagnosti
## Unverified integration assumptions
- That CrossOver, Rosetta 2, D3DMetal or DXMT run any authorized workload BetterXen needs. Assumed not until measured (#355).
- General workload coverage and a reproducible baseline (#355). Later local compute-fixture observations are bounded evidence, not general compatibility.
- That CrossOver offers supported interfaces for bottle management, configuration, launching and diagnostics (#350).
- Rosetta 2's support lifetime and D3DMetal's license terms (#349, #354).
- That any of this provides Xbox runtime compatibility. It is assumed not to.
## Verified implementation capabilities
None for the hybrid architecture. Verified native-research capabilities (synthetic evidence only) are unchanged and listed in `docs/progress.md`.
At the decision date, no hybrid capability had been verified. Subsequent split
integration work adds a vendored GFX10-to-DXIL compiler and an original compute
fixture bridge; single-host CrossOver results and known failures are recorded in
the [integration report](../research/victory-shader-integration.md). The test
script also requires the separate hybrid runner PRs. See the
[current architecture](../architecture.md) for checkout boundaries. These
observations do not accept the full proposed architecture, complete Phase 1 or
establish Xbox compatibility. Preserved native evidence remains in
[progress](../progress.md).
## Planning consequence
+88
View File
@@ -0,0 +1,88 @@
# CrossOver hybrid architecture and integration boundaries
[ADR 0005](adr/0005-crossover-hybrid-direction.md) establishes CrossOver as the
primary compatibility foundation and hybrid as the only active development
track. The [roadmap](roadmap.md) defines phase acceptance. This guide describes
component boundaries without treating the proposed complete stack as verified.
## Responsibilities
BetterXen owns integration, configuration, environment inspection, diagnostics,
reproducible workloads, run records, benchmarking and measured optimization.
CrossOver is installed externally. Its Wine-based runtime and selected CPU and
graphics translation components are upstream responsibilities. Record installed
versions and supported interfaces; an observed environment variable or bottle
setting is not automatically a supported vendor API.
BetterXen's own host tools must run natively as ARM64. Windows x86-64 test
executables are guest workloads, not BetterXen host binaries. Rosetta 2 may be
used by the selected external stack where supported. Metal is the host graphics
API; a backend using Vulkan through MoltenVK must be assessed as that backend's
path rather than an independent BetterXen graphics architecture.
CrossOver, D3DMetal, Rosetta 2 and Apple tools are not bundled. Their exact terms,
versions and support status must be checked. See the [upstream registry](research/upstream-registry.md),
[reuse matrix](research/component-reuse-matrix.md) and [license review](licenses.md).
## What is present in the split integration stack
This documentation branch is stacked on [PR #395](https://github.com/MacosPorters/betterxen/pull/395),
which is based on the shader-crate [PR #394](https://github.com/MacosPorters/betterxen/pull/394).
That base contains:
- `victory-shader`: a pinned upstream GFX10-to-DXIL compiler, with a BetterXen
entry point for original compute machine code and root-layout inputs.
- Original compute-fixture tests that compare output with the fixture manifest.
- `scripts/hybrid/run-shader-gpu-tests.sh`: a Windows cross-build and test-launch
script. It delegates execution and run records to `betterxen-hybrid`.
The `betterxen-hybrid` crate is supplied separately by
[PR #384](https://github.com/MacosPorters/betterxen/pull/384), with stall supervision
in [PR #388](https://github.com/MacosPorters/betterxen/pull/388). Neither is in
#395's base. The script cannot run from this stack alone: its first build of
`betterxen-hybrid` fails if that package is absent. Use a checkout containing
those dependencies before following the [hybrid test procedure](testing/README.md).
No merge, rebase or combined implementation is performed by this documentation PR.
With those dependencies available, the tested fixture path is:
```text
Original gfx1030 compute fixtures + explicit root layout
-> victory-shader -> PC DXIL -> Windows D3D12 test executable
-> external CrossOver / selected D3D12 backend -> GPU readback
-> comparison with independently derived manifest words
```
The [integration report](research/victory-shader-integration.md) records local
Apple M4/CrossOver observations, six compute fixtures with matching output and
the [wave-operation investigation and fixes](research/shader-wave-semantics.md)
now included in this stack. The original two suite failures and the later
229-passed/3-ignored run remain separate records. Independent reproduction is outstanding. Windows
GPU tests are not compiled by the macOS test run, and upstream tests can report
success after skipping GPU work. These results do not demonstrate console
shader-container compatibility, Xbox startup, game execution or a performance gain.
The wave investigation began in [PR #392](https://github.com/MacosPorters/betterxen/pull/392)
and is now included through #394/#395. Its 64-lane-only test checks rejection on
the recorded 32-lane device; that passing test is not a GPU sum verification.
The corrected fp64 sum has recorded local GPU comparisons, with console tree
recognition and performance limits still documented in the investigation.
## Preserved native research
The independent decoder, x86-64 interpreter and ARM64 translator, synthetic
runtime services, gfx1030-to-MSL compiler, Metal backend and Swift app remain in
the workspace. Their contracts and tests remain valid for their documented
synthetic scope. They are not the CrossOver runtime and their coverage counts
are not hybrid compatibility metrics.
[ADRs 0003](adr/0003-demo-memory-model.md) and
[0004](adr/0004-cpu-boundary.md) retain native fixture and dependency contracts.
[Interfaces](interfaces.md), [native progress](progress.md) and historical
acceptance records retain their original evidence scope. Earlier native phases,
G-number gates, X-number experiments and CPU campaigns do not define active
hybrid milestones. See the [deferred native roadmap](research/native-roadmap.md).
Keep native regression tests passing. Expand native components only for a
specific demonstrated hybrid need or an explicit maintainer decision to resume.
Do not open a parallel native roadmap or adopt other upstream components merely
because a shader snapshot was included.
+7 -5
View File
@@ -1,7 +1,9 @@
# Agent task queue
Only current hybrid work is active; legacy queue areas do not authorize native expansion. Follow [AGENTS.md](../../AGENTS.md) for claim precedence, direct maintainer assignments and current scope. The optional bot lease is not permission to override a plain-reply claim or a claim with an open PR.
Work items are GitHub issues. Contributors and coding agents claim them with a comment, work in
their own branch, and open a pull request that is checked against the claim. The claim rules for
their own branch, and open a pull request linked to the issue. Claims must be read manually; the former Agent PR checks workflow has been removed. The claim rules for
everyone are in `AGENTS.md` ("Claiming work before you start"): a plain reply is a valid claim, and
a claim goes stale after about one week without a pull request. The commands below are an optional
layer for contributors listed in `.github/agent-queue.json`; the bot only sees `/claim` comments, so
@@ -9,10 +11,10 @@ read the issue's comments before using it and never `/claim` over a plain-reply
deterministic: the rules live in `scripts/agent_queue/` (standard-library Python, no network, no
model or external service), and GitHub Actions and the shell helpers only call it.
Status: implemented and unit-tested locally. **Not yet run on GitHub**: the workflows are untested
against the real API until the first live run. Until a live smoke test has passed and existing issues
have been migrated into the queue, the pull request check is **advisory**: it reports problems but
never blocks a merge, and it must not be made a required check.
The original queue implementation was unit-tested locally; the subsequent
[smoke record](agent-queue-smoke.md) preserves the disposable-repository results.
Those records do not establish current production configuration. The former
Agent PR checks workflow is removed; manual claiming and review rules still apply.
## Areas
+2
View File
@@ -1,5 +1,7 @@
# Xenora CPU/Runtime Expansion Campaign — Progress Ledger
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
Evidence below is local to the named host unless stated. Nothing here is independently reviewed yet.
## Continuation checkpoint
@@ -1,5 +1,7 @@
# Infrastructure QA campaign ledger
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
Running record for the infrastructure and engineering-quality campaign.
Update after each meaningful commit batch. Do not invent passing tests.
@@ -1,5 +1,7 @@
# Infrastructure and QA ownership manifest
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
Non-overlapping file ownership for the infrastructure and engineering-quality
campaign. Active CPU/runtime, RDNA2 and native-application Gates 4–9 work stays
outside this manifest.
+2
View File
@@ -1,5 +1,7 @@
# Proposed AVX and AVX2 guest contract
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
[Issue #299](https://github.com/MacosPorters/betterxen/issues/299) defines a
reviewable first step for Advanced Vector Extensions (AVX) in the x86-64 guest.
The current [instruction registry](instruction-registry.md) rejects VEX prefixes.
+2
View File
@@ -1,5 +1,7 @@
# x86-64 instruction registry
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
The static PE probe, the interpreter and the native ARM64 dynamic binary translator (DBT) decode guest code through one function, `x86_decode::decode`. Its tables are generated from `crates/loader/x86/instructions.toml`.
| Part | File | Role |
+4
View File
@@ -1,5 +1,9 @@
# Interfaces
## Scope and active integration boundary
Active CrossOver integration is described in [architecture.md](architecture.md). The contracts below govern the preserved native fixture runtime and Metal path. They are not Wine APIs, a CrossOver plugin interface or an Xbox runtime ABI. Native expansion is paused; retain these contracts for regression testing and any explicitly justified hybrid reuse.
## gfx1030 compute fixtures
The first input is little-endian gfx1030 machine code for a compute fixture with optional statically resolved forward scalar branches. The synthetic ABI starts with full Wave32 EXEC and reserves vector general-purpose register (VGPR) 0 for the grid index used by buffer accesses. Resource operands select documented synthetic bindings. The parser must require explicit target identification and validate all lengths before allocating. Console containers and AMDHSA initialization require separate contracts.
+5
View File
@@ -4,6 +4,11 @@ BetterXen does not circumvent console security or DRM, does not load encrypted o
## User-provided game files
This is the input policy, not a claim of implemented game loading or execution.
The preserved native inspection path and active hybrid workloads have different
limits; see the [architecture guide](architecture.md). No Xbox title execution
is demonstrated.
Users obtain and supply their own files. BetterXen evaluates file structure,
supported features, compatibility and safe execution. Game import does
not check ownership, request receipts or account verification, investigate
+8
View File
@@ -19,6 +19,14 @@ The workspace is GPL-3.0-or-later. The following is the lead's preliminary compa
## Runtime redistribution review
**Historical native artifact review.** The six-package graph and G11 findings below
apply to the named native candidate, not the current whole-workspace graph or
external CrossOver stack. The vendored shader compiler adds the dependencies
listed above; its independent license/provenance audit is not established by
this older review. CrossOver, Rosetta 2 and D3DMetal remain externally supplied
and unbundled; use the [reuse records](research/component-reuse-matrix.md) for
selected component scope. No redistribution permission is inferred here.
Reviewed 2026-11-22 against the locked Apple Silicon graph. Run `cargo tree --locked --target aarch64-apple-darwin --edges normal,build` and `cargo metadata --locked --format-version 1` to reproduce the graph and declared licenses. The external runtime graph comprises the six Cargo packages listed above. The reviewed registry packages identify their source revisions in `.cargo_vcs_info.json`. The five objc2 registry packages declare the listed licenses but contain no standalone license text. Each of the three pinned upstream `LICENSE.md` files matches the preserved copy byte for byte.
The declared MIT terms are compatible with GPL-3.0-or-later for code the upstream authors have rights to license. MIT remains the selected option for objc2-core-foundation, objc2-metal and bitflags. Distribution of copies or substantial portions subject to MIT requires retaining the applicable copyright and permission notice. Preserve the project GPL text, AMD's MIT notice, the bitflags MIT notice, and the objc2 notices. For a linked Xenora binary, also satisfy the GPLv3 section 6 Corresponding Source requirements for the shipped build, including applicable linked dependency source and build scripts, subject to the license's System Libraries exception. See the [project GPL text](../LICENSE).
+12 -3
View File
@@ -1,5 +1,7 @@
# Engineering progress
**Scope:** generated counts and historical host results below describe preserved native research. For active hybrid components, dependencies and bounded local results, see the [architecture guide](architecture.md) and [shader integration report](research/victory-shader-integration.md). No hybrid phase is certified complete by these tables.
BetterXen is an experimental research project. Verified work is restricted to
independently authored synthetic programs and shaders; commercial game
execution and authentic Xbox startup are unsupported. Progress is measured by
@@ -20,7 +22,7 @@ reproducible tests, not by estimated game compatibility percentages.
| xbox-execution | Xbox Series X\|S | unsupported | untested | unverified | U | Game execution, proprietary guest containers and full guest execution-mask divergence are unsupported. The console launch ABI is unknown. |
<!-- status:features:end -->
## Reproduce
## Reproduce preserved native checks
Run on native Apple Silicon with Rust 1.100.0, Xcode 27.2, Python 3.11 or later and LLVM 23.1.6. The verified host was Apple M5 with macOS 27.3. Metal's safe and precise compile options must be available. Use up to four Cargo jobs total across at most two builds, one GPU workload and one fuzz or mutation campaign at a time. The final checkpoint used two Cargo jobs.
@@ -41,6 +43,13 @@ scripts/audit/dependencies.sh
The independent CPU validation tests are part of the workspace. The native suite and optional LLVM oracle run separately so CPU-only CI can report them accurately. Final local logs are under ignored `artifacts/`. Keep the historical lab and candidate logs separate.
## Remaining work
## Active priorities and retained findings
See the [current limitations](../README.md#current-limitations) for the outstanding items. The active research steps are: finish the remaining RDNA2 wave execution and mesh stages, translated texture sampling, broader resource binding and synchronization. Close independent claims, status, history and review findings against the current candidates, and verify the [runtime redistribution blockers](licenses.md#runtime-redistribution-review) before closing the redistribution gate (G11).
Follow the [hybrid roadmap](roadmap.md): establish supported integration
interfaces, exact dependency versions, reproducible authorized workloads,
independent baseline reproduction and the responsibility boundary with CrossOver.
Native wave execution, mesh stages, texture sampling and resource expansion are
paused research findings, not the active work queue. Historical G-number gates
remain attached to their original candidates; they neither certify hybrid
acceptance nor authorize redistribution. Keep existing regression tests passing.
+11 -1
View File
@@ -1,5 +1,15 @@
# Component reuse matrix
## Split integration update
The original discovery assessment below is retained as a dated research snapshot. The split shader integration subsequently included only `crates/victory-shader` from `skakwy/victory-mac` at `22b3f8e45a59f7d11fef7718988c58d0b3f1d0f9`, plus BetterXen fixture additions. Its [provenance record](../../crates/victory-shader/UPSTREAM.md), [license record](../licenses.md) and [local integration results](victory-shader-integration.md) are the component-specific records, not an approval of the wider VIctory family. This documentation audit does not independently certify that review. Other upstream runtime, loader, game-specific and decryption components remain excluded.
| Component | Selected scope | Recorded license and limits |
| --- | --- | --- |
| `victory-shader` | Vendored GFX10-to-DXIL snapshot and original compute-fixture bridge | Upstream GPL record and retained MIT opcode-table notice; exact files, modifications and attribution in `UPSTREAM.md`. Independent provenance/acceptance review is not claimed here. |
## Original discovery assessment (2026-11-25)
Companion to the [upstream registry](upstream-registry.md); same evidence limits (class D, nothing run, not legal advice). "External" means installed or supplied by the user and invoked, never bundled or copied. GPL-3.0-or-later is BetterXen's license.
| Need | Candidate | Decision | Reason and condition |
@@ -13,7 +23,7 @@ Companion to the [upstream registry](upstream-registry.md); same evidence limits
| Direct3D to Vulkan | DXVK | **Evaluate** only together with MoltenVK | zlib/libpng is permissive and GPL-compatible. Value on macOS unknown. |
| Direct3D 12 to Vulkan | VKD3D-Proton | **Evaluate**; blocked on a Vulkan 1.3 provider | Depends on MoltenVK feature coverage, unknown. |
| Vulkan on Metal | MoltenVK | **Evaluate** | Apache-2.0 (compatible with GPLv3). Subset of Vulkan; coverage vs consumers unknown. |
| Shader compiler / runtime | VIctory, VIctory-macOS | **Rejected for reuse** | Built for a specific commercial game's Xbox Series build whose provenance is not established as authorized. Ideas only. |
| Shader compiler / runtime | VIctory, VIctory-macOS | **Initial rejection; later shader-only record above** | Built for a specific commercial game's Xbox Series build whose provenance is not established as authorized. Ideas only. |
| Project discovery | PortWatch VI | Reference only | Editorial tracker; not engineering evidence; nothing imported. |
| x86-64 decode and ARM64 translation, runtime, gfx1030 compiler, Metal backend | BetterXen native implementation | **Preserved, paused** | Reuse only where hybrid needs it and it shows a demonstrated advantage; not forced into the architecture. |
| Test and diagnostics methodology | BetterXen existing audits, benchmark harness, claims registry | **Reuse** | Existing evidence classes, claims audit and benchmark gating apply to hybrid work (Phase 1 onward). |
+3 -1
View File
@@ -1,8 +1,10 @@
# CPU boundary research
**Historical native feasibility notes.** These unknowns and proposed evaluations predate the bounded ARM64 translator now preserved in `crates/loader`. They do not describe CrossOver CPU translation or an active native work queue. See the [active architecture](../architecture.md).
Microsoft's March 2020 Xbox Series X hardware disclosure identifies the shipped CPU family as custom AMD Zen 2. The vendor hardware disclosure carries class D (CLAIM-XBOX-SERIES-X-CPU). Using x86-64 as the future guest ISA is based on that family identification. Platform-specific calling conventions and guest virtual-memory rules remain unknown. [Xbox Series X hardware disclosure](https://news.xbox.com/en-us/2020/03/16/xbox-series-x-tech/)
Apple documents the JIT mapping and write-protection APIs for Apple Silicon, including instructions for making newly written machine code visible to instruction fetch. Class B applies to the documented host APIs. Xenora has yet to choose ahead-of-time translation or JIT compilation. [Apple JIT porting guide](https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon)
Apple documents the JIT mapping and write-protection APIs for Apple Silicon, including instructions for making newly written machine code visible to instruction fetch. Class B applies to the documented host APIs. At the time of this study, Xenora had not chosen ahead-of-time translation or JIT compilation. The preserved implementation now includes a bounded ARM64 dynamic binary translator; see the [instruction registry](../cpu/instruction-registry.md). [Apple JIT porting guide](https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon)
No guest page-size contract has been established. Host mapping operations use host page granularity. Any finer guest protection granularity will require an explicit software policy. Class B applies to documented host mapping semantics. [Apple mmap manual](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/mmap.2.html)
@@ -1,6 +1,6 @@
# Hybrid backlog research record (2026-11-25)
Evidence class D: public documentation and repository metadata, plus search summaries; see [primary-source-verification-2026-11-25.md](primary-source-verification-2026-11-25.md) for the re-check. Nothing was installed, built or run. Not legal advice. Candidate registry rows are listed here; merge them into [upstream-registry.md](upstream-registry.md) once that file's pending commit has landed.
Evidence class D: public documentation and repository metadata, plus search summaries; see [primary-source-verification-2026-11-25.md](primary-source-verification-2026-11-25.md) for the re-check. Nothing was installed, built or run. Not legal advice. The candidate rows are retained as the original research record; consult the [upstream registry](upstream-registry.md) for their recorded disposition rather than treating this page as a pending merge instruction.
## Findings that created issues
+2
View File
@@ -1,5 +1,7 @@
# Native issue archive
Issue/PR states and “active work” labels below are a snapshot of the transition, not a live assignment list. An open historical native PR does not reopen the native roadmap; check its current discussion and the hybrid priorities before taking work.
**Preserved history, not a backlog.** BetterXen's active direction is the CrossOver-based hybrid architecture ([roadmap](../roadmap.md)). The independent native implementation is paused indefinitely; this page replaces its GitHub issue backlog so the work can be found without occupying the active Issues tab. Native source code, tests, benchmarks, Git history and attribution are untouched. Resuming native work needs an explicit maintainer decision ([native roadmap](native-roadmap.md)).
Every issue below keeps its full text, comments and attribution on GitHub and can be reopened; closing used the reason "not planned". Issues imported from the earlier Xenora repository say so in their first lines, and their original author is recorded below. Excerpts are the first sentence of the issue's objective, not a summary of acceptance criteria.
+1 -1
View File
@@ -4,7 +4,7 @@
## Existing implementation (preserved in the workspace)
Rust crates under `crates/` and `app/`, tests under `tests/`, fixtures, fuzz targets and benchmarks. The last `main` commit before the hybrid transition is tagged `native-first-final`. Contributor history is untouched.
The native `xenora-*` crates and `betterxen` CLI, Swift code under `app/`, native tests, fixtures, fuzz targets and benchmarks. The separately vendored `victory-shader` is active hybrid integration; not every crate under `crates/` belongs to this paused track. See the [crate guide](../../crates/README.md). The last `main` commit before the hybrid transition is tagged `native-first-final`. Contributor history is untouched.
## Verified achievements (synthetic evidence only)
+2
View File
@@ -1,5 +1,7 @@
# Phase 02 collaboration research
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
The implementation policy is [independent authorship](../../CONTRIBUTING.md).
Historical reuse discussion records the earlier survey. Xenora uses
public specifications and original fixtures, with other emulator
+2
View File
@@ -1,5 +1,7 @@
# Phase 02 Track B CPU feasibility
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
This historical feasibility study predates the [implemented guest experiments](../../experiments/x1/README.md). This review used the local dual-track brief and public sources. Local inspection reported `Darwin arm64` and macOS 27.3 (26C5047e). No CPU engine, loader, JIT or GPU workload was built or run for this report. [Existing CPU research](cpu-boundary.md) · [CPU boundary decision](../adr/0004-cpu-boundary.md)
## Engine comparison
+2
View File
@@ -1,5 +1,7 @@
# Phase 02 Xbox ecosystem research
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
The implementation policy is [independent authorship](../../CONTRIBUTING.md).
Historical reuse discussion records the earlier survey. Xenora uses
public specifications and original fixtures, with other emulator
+4 -2
View File
@@ -1,5 +1,7 @@
> **Superseded in part (2026-11-25).** This review recommended against Rosetta, Wine and CrossOver under the native-first plan. BetterXen's direction is now the CrossOver-based hybrid architecture ([roadmap](../roadmap.md), [ADR 0005](../adr/0005-crossover-hybrid-direction.md)); the screening facts below remain useful, the native-first recommendations do not. See the [upstream registry](upstream-registry.md) for the current provenance decision on VIctory-family projects.
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
# PortWatch review and a native macOS execution plan
Reviewed November 24, 2026 (America/Chicago). This is a public-documentation and
@@ -201,8 +203,8 @@ texture inventory respectively. Runtime PRs #263/#290 overlap substantially;
their author/maintainer must resolve them before new runtime edits. These
references are destination-repository numbers, not imported source numbers.
The replacement [development phases](../archive/development-phases-native-first.md) define the sole
active work order, from compiled guest boot through modular workers, a
At this historical review, the [native development phases](../archive/development-phases-native-first.md) defined the
then-active work order, from compiled guest boot through modular workers, a
guest-controlled Metal scene, an interactive application, a compatibility
corpus, sustained native execution and conditional Xbox experiments.
Hosted C is implemented on inspected main, awaiting independent acceptance;
@@ -1,5 +1,9 @@
# Primary-source verification (2026-11-25)
This is a dated desk-research and toolchain checkpoint. Later local shader
fixture observations are in the [integration report](victory-shader-integration.md);
its results do not resolve every unknown listed here.
Re-checks claims first taken from search summaries in [hybrid-backlog-research-2026-11-25.md](hybrid-backlog-research-2026-11-25.md). Evidence class D (public documentation read; nothing installed or run). Not legal advice. #363 still has to re-derive these independently.
| Claim | Result | Primary source read |
+2
View File
@@ -1,5 +1,7 @@
# Shader inputs and provenance
**Scope:** the original native fixture input contract below remains preserved. The active hybrid bridge supplies original compute machine code and explicit root layouts to `victory-shader`; no console-container corpus was validated. See the [integration report](victory-shader-integration.md). Parser presence is not compatibility evidence.
Use original assembly assembled by `llvm-mc` for `gfx1030`. Preserve its exact tool version and target options, byte range and endianness, object and extracted code digests, and independently derived outputs. Pass the validated code range and explicit stage and architecture through the Xenora fixture interface. Use a symbol or a declared code range when extracting from an object so alignment bytes and padding do not enter execution. An AMDHSA object also has a separate documented code object ABI (CLAIM-LLVM-GFX1030). [LLVM AMDGPU usage and code object layout](https://llvm.org/docs/AMDGPUUsage.html)
The documented DirectX container can carry either DXBC or DXIL shader parts. Its outer `DXBC` magic identifies the container structure. A DXIL program part contains versioned LLVM bitcode (CLAIM-DXCONTAINER-PAYLOAD). A self-authored HLSL shader compiled with public DXC remains a possible separate input path for later work. Apple's shader converter documents DXIL input to a Metal library (CLAIM-MSC-DXIL). [LLVM DXContainer](https://llvm.org/docs/DirectX/DXContainer.html), [Microsoft DXIL format](https://github.com/microsoft/DirectXShaderCompiler/blob/915bf4f93a254d920b4bcab75b6b1c622eacd816/docs/DXIL.rst#dxil-container-format), [Apple shader converter](https://developer.apple.com/metal/shader-converter/#your-first-conversion)
+1 -1
View File
@@ -1,6 +1,6 @@
# Public graphics sources
Reviewed 2026-11-22. Evidence classes apply to the specific claims in [claims.toml](../claims.toml). The sources below were consulted for original research notes. No upstream files or binary artifacts were imported.
Reviewed 2026-11-22. Evidence classes apply to the specific claims in [claims.toml](../claims.toml). The sources below were consulted for original research notes. No upstream files or binary artifacts were imported by that source review. Later component reuse, including the vendored shader compiler, is recorded separately in the [upstream registry](upstream-registry.md).
| Publisher and version | Consulted sections | License and access |
|---|---|---|
+2
View File
@@ -1,5 +1,7 @@
# Synthetic guest integration and upstream evidence
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
## Source snapshots
The repository audit supplied for this session inspected these public
+2
View File
@@ -1,5 +1,7 @@
# Texture format and layout inventory
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
This page records which texture formats and memory layouts BetterXen handles today, and at which stage. It also records which gaps are worth closing and which are deferred. It is an inventory of the repository at the time of writing, built from the code and tests it links. It is not a support claim: a format listed here works only for the original synthetic fixtures named, on desktop specifications, and nothing here says anything about Xbox hardware or commercial titles.
## Stages
+11 -1
View File
@@ -1,5 +1,15 @@
# Upstream research registry
## Split integration update
The original discovery assessment below is retained as a dated research snapshot. The split shader integration subsequently included only `crates/victory-shader` from `skakwy/victory-mac` at `22b3f8e45a59f7d11fef7718988c58d0b3f1d0f9`, plus BetterXen fixture additions. Its [provenance record](../../crates/victory-shader/UPSTREAM.md), [license record](../licenses.md) and [local integration results](victory-shader-integration.md) are the component-specific records, not an approval of the wider VIctory family. This documentation audit does not independently certify that review. Other upstream runtime, loader, game-specific and decryption components remain excluded.
| Component | Selected scope | Recorded license and limits |
| --- | --- | --- |
| `victory-shader` | Vendored GFX10-to-DXIL snapshot and original compute-fixture bridge | Upstream GPL record and retained MIT opcode-table notice; exact files, modifications and attribution in `UPSTREAM.md`. Independent provenance/acceptance review is not claimed here. |
## Original discovery assessment (2026-11-25)
Reviewed 2026-11-25. Every entry is **evidence class D** (non-normative official or project material) in the sense used by the issue templates and [claims.toml](../claims.toml): a review of public documentation and repository metadata. Nothing here was installed, built or run, so none of it is a statement that a project works for BetterXen's goals. Licenses are what the repository's own license file or GitHub's license detection reported; they still need the per-file check in the [reuse matrix](component-reuse-matrix.md) and are not legal advice. Pins are the default-branch head observed with `git ls-remote` on the review date. Independent re-derivation of this table is tracked in issue #363.
| Project | Source | Pin (head) | License as reported | Role for BetterXen | Findings |
@@ -33,4 +43,4 @@ Apple's Game Porting Toolkit documentation and license (D3DMetal's actual terms)
## Provenance decision
VIctory-family projects are not adopted. Their GPL grants apply to their own source; they do not establish that the material they were built for is authorized. The registry records them for architecture ideas visible in public documentation (cache identity, upload visibility, test structure). No code, shader corpus, asset or tooling from them enters BetterXen without a recorded per-file review, and anything game-specific or decryption-related is excluded.
At this initial discovery review, VIctory-family projects were not adopted. The later shader-only snapshot is recorded above; no broader adoption follows from it. Their GPL grants apply to their own source; they do not establish that the material they were built for is authorized. The registry records them for architecture ideas visible in public documentation (cache identity, upload visibility, test structure). No code, shader corpus, asset or tooling from them enters BetterXen without a recorded per-file review, and anything game-specific or decryption-related is excluded.
+18 -7
View File
@@ -1,10 +1,12 @@
# victory-shader integration (GFX10 to DXIL recompiler)
This report separates the initial snapshot results from the subsequent [wave investigation and fixes](shader-wave-semantics.md), now included through PR #394 and the top of the split stack, PR #395. All recorded hardware results remain local observations, not independent acceptance. The runner dependencies are separate.
Evidence: classes noted per row. Everything ran on one machine (Apple M4, 24 GiB, macOS 27.0, CrossOver 26.3.0.39832, bottle `betterxen-test`, default backend) and has **not been independently reproduced**. No game, console title or leaked material was used.
## What was integrated
`crates/victory-shader` is a snapshot of `crates/victory-shader/` from skakwy's [victory-mac](https://github.com/skakwy/victory-mac) (head `22b3f8e45a59`). It translates GFX10 (RDNA 2) machine code to PC DXIL, shader model 6.6, in pure Rust: a GFX10 decoder with an SP3 printer, control-flow structurizer, register spilling, wave emulation, fp64 by integer operations, its own LLVM 3.7 bitcode writer and DXIL container writer. About 43,500 lines against 4,022 in BetterXen's native `xenora-shader`. The native RDNA-to-Metal compiler is untouched and still paused; the two are different targets (DXIL for D3D12 under CrossOver versus MSL) and nothing was replaced. Provenance, authors, licences and the 19 changed lines are in [`crates/victory-shader/UPSTREAM.md`](../../crates/victory-shader/UPSTREAM.md). Licensing: GPL-3.0 upstream, GPL-3.0-or-later here, one MIT Mesa-derived table with its notice kept.
`crates/victory-shader` is a snapshot of `crates/victory-shader/` from skakwy's [victory-mac](https://github.com/skakwy/victory-mac) (head `22b3f8e45a59`). It translates GFX10 (RDNA 2) machine code to PC DXIL, shader model 6.6, in pure Rust: a GFX10 decoder with an SP3 printer, control-flow structurizer, register spilling, wave emulation, fp64 by integer operations, its own LLVM 3.7 bitcode writer and DXIL container writer. About 43,500 lines against 4,022 in BetterXen's native `xenora-shader`. The native RDNA-to-Metal compiler is untouched and still paused; the two are different targets (DXIL for D3D12 under CrossOver versus MSL) and nothing was replaced. Provenance, authors, licences, the initial 19 lint-only lines and subsequent wave changes are in [`crates/victory-shader/UPSTREAM.md`](../../crates/victory-shader/UPSTREAM.md). Licensing: GPL-3.0 upstream, GPL-3.0-or-later here, one MIT Mesa-derived table with its notice kept.
Left out on purpose: the upstream repository's loader, HLE, GPU runtime and game-specific code (one console title's runtime) and their provenance questions; the console shader containers the crate can also parse were not exercised, because no authorized container exists.
@@ -12,7 +14,7 @@ Left out on purpose: the upstream repository's loader, HLE, GPU runtime and game
- `emit::translate_native` (BetterXen addition, `emit/betterxen.rs`): the crate only accepted shaders inside console containers; this entry point takes a compute program as machine code plus root layout, which is what BetterXen has.
- `emit/betterxen_tests.rs`: BetterXen's own synthetic gfx1030 Wave32 fixtures (`fixtures/rdna2/*.bin`, original, assembled with LLVM's `llvm-mc`) are wrapped in a short descriptor-table prologue, translated to DXIL, and compared with the expected words in `fixtures/manifest.toml`. Those expectations were derived by hand in the manifest and are checked by BetterXen's independent reference; none comes from the recompiler. Six of the eleven manifest fixtures have input and expected words (add, float-exact, bitwise-branch, or, shifts, ashr); the five graphics-stage fixtures (`x9-*`) have none and are not bridged.
- Running the cross-built Windows test executable under CrossOver is done by `scripts/hybrid/run-shader-gpu-tests.sh` through `betterxen-hybrid run`. Those live in separate pull requests (the hybrid runner, and the script on top of it); the GPU results below were produced with them.
- Running the cross-built Windows test executable under CrossOver is done by `scripts/hybrid/run-shader-gpu-tests.sh` through `betterxen-hybrid run`. The script is in PR #395 on top of the shader crate (#394); the `betterxen-hybrid` runner and stall supervision are separate PRs #384 and #388, absent from that base. The GPU results below were produced with those dependencies present. See the [architecture guide](../architecture.md) and [testing prerequisites](../testing/README.md).
## Results
@@ -24,15 +26,24 @@ Left out on purpose: the upstream repository's loader, HLE, GPU runtime and game
| BetterXen fixtures run on the GPU: D3D12 under CrossOver 26.3 (D3DMetal) | **6 of 6 output words match the manifest** | via `betterxen-hybrid run`, 2.3 to 2.6 s including bottle start; the GPU is a D3D12 device with shader model 6.6 as upstream's host layer requires |
| Negative control | a flipped expected word is rejected; the output is not the zeroed buffer | `a_wrong_expectation_is_detected` |
| Same GPU tests on DXMT, DXVK and wined3d (no D3D12) | fail with "no SM 6.6 D3D12 hardware device: not verified" | confirms they cannot pass by skipping; upstream's own tests print "skipped" instead |
| Whole upstream suite, vendored unchanged, under CrossOver (default backend), 229 tests | 224 passed, **2 failed**, 3 ignored | the two failures are explained in `shader-wave-semantics.md` |
| Whole suite with the fixes in this PR, under CrossOver | **232 tests: 229 passed, 0 failed, 3 ignored** | the 3 additional tests are BetterXen's f64 tests; see below |
| Original vendored suite before the wave fixes, under CrossOver (default backend), 229 tests | 224 passed, **2 failed**, 3 ignored | the two failures are explained in `shader-wave-semantics.md` |
| Whole suite with the wave fixes in the integration stack, under CrossOver | **232 tests: 229 passed, 0 failed, 3 ignored** | the 3 additional tests are BetterXen's f64 tests; see below |
| Upstream suite on a backend without D3D12 (DXMT) | 201 passed, 25 failed, 3 ignored | see the classification below |
The two failures are `whole_wave_f64_sum_and_cvt_f32_f64` (a wave-wide fp64 sum returned 0, expected `0x40a00000`) and `a_sum_of_halves_where_lanes_have_left_is_the_consoles_tree_bit_for_bit` (64 lanes: got 0, expected `0x5914`). Both are cross-lane wave reductions of the console's 64-lane waves. Hypothesis, **not verified**: the host's waves are 32 lanes wide (Apple GPU) and D3DMetal does not honour the required wave size or wave operation semantics. The cause, and whether upstream passes them on a Windows GPU, were not investigated.
The initial failures were `whole_wave_f64_sum_and_cvt_f32_f64` (returned 0,
expected `0x40a00000`) and
`a_sum_of_halves_where_lanes_have_left_is_the_consoles_tree_bit_for_bit`
(returned 0, expected `0x5914`). The later
[wave investigation](shader-wave-semantics.md) supersedes the initial wave-width
hypothesis: it records unsupported native double operations for the first case
and an invalid 64-lane test precondition on a 32-lane device for the second.
The stack now uses integer fp64 addition for the sum and device-aware rejection
for the 64-lane-only case. Neither change establishes Xbox-hardware agreement.
## Which tests actually executed on the GPU
The harness reports a test as passed whether or not it touched the GPU; many return early when no device is available. Each test was therefore run on the default backend (D3D12 via D3DMetal) and on DXMT (no D3D12), with libtest JSON output including each test's own printed output (`--format json --show-output`). A test counts as GPU-dependent if its outcome changes without D3D12 or it prints "no SM 6.6 hardware device; skipped" there. Final content of this PR (232 tests: 225 upstream, 7 BetterXen):
The harness reports a test as passed whether or not it touched the GPU; many return early when no device is available. Each test was therefore run on the default backend (D3D12 via D3DMetal) and on DXMT (no D3D12), with libtest JSON output including each test's own printed output (`--format json --show-output`). A test counts as GPU-dependent if its outcome changes without D3D12 or it prints "no SM 6.6 hardware device; skipped" there. After the included wave fixes (232 tests: 225 upstream, 7 BetterXen):
| Group | Tests |
| --- | --- |
@@ -41,7 +52,7 @@ The harness reports a test as passed whether or not it touched the GPU; many ret
| Not GPU-dependent: CPU-side (decode, structurize, lower, emit, container) or ignored | 201, including 3 ignored |
| Total | 232 |
For the vendored upstream code before the fixes in this PR the same method gave 229 tests: 32 GPU-dependent, 30 passed on the device and 2 failed (they "passed" without D3D12 by skipping, which hid the failures), see `shader-wave-semantics.md`. Three of the 31 are BetterXen's GPU tests (fixtures, negative control, bit-exact f64 sums). Counts are by name from the JSON events and are exact for this binary and machine. "WARP" skips (the software adapter, which Wine does not provide) and "no `dxil.dll`" skips are not GPU runs and are not counted as such.
For the vendored upstream code before the included wave fixes the same method gave 229 tests: 32 GPU-dependent, 30 passed on the device and 2 failed (they "passed" without D3D12 by skipping, which hid the failures), see `shader-wave-semantics.md`. Three of the 31 are BetterXen's GPU tests (fixtures, negative control, bit-exact f64 sums). Counts are by name from the JSON events and are exact for this binary and machine. "WARP" skips (the software adapter, which Wine does not provide) and "no `dxil.dll`" skips are not GPU runs and are not counted as such.
## Limits
+2
View File
@@ -1,5 +1,7 @@
# Open Phase 01 risks
**Historical native Phase 01 register.** Owners and next experiments below retain their original candidate scope; they are not current assignments or hybrid priorities. Active hybrid risks and exit conditions are in the [roadmap](roadmap.md), with component boundaries in [architecture.md](architecture.md).
| ID | Risk and impact | Current evidence | Owner and next experiment |
|---|---|---|---|
| R1 | Console shader container, launch state and resource descriptors remain unknown, so the fixture cannot establish console compatibility. | Public related-target specifications, class C | Xbox research. Seek an authorized exact-target specification before proposing a parser. |
+4 -2
View File
@@ -1,5 +1,7 @@
# BetterXen roadmap
The [architecture guide](architecture.md) separates code present in the split integration stack from the separate hybrid runner PRs. Local synthetic results do not satisfy the independent baseline or advance the phase automatically. Issue lists and parked items below record the transition plan; consult current issue state before selecting work.
**This is the single authoritative active roadmap.** GitHub Issues hold the current phase's tasks, the open milestone names the current phase, and this file explains strategy, phase order, parked work and completion criteria. If another document disagrees, this one governs, except [ADR 0005](adr/0005-crossover-hybrid-direction.md) for the decision itself.
## Direction
@@ -24,7 +26,7 @@ Only the current phase has a GitHub milestone and detailed issues. Later phases
## Engineering rules
[AGENTS.md](../AGENTS.md) (`CLAUDE.md` is a symlink to it) was rewritten to permit CrossOver, Wine-based infrastructure, Rosetta 2 and D3DMetal subject to licensing; ADR 0005 records the decision. The honesty, verification, provenance and clean-room rules are unchanged. Both are on the local branch `planning/hybrid-first-transition` and await maintainer review; nothing has been pushed.
[AGENTS.md](../AGENTS.md) (`CLAUDE.md` is a symlink to it) was rewritten to permit CrossOver, Wine-based infrastructure, Rosetta 2 and D3DMetal subject to licensing; ADR 0005 records the decision. The honesty, verification, provenance and clean-room rules are unchanged. The transition is recorded in repository history; use the requested PR base or current `main`, not the former planning branch, for new work.
## How progress is reported
@@ -46,7 +48,7 @@ Phase status is one of: Not started, Researching, In development, Blocked, In va
6. A reproducible CrossOver environment and a recorded baseline of CPU, GPU, memory and stability, reproduced by a second contributor ([#355](https://github.com/MacosPorters/betterxen/issues/355)).
7. BetterXen's responsibilities versus CrossOver's recorded in an ADR a maintainer accepts ([#351](https://github.com/MacosPorters/betterxen/issues/351)).
**Open issues:** #145, #348, #350, #351, #353, #354, #355, #363, #364, #365, plus #346 (project board, needs the GitHub `project` token scope; does not block engineering).
**Transition issue inventory (not a live status query):** #145, #348, #350, #351, #353, #354, #355, #363, #364, #365, plus #346 (project board, needs the GitHub `project` token scope; does not block engineering).
**Known risks:** CrossOver is proprietary, so bundling or modifying may be prohibited; integration interfaces may be undocumented (see below); Xbox titles may not run at all.
+2
View File
@@ -1,5 +1,7 @@
# Runtime service registry
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
Guest imports resolve through one lookup, `ImportRegistry::resolve`. Binding, the static probe and the command-line reports all use it, and they read the import directory with one bounded parser, `import_table::parse_imports`.
| Part | File | Role |
+2
View File
@@ -1,5 +1,7 @@
# Typed runtime services
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
Generated by `xenora-runtime-gen` from `crates/loader/runtime/services.txt`. Do not edit.
A declared service is not a claim of compatibility. `implemented` and `partial` describe behaviour against the documented contract for the synthetic guest. No service has been independently accepted.
+2
View File
@@ -1,5 +1,7 @@
# Guest threads
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
`crates/loader/src/scheduler.rs` runs guest threads deterministically on one host thread. A guest thread is a CPU context, a guarded stack and a TEB; it is never a host thread. Guest threads never execute at the same time, so no guest memory-ordering model is relied on (#199).
## Scheduling
+2
View File
@@ -1,5 +1,7 @@
# gfx1030 instruction coverage
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
For counts of every gfx1030 form in AMD's metadata against forms Xenora can execute, run `xenora shaders coverage`. Its "discovered" column is metadata coverage, not execution support.
The decoder accepts an explicitly tagged, little-endian gfx1030 Wave32
+2
View File
@@ -1,5 +1,7 @@
# Synthetic compute lowering
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
The compiler accepts explicitly tagged raw gfx1030 code up to 1,024 bytes and requires a whole number of 32-bit words. The verifier checks source initialization, exact resource slots and address operands, immutability of VGPR 0, memory ordering, one completed output store and program termination. VGPR 0 is reserved for resource indexing. Keeping it out of arithmetic means the host's grid position is never exposed as a guest register value.
Verification maps each initialized register to its latest typed temporary. Reads after a load require a load wait. Because generated memory accesses are synchronous expressions within a thread and buffers are disjoint, waits can be discharged during verification. Metal completion is still required before host readback. Store and load aliases between lanes are excluded by the [fixture ABI](../adr/0003-demo-memory-model.md). The output buffer uses Metal index 1 and the read-only input uses index 0.
+2
View File
@@ -1,5 +1,7 @@
# Independent gfx1030 CPU reference
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
`xenora_ref::execute` reads raw little-endian code bytes and input words without dependencies on the production ISA crate, the compiler or Metal. It accepts at most 1024 instruction bytes and 4096 input words. The synthetic ABI gives every invocation its own input and output word. The indexed load and store forms need no host address arithmetic, and V0 is reserved for that indexing. Dispatch indices form Wave32 waves of 32 consecutive invocations, executed in lockstep with shared scalar state. The reference accepts uniform forward branches driven by scalar register state or by a compare mask in VCC_LO. Cross-lane register access other than compare masks, and EXEC derived from lane data, are outside the subset. Floating-point arithmetic is restricted to positive normal inputs and exact normal results.
| AMD RDNA 2 ISA guide instruction | Reference operation |
+2
View File
@@ -1,5 +1,7 @@
# SOP2 scalar ALU subset
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
Xenora decodes and executes thirty-three gfx1030 SOP2 forms. Each takes 32-bit
operands and writes a normal SGPR (s0-s105). The seventeen below set SCC; the
sixteen in [Arithmetic, select and bit-field forms](#arithmetic-select-and-bit-field-forms)
+2
View File
@@ -1,5 +1,7 @@
# SOPK scalar immediate forms
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
Xenora decodes and translates sixteen gfx1030 SOPK integer forms through the
semantic registry (`crates/isa/semantics/rdna2/sopk.toml`, operand rules
`sopk_sgpr` and `sopk_compare`). Each is one 32-bit word: SIMM16 in bits 0-15,
+2
View File
@@ -1,5 +1,7 @@
# Adding an instruction through the semantic registry
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
The semantic registry is a data file that declares what each supported gfx1030
instruction form does. A generator checks it and turns it into Rust tables that
the decoder uses. This page explains where entries live, what each field means,
+2
View File
@@ -1,5 +1,7 @@
# Execution contract: bounded Wave32 VOPC integer compares (issue #186)
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
Status: v2, after independent review (codex-contract.log); findings 1-7 addressed. Scope is the Xenora compute-fixture ABI
(one input word and one output word per dispatched thread; dispatch index `i`
is wave `i / 32`, lane `i % 32`; every wave starts with EXEC_LO = 0xffffffff;
+2
View File
@@ -1,5 +1,7 @@
# Wave32 vector unary integer operations and swap
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
Xenora translates six gfx1030 VOP1 integer forms for the synthetic Wave32 compute
ABI. The AMD RDNA 2 ISA Reference Guide defines the operations in section 12.8,
the encoding in section 13.3.2, and the execution mask (EXEC) in section 3.3.
+2
View File
@@ -1,5 +1,7 @@
# Wave32 vector select, carry and borrow
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
The gfx1030 compute fixture ABI supports four 32-bit vector two-operand
instruction (VOP2) forms that read the vector condition code (VCC).
In Wave32, bit `n` of `VCC_LO` supplies lane `n`'s input `c`.
+78
View File
@@ -1,5 +1,83 @@
# Testing and acceptance
## Select checks by scope
Active hybrid work follows the [architecture guide](../architecture.md).
Preserved native tests remain regression checks, with their original synthetic
scope. Historical Phase 01/02 and G-number acceptance gates are not the current
hybrid phase criteria. The [roadmap](../roadmap.md) controls phase completion.
### Documentation-only changes
Run from the repository root:
```sh
python3 scripts/audit/docs_hygiene.py --require-yaml
python3 scripts/audit/status.py --check
python3 scripts/audit/semantic_coverage.py --check
scripts/audit/claims.sh
scripts/audit/dependencies.sh
git diff --check
```
Hygiene checks tracked relative Markdown file links, conflict markers and
workflow YAML; it does not validate anchors or external URLs. Status and coverage
checks detect drift in generated native tables. These are consistency checks,
not CPU/GPU execution or independent acceptance. API documentation can also be
compiled with `CARGO_BUILD_JOBS=2 cargo +1.100.0 doc --locked --workspace --no-deps`.
### Hybrid shader fixtures
On native ARM64 macOS with Rust 1.100.0 selected, `cargo test --locked -p victory-shader` runs CPU-side
compiler tests. Windows-only GPU tests require a Windows guest executable,
an externally installed CrossOver with a configured bottle and a D3D12-capable
backend. DXIL emission alone is not GPU verification.
The following command additionally requires a checkout containing the
`betterxen-hybrid` runner from [PR #384](https://github.com/MacosPorters/betterxen/pull/384)
and stall supervision from [PR #388](https://github.com/MacosPorters/betterxen/pull/388).
They are absent from the split shader/script stack's base. Install Rust 1.100.0
with `x86_64-pc-windows-gnullvm` and provide an unpacked llvm-mingw toolchain
(the recorded integration used release 20261117):
```sh
scripts/hybrid/run-shader-gpu-tests.sh /path/to/llvm-mingw betterxen-test fixtures
# Optional whole upstream suite, including the wave fixes now in this stack:
scripts/hybrid/run-shader-gpu-tests.sh /path/to/llvm-mingw betterxen-test all
```
`fixtures` filters on `betterxen`; the latest stack adds three fp64 tests to the
original four BetterXen tests. The script still expects the literal summary
`test result: ok. 4 passed`, so that expectation may reject a successful run of
the expanded selection. This documentation PR leaves the script unchanged.
Use `all` for the recorded whole-suite procedure and inspect output and skips. The script obtains the executable from Cargo build messages and
uses `debug/deps` as a fallback. It delegates supervision to the hybrid runner
and writes records under ignored `artifacts/hybrid-runs/`.
Record source revisions, host, CrossOver/bottle/backend, Rust and cross-toolchain
versions, commands, output and pass/fail/skip counts. Inspect whether each test
actually dispatched: some upstream tests return success after skipping when
D3D12, WARP or `dxil.dll` is unavailable. BetterXen's GPU tests fail without the
required hardware device. The [integration report](../research/victory-shader-integration.md)
preserves the original two failures and the included
[wave fixes](../research/shader-wave-semantics.md), which report 229 passed,
0 failed and 3 ignored on the recorded host. The device-width rejection test
is a CPU rejection check on that host, not a verified 64-lane GPU sum. No independent reproduction or
phase completion is claimed.
### Workspace and preserved native regressions
Use `cargo fmt --all -- --check`,
`cargo clippy --locked --workspace --all-targets -- -D warnings` and
`cargo test --locked --workspace` as appropriate to code changes.
`scripts/test-gpu.sh`, `scripts/demo.sh`, the independent semantic review,
fixture assembly, mutation and benchmark procedures below exercise the
preserved native path. They do not launch CrossOver or validate the DXIL path.
A successful native run does not substitute for hybrid workload readback.
Keep unavailable tools, excluded target modules and ignored tests visible.
## Preserved procedures and evidence
- [Migrated pull-request integration review](migration-pr-review.md) — Merge decisions, fixes, native verification and remaining scope limits.
- [AMD RDNA2 desktop GPU (gfx1030) form acceptance](shader-form-acceptance.md) — Rule and evidence required to promote a form from local results to `fixture verified`.
- [Test inventory comparison](test-inventory.md) — Detect missing or newly ignored Cargo tests across commits.
+2
View File
@@ -1,5 +1,7 @@
# Benchmark protocol
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
The benchmark harness measures each fixture in its manifest that passes its
correctness test in the same run. It never reports a number for a shader that
failed or was skipped.
+2
View File
@@ -1,5 +1,7 @@
# CPU test runtime, shards and coverage map
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
This page records what the CPU test gate costs, describes
`scripts/cpu-tests.sh`, which splits that gate into deterministic shards, and
maps which x86-64 and loader behavior the tests verify. The shards are a
+63
View File
@@ -0,0 +1,63 @@
# Hybrid documentation consistency audit
Audited 2026-11-25 for the maintainer's documentation-only alignment task.
Base: `59b6c4db5e2ceba5aecafc947d1f314c8fe0a895`, the head of split integration
[PR #395](https://github.com/MacosPorters/betterxen/pull/395), stacked on
[PR #394](https://github.com/MacosPorters/betterxen/pull/394). The documentation
branch is `docs/hybrid-architecture-alignment`. The base advanced during the audit
to include the wave fixes from #394; the documentation branch was rebased onto
that updated top before final checks. No new issue was requested or
created. This is a documentation consistency review, not independent technical
acceptance of either implementation PR.
## Coverage and disposition
The audit inventories the base's 95 tracked Markdown paths, including the
`CLAUDE.md` symlink, and checks architecture/development references in issue
forms, Cargo metadata, crate API comments and documentation registries. Ignored
experiments and generated local artifacts are outside the published documentation.
| Surface | Disposition |
| --- | --- |
| `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, PR template | Point agents and contributors to hybrid boundaries and appropriate checks; preserve the symlink, claim precedence, provenance rules and native pause. Explain direct maintainer assignments and stacked bases. |
| Root README and documentation index | Put hybrid responsibilities and split dependencies first; label retained native diagrams, build procedures and capability counts. |
| Architecture, interfaces and ADRs | Add the current integration guide. Retain native fixture contracts in ADRs 0003/0004 with explicit scope; retain ADR 0005's strategic decision and distinguish subsequent observations from architectural acceptance. |
| Roadmap, milestones and archived plans | Keep Phase 1 active and its exit criteria intact. Mark issue-state inventories as snapshots; preserve already-labelled archived plans and retired milestone data. Remove obsolete local-branch instructions. |
| Crate documentation | Add a workspace crate guide and shader-crate README. Inspect crate-level Rustdoc and manifest descriptions; retain API text and legacy names, with component scope explained in the guides. No Rust sources or manifests changed. |
| CPU, runtime and shader contracts | Label maintained native procedures and inventories as preserved research. Keep generated coverage content unchanged; its native scope is explained by the index, architecture and progress pages. |
| Research, upstream registry and reuse matrix | Distinguish initial discovery decisions from the shader-only snapshot already in the base. Preserve original pins, notices, uncertainty and the requirement for independent provenance review. No broader upstream adoption is authorized. |
| Testing, validation, benchmarks and campaign ledgers | Separate hybrid readback from native regressions and historical acceptance. Mark old next tasks and campaign ownership as historical; retain recorded counts and candidate scope. Explain the expanded BetterXen test selection versus the script’s old four-test expectation. |
| Legal/security/support and attribution | Clarify input policy versus demonstrated execution and the native threat-model boundary. Preserve security reporting, conduct rules, license texts, upstream notices and historical benchmark reports. |
| Workflow/issue forms and machine-readable evidence | Existing hybrid task forms already describe active scope. Leave workflows, claims/status data, retired milestone JSON, fixture manifests and generated evidence untouched. |
Searches covered native-first/native-only language, former bans on Wine,
CrossOver, Rosetta or Vulkan, phase and milestone references, active priorities,
next-task instructions, licensing/reuse assertions and testing guidance. Retained
old terminology is scoped historical evidence or a component identifier, not a
second active roadmap. No external vendor facts were revalidated by this audit;
new architecture statements refer to the checked-in source and recorded PR
observations, with their limits preserved.
## Validation
Commands are listed in the [testing guide](README.md). Repository hygiene,
generated status/semantic coverage, claims, dependency direction and whitespace
checks passed on the aligned tree: hygiene checked 699 tracked files with zero
problems, claims checked 22 records and dependency direction checked five
graphics crates. Generated tables matched and whitespace checks passed. These
checks do not execute workloads, certify upstream
provenance or close a phase gate.
`CARGO_BUILD_JOBS=2 cargo doc --locked --workspace --no-deps` initially stopped
because the default compiler was Rust 1.94.1, below the workspace requirement.
`CARGO_BUILD_JOBS=2 cargo +1.100.0 doc --locked --workspace --no-deps` completed.
It emitted 38 Rustdoc warnings in unchanged sources: 3 in `victory-shader`, 12 in
`xenora-loader`, 16 in `xenora-ref` and 7 in `xenora-isa` (private links,
unresolved bracketed expressions and an unclosed HTML tag). This is a successful
API-documentation build with warnings, not a warning-free build. Logs are under
ignored `artifacts/docs-alignment/`.
CPU, GPU, CrossOver workloads, mutation and performance tests were not rerun for
this documentation-only change. Existing results remain attributed to their
original candidates and hosts. Independent reproduction and acceptance remain
outstanding wherever the source records say so.
+2
View File
@@ -1,5 +1,7 @@
# Gate A: a compiled C program
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
Gate A asks for an independently compiled C program, exercising allocation,
file operations, arithmetic, function calls and error handling, to run through
Xenora. The maintainer split it into two milestones. Gate A is complete only
+2
View File
@@ -1,5 +1,7 @@
# Infrastructure QA tooling
**Scope:** the Phase II/III tooling names below belong to the earlier infrastructure campaign, not the active hybrid roadmap. Native CPU/RDNA2 candidate lists are read-only inventories, not authorized work queues. Use the [hybrid testing guide](../README.md) for current validation scope; reuse these helpers only where applicable.
Standalone helpers under `scripts/qa/` and `scripts/release/`. They do not replace
`scripts/audit/*`, `scripts/benchmark.sh` or `scripts/test-gpu.sh`. New checks are
advisory until reviewed.
@@ -1,5 +1,7 @@
# Phase III compatibility-intelligence checkpoint ledger
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../../architecture.md) for active priorities.
Branch: `feat/infra-phase3-compat`. Issue #277.
Approved paths only. No push without separate authorization.
+2
View File
@@ -1,5 +1,7 @@
# Phase 01 mutation testing
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
The source campaign covers the decoder, fixture parser,
verifier, lowering and reference interpreter through the default CPU workspace
tests. The independent semantic and oracle campaigns are separate requirements.
+2
View File
@@ -1,5 +1,7 @@
# GPU and guest execution evidence
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
The resumed checkout started clean on main at
`4b9a4cecf35c8d4d90d8ecdb9c1510e7bd260102`, tracking origin/main.
The diff since `5c479005b0e0631a608a369b9e41327da61bb61e` contains three
+2
View File
@@ -1,5 +1,7 @@
# Phase 01 assurance checkpoint
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
**NOT RELEASE-READY.** The full source mutation campaign and native
technical evidence in this checkpoint ran from the clean
`aff46b0904a0182a6f0543125e4491ab67270f64` candidate on 2026-11-22. The
+2
View File
@@ -1,5 +1,7 @@
# Phase 01 engineering checkpoint
**Historical native record.** Plans and results below retain their original candidate scope. Native development is paused under [ADR 0005](../adr/0005-crossover-hybrid-direction.md); follow the [hybrid architecture](../architecture.md) for active priorities.
**NOT RELEASE-READY.** The evidence below was recorded on 2026-11-22 against the integrated local working tree based on `9ab5bf9`. The release brief requires evidence against one final candidate commit. Every formal gate therefore remains **NOT MET**. A passing local check is identified separately from outstanding work.
| Gate | Local evidence and remaining requirement |
+2
View File
@@ -1,5 +1,7 @@
# Independent review
**Scope:** retained independent reviews of native synthetic candidates. Their named commits, gates and required follow-ups are historical evidence, not certification of CrossOver or the vendored DXIL compiler. Active validation scope is in the [testing guide](README.md).
## gfx1030 form acceptance
Use the [AMD RDNA2 desktop GPU (gfx1030) form acceptance rule](shader-form-acceptance.md) for entries that
+2
View File
@@ -1,5 +1,7 @@
# AMD RDNA2 desktop GPU (gfx1030) form acceptance
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
This is the promotion rule for AMD RDNA2 desktop GPU (`gfx1030`) instruction
forms in [`docs/status.toml`](../status.toml). It implements the documentation
step of [#302](https://github.com/ranveersoni98/Xenora/issues/302). It does not
+2
View File
@@ -1,5 +1,7 @@
# Persistent resources and translated rendering acceptance
**Preserved native research.** This page governs existing synthetic fixtures and their regression checks. It does not define CrossOver compatibility or authorize native expansion; follow the [hybrid architecture](../architecture.md) for active work.
The upstream observations below describe pinned source inspected for this
milestone. Xenora tests use original fixtures. The upstream tests were not
run here. PASS records a native ARM64 run with assertions, FAIL a reproduced
+7 -1
View File
@@ -1,7 +1,13 @@
# Shader input and execution limits
## Scope
The limits below describe the preserved native fixture/compiler path. They are not a sandbox or security guarantee for CrossOver, Wine, D3DMetal or the vendored shader parser. Hybrid launches add an external process, bottle, selected backend and guest workload; assess those boundaries separately for the exact installed versions. Runner timeouts and resource supervision do not establish isolation or recovery from GPU stalls. The [architecture guide](architecture.md) records which launch dependencies are present.
## Native fixture boundaries
The public demo runs embedded, reviewed synthetic fixtures. The compiler library accepts arbitrary byte slices and requires an explicit gfx1030 target. It checks size and alignment before decoding and rejects unsupported forms, uninitialized registers and resource accesses beyond the fixture ABI. There is no container whose offsets can select host memory. An invalid stream cannot load arbitrary Metal source.
The Metal backend accepts trusted MSL under a two-buffer contract. It checks source size and dispatch dimensions, allocates disjoint buffers, dispatches one thread per word and waits for command completion before copying readback. It does not parse MSL. Treat the native API as a boundary for trusted source. The demo script bounds process runtime at 30 seconds and enables API and shader validation. A process timeout does not guarantee recovery from a hardware stall.
The fuzz harnesses exercise host-side parsers only. Corpus mutations do not reach the GPU. Logs, compiler diagnostics, and local artifacts can contain absolute paths and are kept outside tracked files. There is no cache, capture replay or protected-content input path.
The fuzz harnesses exercise host-side parsers only. Corpus mutations do not reach the GPU. Logs, compiler diagnostics, and local artifacts can contain absolute paths and are kept outside tracked files. This original fixture flow has no capture replay or protected-content input path; it is not an inventory of all current workspace caches or parsers.
+2
View File
@@ -1,5 +1,7 @@
# Synthetic guest execution experiments
**Preserved native research.** This fixture or validation procedure is for the paused independent native path, not CrossOver integration. Retain existing regression checks; proposed expansion is historical unless a specific hybrid need or maintainer decision authorizes it. See the [active architecture](../../docs/architecture.md).
The bounded x86-64 guest interpreter (X1) runs on native ARM64 macOS.
This isolated Cargo workspace implements the original fixtures in the
+52
View File
@@ -0,0 +1,52 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
# Cross-build the vendored victory-shader test executable for Windows and run it under an
# installed CrossOver through `betterxen-hybrid run`, so every GPU test goes through D3D12 on the
# host Apple GPU (D3DMetal). Writes JSON run records under artifacts/hybrid-runs/.
#
# scripts/hybrid/run-shader-gpu-tests.sh <llvm-mingw-dir> [bottle] [fixtures|all]
#
# `fixtures` (default) runs only BetterXen's own gfx1030 fixtures through the recompiler and
# D3D12; `all` runs the whole upstream suite, which currently has two known failures on D3DMetal
# (see docs/research/victory-shader-integration.md). Needs: Rust 1.100.0 with the
# x86_64-pc-windows-gnullvm target, an unpacked llvm-mingw, CrossOver, and a bottle.
set -eu
TC=${1:?usage: $0 <llvm-mingw-dir> [bottle] [fixtures|all]}
BOTTLE=${2:-betterxen-test}
WHICH=${3:-fixtures}
ROOT=$(cd "$(dirname "$0")/../.." && pwd)
cd "$ROOT"
# Build the host tool first, into the normal target directory, before the Windows build redirects it.
rustup run 1.100.0 cargo build -q -p betterxen-hybrid
export PATH="$TC/bin:$PATH"
export CARGO_TARGET_X86_64_PC_WINDOWS_GNULLVM_LINKER="$TC/bin/x86_64-w64-mingw32-clang"
export CARGO_TARGET_DIR="$ROOT/artifacts/victory-win"
# Build the Windows test executable and take its path from cargo's own build message. It normally
# lands in <target>/x86_64-pc-windows-gnullvm/debug/deps/, but cargo's layout can differ with the
# build configuration, so the path is not guessed; `deps/` is only the fallback.
EXE=$(rustup run 1.100.0 cargo test -q -p victory-shader --target x86_64-pc-windows-gnullvm --no-run \
--message-format=json | python3 -I -c '
import json, sys
exe = None
for line in sys.stdin:
try:
m = json.loads(line)
except ValueError:
continue
if m.get("reason") == "compiler-artifact" and m.get("profile", {}).get("test") \
and m.get("target", {}).get("name") in ("victory_shader", "victory-shader") and m.get("executable"):
exe = m["executable"]
print(exe or "")')
if [ -z "$EXE" ]; then
EXE=$(ls -t "$CARGO_TARGET_DIR"/x86_64-pc-windows-gnullvm/debug/deps/victory_shader-*.exe 2>/dev/null | head -1)
fi
[ -n "$EXE" ] && [ -f "$EXE" ] || { echo "could not find the victory-shader test executable" >&2; exit 1; }
file "$EXE" | grep -q "PE32+ executable.*x86-64" || { echo "not an x86-64 PE: $EXE" >&2; exit 1; }
B="$ROOT/target/debug/betterxen-hybrid"
if [ "$WHICH" = all ]; then
exec "$B" run --bottle "$BOTTLE" --timeout 900 --stall-timeout 120 --expect "test result: ok" \
--out artifacts/hybrid-runs -- "$EXE" --test-threads=1
else
exec "$B" run --bottle "$BOTTLE" --timeout 300 --stall-timeout 120 --expect "test result: ok. 4 passed" \
--out artifacts/hybrid-runs -- "$EXE" betterxen --test-threads=1
fi
+2
View File
@@ -1,5 +1,7 @@
# Synthetic PE32+ import fixtures
**Preserved native research.** This fixture or validation procedure is for the paused independent native path, not CrossOver integration. Retain existing regression checks; proposed expansion is historical unless a specific hybrid need or maintainer decision authorizes it. See the [active architecture](../../docs/architecture.md).
Run `tests/compat_fixtures/build.sh` on ARM64 macOS with native LLVM and LLD.
The script writes two x86-64 guest executables and their import listings under
`artifacts/compat-fixtures/`. Both variants come from the original C source
+2
View File
@@ -1,5 +1,7 @@
# Original AVX integer fixture specification
**Preserved native research.** This fixture or validation procedure is for the paused independent native path, not CrossOver integration. Retain existing regression checks; proposed expansion is historical unless a specific hybrid need or maintainer decision authorizes it. See the [active architecture](../../../docs/architecture.md).
This fixture is a proposed known-answer test for the
[guest AVX contract](../../../docs/cpu/avx-contract.md). It uses only the
source below, fixed register values and synthetic guest memory. Run the
+2
View File
@@ -1,5 +1,7 @@
# Native semantic mutation
**Preserved native research.** This fixture or validation procedure is for the paused independent native path, not CrossOver integration. Retain existing regression checks; proposed expansion is historical unless a specific hybrid need or maintainer decision authorizes it. See the [active architecture](../../docs/architecture.md).
Run serially on the native Apple Silicon gate machine.
```sh
+2
View File
@@ -1,5 +1,7 @@
# Independent review of the first RDNA2 fixture
**Preserved native research.** This fixture or validation procedure is for the paused independent native path, not CrossOver integration. Retain existing regression checks; proposed expansion is historical unless a specific hybrid need or maintainer decision authorizes it. See the [active architecture](../../docs/architecture.md).
AMD's RDNA2 ISA reference §8.1 defines indexed buffer addressing and the four-SGPR resource operand. Under Xenora's synthetic descriptors, the first instruction reads input word `i` into v1 and the store writes word `i` of the independent output. The vector memory wait permits the read's result to be consumed before the add. Section 12 gives the VOP1 move and carry-free unsigned addition semantics, so v2 receives `0x12345678` and v1 receives the sum reduced modulo `2^32`. The SOPK store wait completes the outstanding store. The SOPP end instruction also implicitly waits on RDNA2. Requiring both explicit waits is a conservative policy of this fixture compiler. These semantics are class B for RDNA2 and do not establish Xbox-specific applicability. [AMD RDNA2 ISA Reference Guide](https://docs.amd.com/v/u/en-US/rdna2-shader-instruction-set-architecture)
LLVM 23.1.6 and the production decoder agreed on all seven fixture instructions, including their bytes, lengths, offsets and printed operands. AMD defines hardware semantics. LLVM is class E evidence for the tool's encoding and decoding behavior.