gpu: preserve raw BC64 console layout words #2226
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2226
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2226/head"
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?
@chadhyatt on GitHub · 2026-11-25 06:16 UTC · original
chadhyatt:backport/console-layout-fixture-words→main· +15 −4 · 2 files · 1 commits · merged 2026-11-25 06:30 UTCThe 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.
@tedin7 on GitHub · 2026-11-25 06:17 UTC · original · reviewed
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.