shader: lower RGB-only pixel texture samples #298
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/303"
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:34:24Z.
Change
Support the entry-mask gfx1013 2D
image_sampleRGB form,dmask:0x7, intools/pixel_aot.py. The masked sample fills exactly three vector registers. The fourth register stays available, including while the sample is outstanding. Existing sample-count and execution-mask checks still apply.Verification
Tested
09812d3on Windows 26200.9974 with WARP 10.0.26100.9818 and RTX 5080 driver 32.0.16.1692. The renderer reported the debug layer unavailable on both adapters.All five CTests passed without capability skips. The bidi and whitespace checks passed.
The source-built fixture fails on
b53bfb0at instruction 16 with an unsupportedimage_samplediagnostic. The LLVM round trip passes with this change. The normaltools/pixel_aot.pyCLI also extracts the same 22-instruction synthetic record and emits identical HLSL. The Windows assembler wrapper invokesclang -cc1as -triple amdgcn--amdpal -target-cpu gfx1013 -filetype obj.Capability-skip verification
At
3c4b1c0, the RGB fixture runs after the draw that propagates capability skips. Using a stub compiler that exits 0 and a stub renderer that exits 77,python -B tests/pixel_aot_check.py draw <stub-compiler> <stub-renderer> hardwarenow exits 77. CTest reports the case as skipped withSKIP_RETURN_CODE 77. The real WARP and hardware pixel tests anddocs_linkspassed again.Evidence and follow-up
The MIT-licensed test builds from the repository's handwritten texture-copy shader. It presets the register next to the RGB destination to 0.5 and exports that value as alpha. The draw matches the independent CPU reference bitwise for all 4,096 pixels and 16,384 color channels on both adapters. Expecting the texture's alpha of 1.0 instead yields the first mismatch at (0, 0). Controls reject a wrong destination width, a different data mask and an overwrite of a pending RGB result.
The isolated RGB behavior is separate from the partial VM waits in #176 and the affine coordinate work in #283. The surveyed multi-sample program still encounters an earlier whole-quad sample rejection. Reproduction steps
This contribution was AI-assisted.
Checklist
Upstream merge verification
Merged upstream through
6ee2406at3393ef8. The integrated fixture retains the RGB case and the merged scalar ALU, literal FMA and half conversion checks. LLVM 15 binary, bidi and whitespace checks passed. Reconfigured the dev preset and ran:All seven checks passed on the available adapters without skips. The newly merged half-conversion fixture introduced a separate no-adapter ordering regression on main. Its fix and simulated skip evidence are in #322.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:36:57Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
09812d3c8dℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T21:39:23Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T21:41:45Z.
@codex review
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:44:21Z.
Codex Review: Didn't find any major issues. You're on a roll.
Reviewed commit:
3c4b1c02c6ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T21:58:28Z.
At
3c4b1c0the merge conflicts are inREADME.md,tests/pixel_aot_check.py. Preserve RGB and RGBA sample controls alongside the existing single-mip tests. Please also update scanner recognition fordmask:0x7so the PSO report can reach the lowerer.Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T22:08:11Z.
@codex review
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T22:11:26Z.
Codex Review: Didn't find any major issues. Keep it up!
Reviewed commit:
3393ef8dd3ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:34:36Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
3393ef8ℹ️ 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 R0Y00 on 2026-11-22T02:56:22Z.
A test merge of
3393ef8against main conflicts inREADME.mdandtests/pixel_aot_check.py. Keep the RGB fixture in the LLVM list alongsideaffine_coordinates()and the MAD controls. Please refresh the branch and rerun the relevant fixture and Windows CI.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:36:58Z.
Code review location:
tests/pixel_aot_check.py; line 851On a Windows host without a D3D12-capable hardware adapter,
offscreen_checkreturns 77 (tests/offscreen_check.cpp:396–398). The new RGB check runs before the skip-aware draw incheck_render(), so thischeck=Trueraises an uncaughtCalledProcessError, changing the Python exit code from 77 to 1. Consequently,pixel_aot_hardwarefails instead of skipping despiteSKIP_RETURN_CODE 77inCMakeLists.txt:902—the property CMake documents as “Return code to mark a test as skipped.” Propagate 77 to the script's exit status, or run this check after the initial skip-aware draw, preserving the distinction between skips and failures required byAGENTS.md.AGENTS.md reference: AGENTS.md:L87-L89
Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T21:39:23Z.
Code review location:
tests/pixel_aot_check.py; line 851Moved the RGB fixture after the existing capability-aware draws in
3c4b1c0. I reproduced the original failure by making the renderer return 77. The draw command now exits with 77 and reaches only the initial capability-aware draw. The real pixel CTests pass on WARP and RTX 5080.