startup: lower the binary16 class comparison #1849

Closed
triggered02 wants to merge 1 commit from upstream-pr/1856 into main
triggered02 commented 2026-11-24 19:39:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T19:39:27Z.


Fixes #1855. Found in the refusal census (#870). 1 refused shader:

v_cmp_class_f16_e64 s14, 0x7c01, v0    -> REFUSED: v_cmp_class_f16

Problem

The binary16 class comparison had no lowering. The binary32 form is handled by the class-compare branch (PR #1798), but the half form needs a different helper: the value is the raw binary16 bit pattern in the low half of the operand word, the ten class bits follow the half format (exponent 5 bits, mantissa 10, quiet bit 0x0200), and an abs/neg modifier acts on bit 15 rather than bit 31.

Fix

tools/pixel_aot.py already carried the binary16 helper; it is ported into Pipeline.common() as class16, and the class-compare branch dispatches on the mnemonic:

if base in ('v_cmp_class_f32', 'v_cmpx_class_f32', 'v_cmp_class_f16', 'v_cmpx_class_f16'):
    f16 = base.endswith('_f16')
...
    cond = '(class16(%s) & %s) != 0u' % (bits, self.u(mask))   # f16

Measured on the branch:

form before after
v_cmp_class_f16_e64 s14, 0x7c01, v0 refused s14 = (((class16(0x00007c01u) & v0) != 0u) ? 1u : 0u);
v_cmpx_class_f16_e64 vcc_lo, v0, -1 refused exec = (((class16(v0) & 0xffffffffu) != 0u) ? 1u : 0u);
v_cmpx_class_f16_e32 v0, v5 refused exec = (((class16(v0) & v5) != 0u) ? 1u : 0u);

The abs/neg modifier forms lower to class16((v0 & 0x7fffu)) and class16((v0 ^ 0x8000u)). A float-printed operand is refused by name, because it would otherwise be lowered as its binary32 bit pattern.

Test

startup_gfx2hlsl_cmp_class_f16 builds VOPC-in-VOP3 encodings from the checked-in decoder's layout, decodes them, then translates. Ten checks: the census form, both exec-mask shapes, the abs/neg handling on bit 15, the float-operand refusal, and — value-level — a Python binary16 classifier (written from the IEEE half layout) compared against the emitted helper body evaluated over all 65,536 binary16 patterns.

dev:     3/3 (cmp_class, cmp_class_f16, startup_translator)
release: startup_gfx2hlsl_cmp_class_f16 Passed 3.18 s

Fail-first, three genuine class-bit mutations (all fail the value-level check while the text checks pass):

swap -inf/+inf bits        -> FAIL
swap quiet/signaling NaN   -> FAIL
swap -subnormal/+subnormal -> FAIL

Depends on #1798

This branch is based on startup/cmp-class (#1798) because the class-compare branch and class32 helper are not on main yet. Merge #1798 first; after that this PR's diff is only the class16 helper, the mnemonic dispatch and the new test.

What this does not establish

  • That the emitted HLSL compiles or computes the right predicate on a device — the test compares values from the emitted text; DXC/WARP were not run here.
  • v_cmp_class_f64 and the arithmetic/compare f16 forms that are not class comparisons are out of scope.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6589900973 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1856). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T19:39:27Z. --- Fixes #1855. Found in the refusal census (#870). **1** refused shader: ``` v_cmp_class_f16_e64 s14, 0x7c01, v0 -> REFUSED: v_cmp_class_f16 ``` ## Problem The binary16 class comparison had no lowering. The binary32 form is handled by the class-compare branch (PR #1798), but the half form needs a different helper: the value is the raw binary16 bit pattern in the low half of the operand word, the ten class bits follow the half format (exponent 5 bits, mantissa 10, quiet bit 0x0200), and an `abs`/`neg` modifier acts on bit 15 rather than bit 31. ## Fix `tools/pixel_aot.py` already carried the binary16 helper; it is ported into `Pipeline.common()` as `class16`, and the class-compare branch dispatches on the mnemonic: ```python if base in ('v_cmp_class_f32', 'v_cmpx_class_f32', 'v_cmp_class_f16', 'v_cmpx_class_f16'): f16 = base.endswith('_f16') ... cond = '(class16(%s) & %s) != 0u' % (bits, self.u(mask)) # f16 ``` Measured on the branch: | form | before | after | |---|---|---| | `v_cmp_class_f16_e64 s14, 0x7c01, v0` | refused | `s14 = (((class16(0x00007c01u) & v0) != 0u) ? 1u : 0u);` | | `v_cmpx_class_f16_e64 vcc_lo, v0, -1` | refused | `exec = (((class16(v0) & 0xffffffffu) != 0u) ? 1u : 0u);` | | `v_cmpx_class_f16_e32 v0, v5` | refused | `exec = (((class16(v0) & v5) != 0u) ? 1u : 0u);` | The `abs`/`neg` modifier forms lower to `class16((v0 & 0x7fffu))` and `class16((v0 ^ 0x8000u))`. A **float-printed** operand is refused by name, because it would otherwise be lowered as its binary32 bit pattern. ## Test `startup_gfx2hlsl_cmp_class_f16` builds VOPC-in-VOP3 encodings from the checked-in decoder's layout, decodes them, then translates. Ten checks: the census form, both exec-mask shapes, the `abs`/`neg` handling on bit 15, the float-operand refusal, and — value-level — a Python binary16 classifier (written from the IEEE half layout) compared against the **emitted helper body evaluated over all 65,536 binary16 patterns**. ``` dev: 3/3 (cmp_class, cmp_class_f16, startup_translator) release: startup_gfx2hlsl_cmp_class_f16 Passed 3.18 s ``` Fail-first, three genuine class-bit mutations (all fail the value-level check while the text checks pass): ``` swap -inf/+inf bits -> FAIL swap quiet/signaling NaN -> FAIL swap -subnormal/+subnormal -> FAIL ``` ## Depends on #1798 This branch is based on `startup/cmp-class` (#1798) because the class-compare branch and `class32` helper are not on `main` yet. **Merge #1798 first**; after that this PR's diff is only the `class16` helper, the mnemonic dispatch and the new test. ## What this does not establish - That the emitted HLSL compiles or computes the right predicate on a device — the test compares values from the emitted text; DXC/WARP were not run here. - `v_cmp_class_f64` and the arithmetic/compare f16 forms that are not class comparisons are out of scope. AI-assisted (Claude Code).
chatgpt-codex-connector[bot commented 2026-11-24 20:01:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T19:45:49Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7187e51d48

ℹ️ 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:6046192242 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1856#pullrequestreview-6046192242). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T19:45:49Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `7187e51d48` <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>
tedin7 commented 2026-11-24 20:01:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T19:51:04Z.

Review: COMMENTED


Review of head 7187e51d483bab89ae0d671c091567968feee431.

Verdict: 0 P1 / 0 P2. The lowering matches the RDNA 2 class-compare semantics as I read them. Comment only, not an approval.

Linux limits. Linux x86_64, Python 3. No Windows, no DXC, no GPU. I ran the Python checks directly; I did not configure CMake, so the two new add_test lines (startup_gfx2hlsl_cmp_class, startup_gfx2hlsl_cmp_class_f16) were not executed through ctest. Nothing here compiled the emitted HLSL; the helper agreement checks use the checks' own Python model of it.

What I checked

  • ISA class bits, in encoding order: sNaN, qNaN, -inf, -normal, -denormal, -0, +0, +denormal, +normal, +inf = 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200. Both class32 and class16 return exactly these. The quiet bit is 0x00400000 (binary32) and 0x0200 (binary16). The thresholds (0x00800000 / 0x0400 for normal) and the infinity/NaN cut (0x7f800000 / 0x7c00) are right.
  • Operand order is value first, mask second. The mask goes through self.u, so -1 becomes 0xffffffffu.
  • The _e32 v_cmpx_ spelling (2 operands, implicit EXEC) is handled. Other operand counts raise Unsupported.
  • For binary16 the value is read as raw bits, neg XORs 0x8000 and abs ANDs 0x7fff, and a float-printed operand (1.0, -0.5, ...) is refused. The refusal is the safe choice, because a float literal would otherwise be lowered as binary32 bits.
  • When EXEC is not known to be full, the predicate is intersected with it, as the generic compare path does; a v_cmpx_ form clears exec_known.

What I ran at this SHA (worktree at the exact head, git status clean after every mutation)

  • python3 -B tests/startup_gfx2hlsl_cmp_class_check.py: PASS (helper agrees with the binary32 classifier on 68626 patterns).
  • python3 -B tests/startup_gfx2hlsl_cmp_class_f16_check.py: PASS (all 65536 binary16 patterns).
  • All 11 neighbouring tests/startup_gfx2hlsl_*_check.py scripts: exit 0.
  • tests/docs_links_check.py (17 files, 367 links), tests/bidi_controls_check.py (1309 files), git diff --check origin/main...HEAD: clean.
  • Mutations in tools/startup/gfx2hlsl.py, each followed by both checks and then git checkout -- .. Every one was caught by at least one check:
Mutation f32 check f16 check
f32 sNaN/qNaN result swapped fail pass
f32 -inf/+inf swapped fail pass
f16 normal threshold >= to > pass fail
f16 neg XORs bit 31 pass fail
f16 abs masks 0x7fffffff pass fail
EXEC intersection removed fail pass
v_cmpx_ keeps exec_known fail fail
f16 float operand allowed pass fail
mask read as float fail pass

Findings (non-blocking)

  1. P3, stacking: this branch carries the whole binary32 change (the class32 helper, its test, its docs paragraph, its CMake entry), which is also the content of open #1798. Whichever lands second will conflict or duplicate. The title and the Fixes #1855 line name only binary16. Please land #1798 first and rebase, or say here that this PR supersedes it.
  2. P3, modifiers: compare() is called as self.compare(base, ops), so trailing modifiers (clamp, op_sel:[...]) are dropped silently for the class forms. That is also true of the existing generic compare, so it is not new, and I did not find a census form that prints one. #1778 ("refuse a modifier for handlers that do not model one") looks like the right place to cover this; it would be worth checking that it reaches compare once both are merged.
  3. P3, evidence: the checks encode the instruction bytes by hand from the decoder's field layout, and the helper is tested against a Python model. Neither confirms HLSL compilation or the draw result. That is the same footing as the neighbouring startup lowering checks.

Not run here: ctest, DXC compile of the emitted shader, any Windows or GPU run.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6046271720 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1856#pullrequestreview-6046271720). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T19:51:04Z. **Review:** COMMENTED --- Review of head `7187e51d483bab89ae0d671c091567968feee431`. **Verdict: 0 P1 / 0 P2.** The lowering matches the RDNA 2 class-compare semantics as I read them. Comment only, not an approval. **Linux limits.** Linux x86_64, Python 3. No Windows, no DXC, no GPU. I ran the Python checks directly; I did not configure CMake, so the two new `add_test` lines (`startup_gfx2hlsl_cmp_class`, `startup_gfx2hlsl_cmp_class_f16`) were not executed through ctest. Nothing here compiled the emitted HLSL; the helper agreement checks use the checks' own Python model of it. **What I checked** - ISA class bits, in encoding order: sNaN, qNaN, -inf, -normal, -denormal, -0, +0, +denormal, +normal, +inf = 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200. Both `class32` and `class16` return exactly these. The quiet bit is 0x00400000 (binary32) and 0x0200 (binary16). The thresholds (0x00800000 / 0x0400 for normal) and the infinity/NaN cut (0x7f800000 / 0x7c00) are right. - Operand order is value first, mask second. The mask goes through `self.u`, so `-1` becomes `0xffffffffu`. - The `_e32` `v_cmpx_` spelling (2 operands, implicit EXEC) is handled. Other operand counts raise `Unsupported`. - For binary16 the value is read as raw bits, `neg` XORs 0x8000 and `abs` ANDs 0x7fff, and a float-printed operand (`1.0`, `-0.5`, ...) is refused. The refusal is the safe choice, because a float literal would otherwise be lowered as binary32 bits. - When EXEC is not known to be full, the predicate is intersected with it, as the generic compare path does; a `v_cmpx_` form clears `exec_known`. **What I ran at this SHA** (worktree at the exact head, `git status` clean after every mutation) - `python3 -B tests/startup_gfx2hlsl_cmp_class_check.py`: PASS (helper agrees with the binary32 classifier on 68626 patterns). - `python3 -B tests/startup_gfx2hlsl_cmp_class_f16_check.py`: PASS (all 65536 binary16 patterns). - All 11 neighbouring `tests/startup_gfx2hlsl_*_check.py` scripts: exit 0. - `tests/docs_links_check.py` (17 files, 367 links), `tests/bidi_controls_check.py` (1309 files), `git diff --check origin/main...HEAD`: clean. - Mutations in `tools/startup/gfx2hlsl.py`, each followed by both checks and then `git checkout -- .`. Every one was caught by at least one check: | Mutation | f32 check | f16 check | |---|---|---| | f32 sNaN/qNaN result swapped | fail | pass | | f32 -inf/+inf swapped | fail | pass | | f16 normal threshold `>=` to `>` | pass | fail | | f16 `neg` XORs bit 31 | pass | fail | | f16 `abs` masks 0x7fffffff | pass | fail | | EXEC intersection removed | fail | pass | | `v_cmpx_` keeps `exec_known` | fail | fail | | f16 float operand allowed | pass | fail | | mask read as float | fail | pass | **Findings (non-blocking)** 1. P3, stacking: this branch carries the whole binary32 change (the `class32` helper, its test, its docs paragraph, its CMake entry), which is also the content of open #1798. Whichever lands second will conflict or duplicate. The title and the `Fixes #1855` line name only binary16. Please land #1798 first and rebase, or say here that this PR supersedes it. 2. P3, modifiers: `compare()` is called as `self.compare(base, ops)`, so trailing modifiers (`clamp`, `op_sel:[...]`) are dropped silently for the class forms. That is also true of the existing generic compare, so it is not new, and I did not find a census form that prints one. #1778 ("refuse a modifier for handlers that do not model one") looks like the right place to cover this; it would be worth checking that it reaches `compare` once both are merged. 3. P3, evidence: the checks encode the instruction bytes by hand from the decoder's field layout, and the helper is tested against a Python model. Neither confirms HLSL compilation or the draw result. That is the same footing as the neighbouring startup lowering checks. Not run here: ctest, DXC compile of the emitted shader, any Windows or GPU run. AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-24 20:01:20 +00:00 (Migrated from github.com)

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


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-24T19:45:52.202076Z 7187e51 PR opened
ℹ️ 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:7142410930 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1856#issuecomment-7142410930). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T19:39:39Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"7187e51d483bab89ae0d671c091567968feee431","has_any_findings":true,"has_unresolved_findings":true,"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-24T19:45:52.202076Z">2026-11-24T19:45:52.202076Z</relative-time> | `7187e51` | PR opened | <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 20:01:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T19:45:49Z.

Code review location: tools/startup/gfx2hlsl.py; line 985

@@ -959,6 +959,51 @@ def op_v_cvt_pkrtz_f16_f32(self, ops, mods):
         self.set_v(reg_range(ops[0])[1], 'f32tof16(%s) | (f32tof16(%s) << 16)' % (self.f(ops[1]), self.f(ops[2])))
 
     def compare(self, base, ops):
+        # v_cmp_class_f32 / v_cmpx_class_f32 test the binary32 class of the value in SRC0 against the
+        # class-bit mask in SRC1 (the ISA order: the float operand first, the integer mask second).
+        if base in ('v_cmp_class_f32', 'v_cmpx_class_f32', 'v_cmp_class_f16', 'v_cmpx_class_f16'):
+            f16 = base.endswith('_f16')
+            if len(ops) == 3:
+                dst, value, mask = ops
+            elif base.startswith('v_cmpx_') and len(ops) == 2:
+                # The _e32 spelling writes EXEC implicitly and prints no destination.
+                dst, (value, mask) = 'exec', ops
+            else:
+                raise Unsupported('%s with %d operands' % (base, len(ops)))
+            if f16:
+                # The helper classifies the raw binary16 bits in the low half of the word, so the value is
+                # read as an integer and an abs/neg modifier flips bit 15 (not 31). A float-printed
+                # operand would be lowered as its binary32 bits, so it is refused instead.
+                operand = value
+                if operand.startswith('-') and not re.match(r'-[\d.]', operand):
+                    operand = operand[1:]
+                elif operand.startswith('|') and operand.endswith('|'):
+                    operand = operand[1:-1]
+                if operand in FLOATS or re.fullmatch(r'-?\d+\.\d+', operand):
+                    raise Unsupported('binary16 class operand %s' % value)
+                bits = self.u(operand)
+                if value.startswith('-') and not re.match(r'-[\d.]', value):

P2 Badge Preserve NEG on immediate class operands

When a VOP3 class compare applies NEG to an immediate, the lowering can lose the sign because it infers modifiers from the printed token: for f16, literal 0x7c00 becomes -0x7c00, but this check treats the leading -0 as a numeric sign and skips the XOR, so class16 sees 0x8400 (negative normal) instead of 0xfc00 (-inf). The f32 arm likewise turns a negated inline zero (-0) into positive zero through self.f. Masks distinguishing those classes therefore produce wrong predicates; preserve the encoded modifier or refuse these numeric forms.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4685591936 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1856#discussion_r4685591936). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T19:45:49Z. **Code review location:** `tools/startup/gfx2hlsl.py`; line 985 ~~~~diff @@ -959,6 +959,51 @@ def op_v_cvt_pkrtz_f16_f32(self, ops, mods): self.set_v(reg_range(ops[0])[1], 'f32tof16(%s) | (f32tof16(%s) << 16)' % (self.f(ops[1]), self.f(ops[2]))) def compare(self, base, ops): + # v_cmp_class_f32 / v_cmpx_class_f32 test the binary32 class of the value in SRC0 against the + # class-bit mask in SRC1 (the ISA order: the float operand first, the integer mask second). + if base in ('v_cmp_class_f32', 'v_cmpx_class_f32', 'v_cmp_class_f16', 'v_cmpx_class_f16'): + f16 = base.endswith('_f16') + if len(ops) == 3: + dst, value, mask = ops + elif base.startswith('v_cmpx_') and len(ops) == 2: + # The _e32 spelling writes EXEC implicitly and prints no destination. + dst, (value, mask) = 'exec', ops + else: + raise Unsupported('%s with %d operands' % (base, len(ops))) + if f16: + # The helper classifies the raw binary16 bits in the low half of the word, so the value is + # read as an integer and an abs/neg modifier flips bit 15 (not 31). A float-printed + # operand would be lowered as its binary32 bits, so it is refused instead. + operand = value + if operand.startswith('-') and not re.match(r'-[\d.]', operand): + operand = operand[1:] + elif operand.startswith('|') and operand.endswith('|'): + operand = operand[1:-1] + if operand in FLOATS or re.fullmatch(r'-?\d+\.\d+', operand): + raise Unsupported('binary16 class operand %s' % value) + bits = self.u(operand) + if value.startswith('-') and not re.match(r'-[\d.]', value): ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Preserve NEG on immediate class operands** When a VOP3 class compare applies NEG to an immediate, the lowering can lose the sign because it infers modifiers from the printed token: for f16, literal `0x7c00` becomes `-0x7c00`, but this check treats the leading `-0` as a numeric sign and skips the XOR, so `class16` sees `0x8400` (negative normal) instead of `0xfc00` (-inf). The f32 arm likewise turns a negated inline zero (`-0`) into positive zero through `self.f`. Masks distinguishing those classes therefore produce wrong predicates; preserve the encoded modifier or refuse these numeric forms. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
tedin7 commented 2026-11-25 13:01:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T12:53:40Z.


@triggered02 could you rebase this branch onto current main and force-push?

GitHub reports head 7187e51d as conflicting with main, so it cannot be merged as is.

Files that conflict with current main (cf97bee1):

  • CMakeLists.txt
  • docs/experiments.md
  • tests/startup_gfx2hlsl_cmp_class_f16_check.py
  • tools/startup/gfx2hlsl.py

Commands run locally:

git fetch origin main pull/1856/head
git merge-tree --write-tree --name-only origin/main FETCH_HEAD
gh pr view 1856 --json mergeable   # CONFLICTING

Once it is rebased and CI is green it will be re-checked right away.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7163003706 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1856#issuecomment-7163003706). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T12:53:40Z. --- @triggered02 could you rebase this branch onto current `main` and force-push? GitHub reports head `7187e51d` as conflicting with `main`, so it cannot be merged as is. Files that conflict with current `main` (`cf97bee1`): - `CMakeLists.txt` - `docs/experiments.md` - `tests/startup_gfx2hlsl_cmp_class_f16_check.py` - `tools/startup/gfx2hlsl.py` Commands run locally: ``` git fetch origin main pull/1856/head git merge-tree --write-tree --name-only origin/main FETCH_HEAD gh pr view 1856 --json mergeable # CONFLICTING ``` Once it is rebased and CI is green it will be re-checked right away. AI-assisted; commands listed were executed locally.
upstream-sync closed this pull request 2026-11-25 14:04:18 +00:00
triggered02 commented 2026-11-25 14:05:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-25T13:22:29Z.


Closing: this content is already on main. I checked origin/main and it has the class16 helper, the v_cmp_class_f16/v_cmpx_class_f16 dispatch inside the class branch (with the base.startswith('v_cmpx_') shape) and tests/startup_gfx2hlsl_cmp_class_f16_check.py — i.e. the branch was integrated directly rather than through this PR, which is why the PR still showed as conflicting.

For the record, the substance of the branch is in main:

  • uint class16(uint bits) with the ten binary16 class bits and the quiet bit at 0x0200,
  • the value read as raw binary16 bits in the low half of the word (abs/neg acting on bit 15),
  • a float-printed operand refused by name,
  • and the value-level test that evaluates the emitted helper over all 65,536 binary16 patterns against a Python classifier, which is what caught the three class-bit mutations.

Nothing more to do here; thanks for integrating it.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7163683840 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1856#issuecomment-7163683840). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-25T13:22:29Z. --- Closing: this content is already on `main`. I checked `origin/main` and it has the `class16` helper, the `v_cmp_class_f16`/`v_cmpx_class_f16` dispatch inside the class branch (with the `base.startswith('v_cmpx_')` shape) and `tests/startup_gfx2hlsl_cmp_class_f16_check.py` — i.e. the branch was integrated directly rather than through this PR, which is why the PR still showed as conflicting. For the record, the substance of the branch is in `main`: - `uint class16(uint bits)` with the ten binary16 class bits and the quiet bit at 0x0200, - the value read as raw binary16 bits in the low half of the word (`abs`/`neg` acting on bit 15), - a float-printed operand refused by name, - and the value-level test that evaluates the emitted helper over all 65,536 binary16 patterns against a Python classifier, which is what caught the three class-bit mutations. Nothing more to do here; thanks for integrating it. AI-assisted (Claude Code).

Pull request closed

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!1849
No description provided.