shader: select a named record by decoded container SHA-256 #291
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/295"
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 Vonsek on 2026-11-21T21:09:29Z.
Change
Add
--container-sha256to the offlinetools/pixel_aot.pyCLI. The selector requires one record matching the exact name and the SHA-256 of its full decoded DXBC container. Name-only lookup keeps the existing duplicate rejection. A repeated matching digest remains ambiguous. This lets contributors distinguish two records that carry identical native instructions but different container metadata.The CLI and Python lookup are the only interfaces changed. The offline pixel shader instructions show how to export and hash the desired DXBC with the existing extractor.
Verification
Tested
112b6f0e1e14c9d299342983988d006b000481ddon x64 Windows build 26200.9974. A clean Visual Studio development-shell configure and build ofoffscreen_checksucceeded. The hardware adapter was an RTX 5080 (driver 32.0.16.1692), and the software adapter was WARP 10.0.26100.9818. The debug layer was unavailable on both.All five CTests passed, with no capability skips. The bidi check and Git whitespace check passed.
The control on the original implementation raised
TypeError: native_program() got an unexpected keyword argument 'container_sha256'. The updated fixture and CLI passed. The Windows assembler wrapper forwards the input, output and file mode toclang -cc1as -triple amdgcn--amdpal -target-cpu gfx1013 -filetype obj.Evidence and follow-up
The original MIT-licensed regression assembles the repository shader and wraps its bytes in two source-built DXBC records with identical names and different
PRIVbytes. It checks both container digests through the normal CLI and verifies the selected container digest, common native digest and HLSL. The test also covers ambiguous and incorrect digests, a match after 257 same-name candidates, malformed outer frames in both orders and across a claimed extent, and reporting the selected record's nested checksum failure. The documented extractor command produced two separate synthetic DXBC files and each file's digest selected its exact bytes.A private read-only archive check found two physical records sharing one name and one native program. Both distinct decoded-container hashes selected their respective records using the normal CLI on the original archive. Both translated to identical HLSL and passed
dxc -Gis -WX -T ps_6_0 -E mainwith zero diagnostics. Default lookup rejected the name as ambiguous and the shared native digest failed as a container selector. The archive's SHA-256 was unchanged and temporary outputs were removed. The public fixture verifies the selection behavior without the local archive. Resource binding and draw behavior for those two records remain unverified.This contribution was AI-assisted.
Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:09:43Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
112b6f0ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T21:17:26Z.
At
112b6f0, two distinct decoded DXBC digests independently selected two same-name records directly from the read-only local archive. Their declared texture and sampler slots differ, but both contain the same 25-instruction native program. Each selection compiled with DXC and matched an independent CPU reference bitwise for all 4,096 pixels and 16,384 color channels on WARP 10.0.26100.9818 and RTX 5080 (32.0.16.1692). A transposed-UV reference failed first at(8, 0)and a red/blue-swapped reference at(0, 0), as predicted on both adapters. The draw used the repository’s synthetic fullscreen, point-clamp, one-mip fixture. The original binding layouts and resources remain unverified. The archive hash was unchanged.