Clean clone does not build: compat-common includes unpublished backend_data/ files #31

Closed
opened 2026-11-26 06:07:50 +00:00 by github-bot · 2 comments
Owner

@⁠LooperSalty on GitHub · 2026-11-21 18:19 UTC · original

Hi, and thanks for publishing this work under MIT/Apache-2.0.

Problem. From a clean clone at fef9a6e, cargo build -p d3d12_xs (and any crate depending on compat-common) fails with 28 couldn't read errors. compat-common uses include_str!/include_bytes! on crates/compat/compat-common/backend_data/** (Fortnite profiles, catalog, keychain, video segments, Trackmania routes, XDefiant parameters). Those files were never committed, which I understand is deliberate.

Workaround we use. In AnyXboxX (LGPL-2.1; your repo is a pinned submodule and is credited in THIRD_PARTY.md), tools/build_tombox.py creates empty placeholders, only under backend_data/, then builds. d3d12_xs.dll then builds and loads fine. We use it to serve D3D12XboxCreateDevice and DXGIXPresentArray from our native launcher.

Suggestion. Either a cargo feature gating the title-specific online backends (default off), or a build.rs step that falls back to empty data when backend_data/ is absent. Either way, cargo build would work from a clean clone and in CI. I can open a PR for whichever you prefer.

Possibly useful in return. We compared the tombox-xshader RDNA2 disassembler with the 29,522 unique encodings in LLVM's public gfx10/gfx1030 MC tests:

  • no length errors;
  • 84 % of encodings get the same mnemonic;
  • 4,586 opcodes are missing from your mnemonic table (SMEM atomics, ds_add_f32, image_msaa_load, 16-bit compares, s_call_b64, …);
  • 105 names differ: GLOBAL/SCRATCH are decoded as flat_*, and some names are gfx1010 rather than gfx1030 (v_mac_legacy_f32 vs v_fmac_legacy_f32).

Full report: https://github.com/LooperSalty/AnyXboxX/blob/main/docs/recherche/tombox-decodeur.md. Our LLVM-generated table (PrototypeScarlett/emu/rdna2_ops.py, generator tools/rdna2_mnemonics.py) covers the missing opcodes, if you want to reuse it.

**@⁠LooperSalty** on GitHub · 2026-11-21 18:19 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/31) Hi, and thanks for publishing this work under MIT/Apache-2.0. **Problem.** From a clean clone at `fef9a6e`, `cargo build -p d3d12_xs` (and any crate depending on `compat-common`) fails with 28 `couldn't read` errors. `compat-common` uses `include_str!`/`include_bytes!` on `crates/compat/compat-common/backend_data/**` (Fortnite profiles, catalog, keychain, video segments, Trackmania routes, XDefiant parameters). Those files were never committed, which I understand is deliberate. **Workaround we use.** In [AnyXboxX](https://github.com/LooperSalty/AnyXboxX) (LGPL-2.1; your repo is a pinned submodule and is credited in THIRD_PARTY.md), `tools/build_tombox.py` creates empty placeholders, only under `backend_data/`, then builds. `d3d12_xs.dll` then builds and loads fine. We use it to serve `D3D12XboxCreateDevice` and `DXGIXPresentArray` from our native launcher. **Suggestion.** Either a cargo feature gating the title-specific online backends (default off), or a `build.rs` step that falls back to empty data when `backend_data/` is absent. Either way, `cargo build` would work from a clean clone and in CI. I can open a PR for whichever you prefer. **Possibly useful in return.** We compared the `tombox-xshader` RDNA2 disassembler with the 29,522 unique encodings in LLVM's public gfx10/gfx1030 MC tests: - no length errors; - 84 % of encodings get the same mnemonic; - 4,586 opcodes are missing from your mnemonic table (SMEM atomics, `ds_add_f32`, `image_msaa_load`, 16-bit compares, `s_call_b64`, …); - 105 names differ: GLOBAL/SCRATCH are decoded as `flat_*`, and some names are gfx1010 rather than gfx1030 (`v_mac_legacy_f32` vs `v_fmac_legacy_f32`). Full report: https://github.com/LooperSalty/AnyXboxX/blob/main/docs/recherche/tombox-decodeur.md. Our LLVM-generated table (`PrototypeScarlett/emu/rdna2_ops.py`, generator `tools/rdna2_mnemonics.py`) covers the missing opcodes, if you want to reuse it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:07:50 +00:00
Author
Owner

@⁠figmasigma122343-bot on GitHub · 2026-11-21 18:45 UTC · original · edited 2026-11-22 07:58 UTC

Current main now gates the online modules with cfg(tombox_backend_data). After cargo clean, cargo build -p compat-common succeeds even without backend_data/, so the placeholder fallback in #35 is no longer needed; #35 is closed.

**@⁠figmasigma122343-bot** on GitHub · 2026-11-21 18:45 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/31#issuecomment-7067487117) · edited 2026-11-22 07:58 UTC Current main now gates the online modules with cfg(tombox_backend_data). After cargo clean, cargo build -p compat-common succeeds even without backend_data/, so the placeholder fallback in #35 is no longer needed; #35 is closed.
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-22 13:20 UTC · original

Fixed on main since 1fc8683: the modules that use backend_data/ are gated behind cfg(tombox_backend_data), so a clean clone builds compat-common and d3d12_xs (re-checked on a fresh clone of current main). Thanks!

**@⁠omonkeyz** on GitHub · 2026-11-22 13:20 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/31#issuecomment-7079738148) Fixed on main since 1fc8683: the modules that use backend_data/ are gated behind cfg(tombox_backend_data), so a clean clone builds compat-common and d3d12_xs (re-checked on a fresh clone of current main). Thanks!
This discussion has been locked. Commenting is limited to contributors.
No description provided.