gpu: preserve raw BC64 console layout words #2218
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2226"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-25T06:16:08Z.
The BC64 source-built fixture fails to compile with Clang because
constexpr static_cast<D3D12_TEXTURE_LAYOUT>(0x109)evaluates a value outside the enum range [0,3]. Treat the guest ABI field as a raw UINT on both the fixture construction and BC64 predicate read. Accepted shapes and negative controls are unchanged; other layout readers are outside this narrow correction.Base:
7a1824d4. Tested head:452dc48a(Apple Silicon macOS, Homebrew LLVM and MinGW-w64). Before:clang++ --target=x86_64-w64-windows-gnu --sysroot=/opt/homebrew/opt/mingw-w64/toolchain-x86_64 -std=c++17 -fsyntax-only -Isrc tests/startup_bc64_supports_check.cppfails at line 19 with integer value 265 outside [0,3]. After: same target/sysroot with-std=c++17 -O2 -Wall -Wextra -Isrc -c tests/startup_bc64_supports_check.cpp -o out/backport-fixture/bc64-clang.osucceeds;x86_64-w64-mingw32-g++ -std=c++17 -O2 -Wall -Wextra -Isrc tests/startup_bc64_supports_check.cpp -o out/backport-fixture/bc64-gcc.exesucceeds. Windows CTest execution not available locally; expected checksctest --preset release --no-tests=error -R "^startup_bc64_supports" -Vincluding existing layout mutation. Related #1557 and #1690.AI-assisted backport patch from x2w-microlift.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T06:17:55Z.
Review: COMMENTED
Review of head
452dc48a2ede6424333da237b80a58a19236c560(comment only).Summary: The change is small and correct. It reads and writes the guest layout field as a raw 32-bit word (
memcpy) instead of casting an out-of-range value into the enum. That removes the Clang constexpr error and keeps the accepted shapes and negative controls the same.Findings
guest_layout_wordis only used inbc64_chain.h.single_element_srv.handgfx10_layout.hread the layout the same way (0x109family), so they could share it later. The PR says that is out of scope, which is fine.Checks run locally (Linux worktree at the head SHA)
git diff --check origin/main...HEAD-> cleanpython3 tests/docs_links_check.py-> pass (18 files, 412 links)python3 tests/bidi_controls_check.py-> pass (no bidi controls)x86_64-w64-mingw32-g++ -std=c++17 -O2 -Wall -Wextra -Isrc tests/startup_bc64_supports_check.cpp-> builds with no warningsguest_layout_word(d) == 0x109to0x10Ainbc64_chain.h, rebuilt, ran. The test fails ("FAIL nine BC7 ...: rejected, expected accepted"), so the check catches a wrong layout word. Reverted withgit checkout -- ..Other: the PR is MERGEABLE, the title is neutral, and I saw nothing clean-room related in the diff. At review time the Linux Python check had passed and the Windows jobs were pending.
AI-assisted; commands listed were executed locally.