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

Closed
opened 2026-11-21 18:19:10 +00:00 by LooperSalty · 2 comments
LooperSalty commented 2026-11-21 18:19:10 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by LooperSalty on 2026-11-21T18:19:10Z.


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.

<!-- greyfinch-sync:omonkeyz/xbox-emulator:issue:6532655208 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/issues/31). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-21T18:19:10Z. --- 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.
figmasigma122343-bot commented 2026-11-21 18:45:14 +00:00 (Migrated from github.com)
Author

Imported from omonkeyz/xbox-emulator. Originally posted by figmasigma122343-bot on 2026-11-21T18:45:14Z.


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.

<!-- greyfinch-sync:omonkeyz/xbox-emulator:comment:7067487117 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/issues/31#issuecomment-7067487117). Originally posted by [figmasigma122343-bot](https://github.com/figmasigma122343-bot) on 2026-11-21T18:45:14Z. --- 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.
omonkeyz commented 2026-11-22 13:20:25 +00:00 (Migrated from github.com)
Author

Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-22T13:20:25Z.


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!

<!-- greyfinch-sync:omonkeyz/xbox-emulator:comment:7079738148 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/issues/31#issuecomment-7079738148). Originally posted by [omonkeyz](https://github.com/omonkeyz) on 2026-11-22T13:20:25Z. --- 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!
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
omonkeyz/xbox-emulator#31
No description provided.