Use both image descriptors from wide scalar loads and invalidate stale translations #1279
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1286"
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 R0Y00 on 2026-11-24T06:47:45Z.
Refs #1150 and #1216.
This applies @denn0x's original wide-load fix and its three synthetic controls (16ac9a22bdc73dd57cd3496d2c92665e0bb4d606), preserving authorship. An image naming the ninth word of a sixteen-dword load now binds 32 bytes after the first image. Both the runtime and offline producer version the cache key, so a warm cache requests fresh bytecode without removing old files. A WARP fixture places a manifest under the old key and checks that the new request is issued.
Local English privacy and service bodies became readable including after scrolling and returning. The baseline compilation reproduced the two original VS, PS and binding manifests byte-for-byte. The corrected run changed only the two pixel shaders and their binding manifests. In a fixed 771×472 right-column region, bright text pixels rose from 9,639 to 24,366 for privacy and from 11,672 to 29,564 for service. This comparison used the local diagnostic startup build. A separate run selected Simplified Chinese (11/12), confirmed the localized navigation and copyright screens, and rendered both privacy and service body paragraphs in Simplified Chinese, including mixed Latin/Chinese text and punctuation. All committed tests use source-built inputs.
Windows 11 26200.9974, NVIDIA RTX 4060 Laptop 32.0.16.1656, WARP 10.0.26100.9818, debug layer off. All seven tests passed with zero skips in 7.19 s on
a440dabb. For a preexisting cache, run the updated recording build once, runpython tools/startup/gfx2hlsl.py --pending <cache-directory>, then start the build again.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T06:54:28Z.
Review: COMMENTED
Reviewed at
a440dabb703c8fd15cd4bc5970c51ecc922b6f2e.Verification
Linux (worktree from
origin/main):git diff --check origin/main...HEAD— cleanpython -B tests/docs_links_check.py— passed (16 Markdown files, 286 links)python -B tests/bidi_controls_check.py— passed (1077 tracked files)python -B tests/startup_translator_check.py—startup translator checks: 0 failedpython -B tests/startup_sampler_heap_check.py— passedpython -B tests/startup_image_sample_l_check.py— passedpython -B tests/startup_image_3d_check.py— passedWindows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at
a440dabb703c8fd15cd4bc5970c51ecc922b6f2e:--preset dev):cmake --build --preset dev --target startup_stub_consumer -- -j 6):23.42s(configure1.52s)ctest --preset dev -R 'startup_translator|startup_stream_request_warp' --parallel 4 --no-tests=error --output-on-failure): 2/2 passed (1.18s:startup_translator0.13s,startup_stream_request_warp1.12s)/O2(--preset release):cmake --build --preset release --target startup_stub_consumer -- -j 6):35.16s(configure1.46s)ctest --preset release -R 'startup_translator|startup_stream_request_warp' --parallel 4 --no-tests=error --output-on-failure): 2/2 passed (1.28s:startup_translator0.15s,startup_stream_request_warp1.22s)Findings
Stage.descriptorintools/startup/gfx2hlsl.pyadds4 * s[3]to the base byte offset whens[2] is not None, resolving upper descriptors inside wide scalar loads (s_load_dwordx16,s_load_dwordx8) to their true table offsets (+32,+0x50) instead of aliasing the load base.pipeline_keyintools/startup/gfx2hlsl.pyandcached_translationinsrc/startup_stubs/d3d12_draw.inlboth seed FNV-1a with the exact 17-byte"x2w-startup-srv-2"revision string (no trailing NUL), invalidating stale translations without modifying legacy cache files.tests/startup_translator_check.py(including its negative control) andtests/startup_stream_check.pycover both behaviors cleanly. No issues found.