shader: lower gfx1013 floating-point truncation #255

Merged
Vonsek merged 5 commits from upstream-pr/258 into main 2026-11-21 20:55:43 +00:00
Vonsek commented 2026-11-21 19:35:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T19:35:21Z.


Change

Lower gfx1013 v_trunc_f32 to HLSL trunc in the straight-line pixel translator. The instruction can use the existing floating-point source modifiers and clamp handling. A truncation write into an unfinished texture sample destination is rejected.

The opcode is distinct from the bitwise and conversion work in #232, the three-input extrema in #169, and the partial-wait implementation in #176. See the AMD RDNA 2 ISA reference, section 12.8 and the HLSL trunc reference.

Verification

Commit 18ece1122e029a8e5ec20adeeb239edf768b364c on upstream c832696c7b9731d2cc77d755608a48b0405a0b7f.

  • cmake --preset dev in the Visual Studio x64 environment with the local venv set as INTAKE_PYTHON, followed by cmake --build --preset dev --target offscreen_check. Configure and build passed.
  • ctest --preset dev --no-tests=error -R '^pixel_aot_(warp|hardware)$' --output-on-failure. Before the implementation, the software test failed on Unsupported instruction 21: v_trunc_f32_e32. With the first lowering in place, moving a truncation write before vmcnt(0) failed the invalid-input check. With the write guard in place, both draw targets passed on the Microsoft Basic Render Driver (WARP 10.0.26100.9818) and the NVIDIA GeForce RTX 5080 (driver 32.0.16.1692). The debug layer was unavailable and neither adapter skipped the check.
  • python -B tests/pixel_aot_check.py binary $asm $objcopy $llvm. Passed with the LLVM 15.0.7 Windows release. The local assembler wrapper invokes clang -cc1as -triple amdgcn--amdpal -target-cpu gfx1013 -filetype obj <source> -o <object>. The remaining arguments are the release's llvm-objcopy.exe and LLVM-C.dll. The normal Ubuntu workflow uses llvm-mc-15.
  • git diff --check c832696 HEAD. Passed.
  • python -B tests/docs_links_check.py and ctest --preset dev --no-tests=error -R '^docs_links$' --output-on-failure. Passed, with 64 links checked across 10 files.

Evidence and follow-up

The MIT-licensed fixture adds original assembly to the repository's synthetic texture and constant-buffer program. Two constant sets compare packed color against the CPU's floating-point integer component for positive and negative fractions, signed zero, e32 and e64 forms, negated absolute input and clamped output. Replacing truncation with floor failed at (0, 0) on both adapters, where red expected -1 and got -2. A separate WARP run with the upper clamp temporarily removed also failed at (0, 0), where alpha expected 1 and got 2. Both fixtures passed with the normal lowering.

A private read-only archive survey found the instruction in 53 of 1,829 pixel programs that independently decoded as straight-line candidates with a single terminator before documented padding. It confirmed that a subsequent multiply-add consumes the truncation result in one candidate. These observations motivate the instruction test. The synthetic fixture verifies desktop lowering under the existing sampling and mask contract. The survey did not verify end-to-end translation of any archive shader.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I documented the new instruction in the README and the offline pixel shader experiment.
  • I did not include game files, dumps, distribution links or secrets.

This contribution was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6533469730 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T19:35:21Z. --- ## Change Lower gfx1013 `v_trunc_f32` to HLSL `trunc` in the straight-line pixel translator. The instruction can use the existing floating-point source modifiers and clamp handling. A truncation write into an unfinished texture sample destination is rejected. The opcode is distinct from the bitwise and conversion work in #232, the three-input extrema in #169, and the partial-wait implementation in #176. See the [AMD RDNA 2 ISA reference, section 12.8](https://docs.amd.com/api/khub/documents/Et~wpu9g~Ffl7d9q0QZ~Og/content) and the [HLSL `trunc` reference](https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-trunc). ## Verification Commit `18ece1122e029a8e5ec20adeeb239edf768b364c` on upstream `c832696c7b9731d2cc77d755608a48b0405a0b7f`. - `cmake --preset dev` in the Visual Studio x64 environment with the local venv set as `INTAKE_PYTHON`, followed by `cmake --build --preset dev --target offscreen_check`. Configure and build passed. - `ctest --preset dev --no-tests=error -R '^pixel_aot_(warp|hardware)$' --output-on-failure`. Before the implementation, the software test failed on `Unsupported instruction 21: v_trunc_f32_e32`. With the first lowering in place, moving a truncation write before `vmcnt(0)` failed the invalid-input check. With the write guard in place, both draw targets passed on the Microsoft Basic Render Driver (WARP 10.0.26100.9818) and the NVIDIA GeForce RTX 5080 (driver 32.0.16.1692). The debug layer was unavailable and neither adapter skipped the check. - `python -B tests/pixel_aot_check.py binary $asm $objcopy $llvm`. Passed with the LLVM 15.0.7 Windows release. The local assembler wrapper invokes `clang -cc1as -triple amdgcn--amdpal -target-cpu gfx1013 -filetype obj <source> -o <object>`. The remaining arguments are the release's `llvm-objcopy.exe` and `LLVM-C.dll`. The normal Ubuntu workflow uses `llvm-mc-15`. - `git diff --check c832696 HEAD`. Passed. - `python -B tests/docs_links_check.py` and `ctest --preset dev --no-tests=error -R '^docs_links$' --output-on-failure`. Passed, with 64 links checked across 10 files. ## Evidence and follow-up The MIT-licensed fixture adds original assembly to the repository's synthetic texture and constant-buffer program. Two constant sets compare packed color against the CPU's floating-point integer component for positive and negative fractions, signed zero, e32 and e64 forms, negated absolute input and clamped output. Replacing truncation with floor failed at (0, 0) on both adapters, where red expected -1 and got -2. A separate WARP run with the upper clamp temporarily removed also failed at (0, 0), where alpha expected 1 and got 2. Both fixtures passed with the normal lowering. A private read-only archive survey found the instruction in 53 of 1,829 pixel programs that independently decoded as straight-line candidates with a single terminator before documented padding. It confirmed that a subsequent multiply-add consumes the truncation result in one candidate. These observations motivate the instruction test. The synthetic fixture verifies desktop lowering under the existing sampling and mask contract. The survey did not verify end-to-end translation of any archive shader. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I documented the new instruction in the README and the offline pixel shader experiment. - [x] I did not include game files, dumps, distribution links or secrets. This contribution was AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:42:05 +00:00
chatgpt-codex-connector[bot commented 2026-11-24 06:42:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T19:46:03Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d27192826

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6007755585 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#pullrequestreview-6007755585). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T19:46:03Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `1d27192826` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". 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". </details>
Vonsek commented 2026-11-24 06:42:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T19:48:33Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6007764580 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#pullrequestreview-6007764580). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T19:48:33Z. **Review:** COMMENTED --- _No description provided._
Vonsek commented 2026-11-24 06:47:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T19:41:22Z.


@codex review

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068205034 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068205034). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T19:41:22Z. --- @codex review
Vonsek commented 2026-11-24 06:47:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T19:48:56Z.


@codex review

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068297659 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068297659). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T19:48:56Z. --- @codex review
chatgpt-codex-connector[bot commented 2026-11-24 06:47:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T19:51:19Z.


Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: ccb4018ba9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068326432 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068326432). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T19:51:19Z. --- <!-- codex-review-receipt:v1 --> Codex Review: Didn't find any major issues. Delightful! **Reviewed commit:** `ccb4018ba9` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". 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". </details>
R0Y00 commented 2026-11-24 06:47:57 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T19:59:27Z.


At ccb4018, tools/pixel_aot.py conflicts with main after #267. Please keep the fract32 lowering alongside the new truncation lowering and outstanding-sample write check. Rerun pixel_aot_warp on the combined head.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068423108 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068423108). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T19:59:27Z. --- At `ccb4018`, `tools/pixel_aot.py` conflicts with main after #267. Please keep the `fract32` lowering alongside the new truncation lowering and outstanding-sample write check. Rerun `pixel_aot_warp` on the combined head.
Vonsek commented 2026-11-24 06:47:58 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T20:07:42Z.


@codex review

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068524766 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068524766). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T20:07:42Z. --- @codex review
chatgpt-codex-connector[bot commented 2026-11-24 06:47:58 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T20:10:01Z.


Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 9e5e4dede7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068552934 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068552934). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T20:10:01Z. --- <!-- codex-review-receipt:v1 --> Codex Review: Didn't find any major issues. Nice work! **Reviewed commit:** `9e5e4dede7` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". 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". </details>
R0Y00 commented 2026-11-24 06:47:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T20:28:05Z.


At 9e5e4de, Git reports conflicts in README.md, tests/pixel_aot_check.py and tools/pixel_aot.py. #273 now guards every floating-point arithmetic destination against pending samples, so truncation can reuse that guard. Please preserve #277's single-word loads and both sets of draw controls.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068773210 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068773210). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T20:28:05Z. --- At `9e5e4de`, Git reports conflicts in `README.md`, `tests/pixel_aot_check.py` and `tools/pixel_aot.py`. #273 now guards every floating-point arithmetic destination against pending samples, so truncation can reuse that guard. Please preserve #277's single-word loads and both sets of draw controls.
Vonsek commented 2026-11-24 06:47:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T20:32:52Z.


@codex review

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068831211 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068831211). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T20:32:52Z. --- @codex review
chatgpt-codex-connector[bot commented 2026-11-24 06:47:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T20:35:48Z.


Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 18ece1122e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068867682 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068867682). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T20:35:48Z. --- <!-- codex-review-receipt:v1 --> Codex Review: Didn't find any major issues. Delightful! **Reviewed commit:** `18ece1122e` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". 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". </details>
chatgpt-codex-connector[bot commented 2026-11-24 06:47:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T19:35:34Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T20:35:49.629611Z 18ece11 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7068133245 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#issuecomment-7068133245). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T19:35:34Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"18ece1122e029a8e5ec20adeeb239edf768b364c","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-21T20:35:49.629611Z">2026-11-21T20:35:49.629611Z</relative-time> | `18ece11` | Manual request | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
chatgpt-codex-connector[bot commented 2026-11-24 06:50:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T19:46:03Z.

Code review location: tools/pixel_aot.py; line 123

@@ -120,7 +120,7 @@ def registers(first, last, count):
 ALU = {
     "log": (1, "log2({0})"), "exp": (1, "exp2({0})"), "rcp": (1, "(1.0f / {0})"),
     "sqrt": (1, "sqrt({0})"), "rsq": (1, "rsqrt({0})"),
-    "floor": (1, "floor({0})"), "fract": (1, "frac({0})"),
+    "floor": (1, "floor({0})"), "fract": (1, "frac({0})"), "trunc": (1, "trunc({0})"),

P1 Badge Document the newly supported truncation capability

Accepting v_trunc_f32 adds a public translation capability, but this commit updates neither the relevant README row nor docs/experiments.md. Root AGENTS.md explicitly requires a documentation update when public capabilities change. Record the new instruction support and the truncation fixture’s measured coverage in the shader capability documentation so contributors can discover the supported behavior and its evidence outside the commit message.

AGENTS.md reference: AGENTS.md:L145-L146

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4654650189 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#discussion_r4654650189). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T19:46:03Z. **Code review location:** `tools/pixel_aot.py`; line 123 ~~~~diff @@ -120,7 +120,7 @@ def registers(first, last, count): ALU = { "log": (1, "log2({0})"), "exp": (1, "exp2({0})"), "rcp": (1, "(1.0f / {0})"), "sqrt": (1, "sqrt({0})"), "rsq": (1, "rsqrt({0})"), - "floor": (1, "floor({0})"), "fract": (1, "frac({0})"), + "floor": (1, "floor({0})"), "fract": (1, "frac({0})"), "trunc": (1, "trunc({0})"), ~~~~ --- **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Document the newly supported truncation capability** Accepting `v_trunc_f32` adds a public translation capability, but this commit updates neither the relevant README row nor `docs/experiments.md`. Root `AGENTS.md` explicitly requires a documentation update when public capabilities change. Record the new instruction support and the truncation fixture’s measured coverage in the shader capability documentation so contributors can discover the supported behavior and its evidence outside the commit message. AGENTS.md reference: [AGENTS.md:L145-L146](https://github.com/R0Y00/Xbox2Windows/blob/1d27192826ef57741a718e0c3cab5b6503208f2c/AGENTS.md#L145-L146) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Vonsek commented 2026-11-24 06:50:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T19:48:33Z.

Code review location: tools/pixel_aot.py; line 123

@@ -120,7 +120,7 @@ def registers(first, last, count):
 ALU = {
     "log": (1, "log2({0})"), "exp": (1, "exp2({0})"), "rcp": (1, "(1.0f / {0})"),
     "sqrt": (1, "sqrt({0})"), "rsq": (1, "rsqrt({0})"),
-    "floor": (1, "floor({0})"), "fract": (1, "frac({0})"),
+    "floor": (1, "floor({0})"), "fract": (1, "frac({0})"), "trunc": (1, "trunc({0})"),

Updated the README shader row and the offline pixel shader experiment in ccb4018. The experiment describes the instruction forms, exact synthetic readback coverage, floor and clamp controls, and the desktop pipeline scope. The existing LLVM and CTest commands reproduce the fixture. The standalone link check and the dev docs_links target passed. Experiment documentation

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4654658777 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/258#discussion_r4654658777). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T19:48:33Z. **Code review location:** `tools/pixel_aot.py`; line 123 ~~~~diff @@ -120,7 +120,7 @@ def registers(first, last, count): ALU = { "log": (1, "log2({0})"), "exp": (1, "exp2({0})"), "rcp": (1, "(1.0f / {0})"), "sqrt": (1, "sqrt({0})"), "rsq": (1, "rsqrt({0})"), - "floor": (1, "floor({0})"), "fract": (1, "frac({0})"), + "floor": (1, "floor({0})"), "fract": (1, "frac({0})"), "trunc": (1, "trunc({0})"), ~~~~ --- Updated the README shader row and the offline pixel shader experiment in ccb4018. The experiment describes the instruction forms, exact synthetic readback coverage, floor and clamp controls, and the desktop pipeline scope. The existing LLVM and CTest commands reproduce the fixture. The standalone link check and the dev `docs_links` target passed. [Experiment documentation](https://github.com/R0Y00/Xbox2Windows/blob/ccb4018ba90917f5e599e44d2954c12fbf8cd7ff/docs/experiments.md#offline-pixel-shader-recompilation)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!255
No description provided.