startup: lower buffer_load_format_x/xy/xyz with the format from the buffer descriptor #2130

Merged
tedin7 merged 18 commits from upstream-pr/2138 into main 2026-11-25 14:30:36 +00:00
tedin7 commented 2026-11-25 01:27:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:27:59Z.


Part of #2023

What this unblocks: buffer_load_format_x/_xy/_xyz with the format taken from word 3 of the buffer descriptor (item B, about 520 pipeline requests), so those vertex and pixel stages translate instead of being refused.

Changes:

  • tools/startup/gfx2hlsl.py: the three loads read descriptor word 3 as the entry constant descword3. The body switches on FORMAT (bits 12 to 18) over every entry of the existing FETCH_FORMATS table, then DST_SEL (bits 0 to 11) picks a component, 0 or 1 for each destination register. buffer_load_format_xyzw stays refused. A FORMAT outside the table decodes as zeros (documented assumption).
  • src/startup_stubs/d3d12_draw.inl: new manifest source descword3; the draw fills it from word 3 of a hardware buffer descriptor and passes 0 for other buffer bindings.
  • tests/startup_vertex_fetch_formats_check.py (existing _controls / _warp / _hardware tests, no new CMake entry): each of the 12 formats through a source-built MUBUF xyz load with its own descriptor word, swizzled words (swapped pair, constants 0 and 1, integer 1 for an integer format), four unknown FORMAT values, a descriptor word naming another format, and 11 mutations that must fail the GPU readback.
  • docs/experiments.md: descriptor path and its limits.

Verification:

  • python3 -B tests/startup_vertex_fetch_formats_check.py controls -> vertex fetch format controls passed (Linux)
  • python3 -B tests/startup_gfx2hlsl_*_check.py (every script, run one by one) -> pass (Linux)
  • Independent review found two test-only defects (W-only mutations invisible to an xyz load; mutation texts used tbuffer register names). Fixed in the last two commits.
  • Win2025: x2w_pipe.py win2025 2138 --scope direct --targets offscreen_check --regex startup_vertex_fetch_formats -> startup_vertex_fetch_formats_controls, _warp, _hardware 3/3 passed (100%) at a9ac7006

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6595007092 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T01:27:59Z. --- Part of #2023 What this unblocks: `buffer_load_format_x/_xy/_xyz` with the format taken from word 3 of the buffer descriptor (item B, about 520 pipeline requests), so those vertex and pixel stages translate instead of being refused. Changes: - `tools/startup/gfx2hlsl.py`: the three loads read descriptor word 3 as the entry constant `descword3`. The body switches on FORMAT (bits 12 to 18) over every entry of the existing `FETCH_FORMATS` table, then DST_SEL (bits 0 to 11) picks a component, 0 or 1 for each destination register. `buffer_load_format_xyzw` stays refused. A FORMAT outside the table decodes as zeros (documented assumption). - `src/startup_stubs/d3d12_draw.inl`: new manifest source `descword3`; the draw fills it from word 3 of a hardware buffer descriptor and passes 0 for other buffer bindings. - `tests/startup_vertex_fetch_formats_check.py` (existing `_controls` / `_warp` / `_hardware` tests, no new CMake entry): each of the 12 formats through a source-built MUBUF xyz load with its own descriptor word, swizzled words (swapped pair, constants 0 and 1, integer 1 for an integer format), four unknown FORMAT values, a descriptor word naming another format, and 11 mutations that must fail the GPU readback. - `docs/experiments.md`: descriptor path and its limits. Verification: - `python3 -B tests/startup_vertex_fetch_formats_check.py controls` -> `vertex fetch format controls passed` (Linux) - `python3 -B tests/startup_gfx2hlsl_*_check.py` (every script, run one by one) -> pass (Linux) - Independent review found two test-only defects (W-only mutations invisible to an xyz load; mutation texts used tbuffer register names). Fixed in the last two commits. - Win2025: `x2w_pipe.py win2025 2138 --scope direct --targets offscreen_check --regex startup_vertex_fetch_formats` -> `startup_vertex_fetch_formats_controls`, `_warp`, `_hardware` 3/3 passed (100%) at a9ac7006 AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-25 02:01:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T01:48:36Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a9ac700628

ℹ️ 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:6050377890 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#pullrequestreview-6050377890). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T01:48:36Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `a9ac700628` <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-25 02:01:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T01:56:04Z.

Review: CHANGES_REQUESTED


The new head fixes the Linux request-fixture failure. At runtime, draw_translated still initializes desc_word3 to zero for every binding and only assigns it on the hardware descriptor branch. An unresolved or different binding can therefore publish the same shader data as a resolved descriptor. The default FORMAT arm also returns zero without a verified native result.

Please carry a separate resolved/valid condition through binding and refuse the draw before submission for missing metadata or an unsupported FORMAT. A source-built negative control should distinguish missing metadata, an unsupported format code, and a supported descriptor whose buffer data is actually zero. A native comparison can establish a specific zero-return case if it is useful later.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6050455283 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#pullrequestreview-6050455283). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T01:56:04Z. **Review:** CHANGES_REQUESTED --- The new head fixes the Linux request-fixture failure. At runtime, `draw_translated` still initializes `desc_word3` to zero for every binding and only assigns it on the hardware descriptor branch. An unresolved or different binding can therefore publish the same shader data as a resolved descriptor. The default FORMAT arm also returns zero without a verified native result. Please carry a separate resolved/valid condition through binding and refuse the draw before submission for missing metadata or an unsupported FORMAT. A source-built negative control should distinguish missing metadata, an unsupported format code, and a supported descriptor whose buffer data is actually zero. A native comparison can establish a specific zero-return case if it is useful later.
chatgpt-codex-connector[bot commented 2026-11-25 02:02:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T01:42:11Z.


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-25T01:48:38.466345Z a9ac700 Draft marked ready
ℹ️ 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:7149856837 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#issuecomment-7149856837). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T01:42:11Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"a9ac70062865a421fb3c4f244bf4cc8ca1128534","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-25T01:48:38.466345Z">2026-11-25T01:48:38.466345Z</relative-time> | `a9ac700` | Draft marked ready | <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-25 02:02:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T01:48:36Z.

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

@@ -1257,6 +1267,43 @@ def op_s_swappc_b64(self, ops, mods):
             self.load_format(FETCH_DXGI[e['format']][0], buf, e['vgpr'], e['count'])
         self.fetched = True
 
+    def mubuf_format(self, ops, mods, count):
+        """buffer_load_format_x/xy/xyz: FORMAT and DST_SEL come from word 3 of the descriptor, known at draw time.
+
+        The runtime passes that word as an entry constant. Each supported format becomes one case of a switch
+        on the FORMAT field that decodes the four components as the tbuffer path does; DST_SEL then picks, for
+        each destination register, a component or the constant 0 or 1. A format outside the table decodes as
+        zeros (assumption: the invalid format 0 loads zero) and a descriptor the draw cannot read passes word 3 as 0.
+        """
+        dst = reg_range(ops[0])
+        buf, address = self.buffer_address(ops, mods)
+        word3 = 'ud%d' % self.pipe.ud(('descword3', self.pipe.resources[self.descriptor(ops[2])]['index']))
+        self.emit('a = %s;' % address)
+        self.emit('{ uint c0 = 0, c1 = 0, c2 = 0, c3 = 0, one = U(1.0);')
+        self.emit('switch ((%s >> %d) & %du) {' % (word3, DESC_FORMAT_SHIFT, DESC_FORMAT_MASK))
+        for fmt, code in sorted(DESC_FORMAT_CODES.items(), key=lambda kv: kv[1]):
+            load, comps = FETCH_FORMATS[fmt]
+            body = ['w = %s;' % load.format(buf)] if load else []
+            body += ['c%d = %s;' % (i, comps[i].format(buf)) for i in range(4)]
+            if fmt in DESC_ONE_INTEGER:
+                body.append('one = 1u;')
+            self.emit('case %du: %s break;' % (code, ' '.join(body)))
+        self.emit('default: break; }')
+        pick = ('((%s >> %d) & 7u)' % (word3, 3 * i) for i in range(count))
+        for i, sel in enumerate(pick):
+            self.set_v(dst[1] + i, '%s == 4u ? c0 : %s == 5u ? c1 : %s == 6u ? c2 : %s == 7u ? c3 : %s == 1u ? one : 0u'
+                       % (sel, sel, sel, sel, sel))
+        self.emit('}')
+
+    def op_buffer_load_format_x(self, ops, mods):
+        self.mubuf_format(ops, mods, 1)

P1 Badge Update the request controls for the accepted MUBUF loads

The existing formatted_mubuf_request_controls() still expects _x, _xy and _xyz to produce only .fail files. Consequently, python3 -B tests/startup_buffer_address_check.py controls now raises FileNotFoundError on its first formatted load instead of passing (reproduced on Linux; the parent translator passes). This script is registered as startup_buffer_address_controls in CMakeLists.txt:2316-2317 and run by the Linux job in .github/workflows/windows.yml:230, so enabling these handlers breaks the existing test suites. Update those controls to expect successful translations for the three supported forms while retaining the _xyzw rejection.

AGENTS.md reference: AGENTS.md:L170-L170

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689127583 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#discussion_r4689127583). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T01:48:36Z. **Code review location:** `tools/startup/gfx2hlsl.py`; line 1299 ~~~~diff @@ -1257,6 +1267,43 @@ def op_s_swappc_b64(self, ops, mods): self.load_format(FETCH_DXGI[e['format']][0], buf, e['vgpr'], e['count']) self.fetched = True + def mubuf_format(self, ops, mods, count): + """buffer_load_format_x/xy/xyz: FORMAT and DST_SEL come from word 3 of the descriptor, known at draw time. + + The runtime passes that word as an entry constant. Each supported format becomes one case of a switch + on the FORMAT field that decodes the four components as the tbuffer path does; DST_SEL then picks, for + each destination register, a component or the constant 0 or 1. A format outside the table decodes as + zeros (assumption: the invalid format 0 loads zero) and a descriptor the draw cannot read passes word 3 as 0. + """ + dst = reg_range(ops[0]) + buf, address = self.buffer_address(ops, mods) + word3 = 'ud%d' % self.pipe.ud(('descword3', self.pipe.resources[self.descriptor(ops[2])]['index'])) + self.emit('a = %s;' % address) + self.emit('{ uint c0 = 0, c1 = 0, c2 = 0, c3 = 0, one = U(1.0);') + self.emit('switch ((%s >> %d) & %du) {' % (word3, DESC_FORMAT_SHIFT, DESC_FORMAT_MASK)) + for fmt, code in sorted(DESC_FORMAT_CODES.items(), key=lambda kv: kv[1]): + load, comps = FETCH_FORMATS[fmt] + body = ['w = %s;' % load.format(buf)] if load else [] + body += ['c%d = %s;' % (i, comps[i].format(buf)) for i in range(4)] + if fmt in DESC_ONE_INTEGER: + body.append('one = 1u;') + self.emit('case %du: %s break;' % (code, ' '.join(body))) + self.emit('default: break; }') + pick = ('((%s >> %d) & 7u)' % (word3, 3 * i) for i in range(count)) + for i, sel in enumerate(pick): + self.set_v(dst[1] + i, '%s == 4u ? c0 : %s == 5u ? c1 : %s == 6u ? c2 : %s == 7u ? c3 : %s == 1u ? one : 0u' + % (sel, sel, sel, sel, sel)) + self.emit('}') + + def op_buffer_load_format_x(self, ops, mods): + self.mubuf_format(ops, mods, 1) ~~~~ --- **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Update the request controls for the accepted MUBUF loads** The existing `formatted_mubuf_request_controls()` still expects `_x`, `_xy` and `_xyz` to produce only `.fail` files. Consequently, `python3 -B tests/startup_buffer_address_check.py controls` now raises `FileNotFoundError` on its first formatted load instead of passing (reproduced on Linux; the parent translator passes). This script is registered as `startup_buffer_address_controls` in `CMakeLists.txt:2316-2317` and run by the Linux job in `.github/workflows/windows.yml:230`, so enabling these handlers breaks the existing test suites. Update those controls to expect successful translations for the three supported forms while retaining the `_xyzw` rejection. AGENTS.md reference: [AGENTS.md:L170-L170](https://github.com/R0Y00/Xbox2Windows/blob/a9ac70062865a421fb3c4f244bf4cc8ca1128534/AGENTS.md#L170-L170) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
chatgpt-codex-connector[bot commented 2026-11-25 02:02:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T01:48:36Z.

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

@@ -1257,6 +1267,43 @@ def op_s_swappc_b64(self, ops, mods):
             self.load_format(FETCH_DXGI[e['format']][0], buf, e['vgpr'], e['count'])
         self.fetched = True
 
+    def mubuf_format(self, ops, mods, count):
+        """buffer_load_format_x/xy/xyz: FORMAT and DST_SEL come from word 3 of the descriptor, known at draw time.
+
+        The runtime passes that word as an entry constant. Each supported format becomes one case of a switch
+        on the FORMAT field that decodes the four components as the tbuffer path does; DST_SEL then picks, for
+        each destination register, a component or the constant 0 or 1. A format outside the table decodes as
+        zeros (assumption: the invalid format 0 loads zero) and a descriptor the draw cannot read passes word 3 as 0.
+        """
+        dst = reg_range(ops[0])
+        buf, address = self.buffer_address(ops, mods)
+        word3 = 'ud%d' % self.pipe.ud(('descword3', self.pipe.resources[self.descriptor(ops[2])]['index']))

P2 Badge Honor in-shader writes to descriptor word 3

If a shader rewrites word 3 after s_load_dwordx4, this fetches the original table word without consulting the current fourth SGPR. For example, a source-built shader loading s[16:19], executing s_mov_b32 s19, 0x50fac and then issuing an indexed buffer_load_format_xyz translates successfully, but its generated loads are unchanged by the move: FORMAT still comes from descword3. With an original BUF_FMT_32_FLOAT table entry, X remains the whole dword rather than the low byte required by the overwritten BUF_FMT_8_UINT format. Honor the tracked word-3 value, or reject descriptors whose word 3 was changed, before publishing a translation.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689127585 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#discussion_r4689127585). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T01:48:36Z. **Code review location:** `tools/startup/gfx2hlsl.py`; line 1280 ~~~~diff @@ -1257,6 +1267,43 @@ def op_s_swappc_b64(self, ops, mods): self.load_format(FETCH_DXGI[e['format']][0], buf, e['vgpr'], e['count']) self.fetched = True + def mubuf_format(self, ops, mods, count): + """buffer_load_format_x/xy/xyz: FORMAT and DST_SEL come from word 3 of the descriptor, known at draw time. + + The runtime passes that word as an entry constant. Each supported format becomes one case of a switch + on the FORMAT field that decodes the four components as the tbuffer path does; DST_SEL then picks, for + each destination register, a component or the constant 0 or 1. A format outside the table decodes as + zeros (assumption: the invalid format 0 loads zero) and a descriptor the draw cannot read passes word 3 as 0. + """ + dst = reg_range(ops[0]) + buf, address = self.buffer_address(ops, mods) + word3 = 'ud%d' % self.pipe.ud(('descword3', self.pipe.resources[self.descriptor(ops[2])]['index'])) ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Honor in-shader writes to descriptor word 3** If a shader rewrites word 3 after `s_load_dwordx4`, this fetches the original table word without consulting the current fourth SGPR. For example, a source-built shader loading `s[16:19]`, executing `s_mov_b32 s19, 0x50fac` and then issuing an indexed `buffer_load_format_xyz` translates successfully, but its generated loads are unchanged by the move: FORMAT still comes from `descword3`. With an original `BUF_FMT_32_FLOAT` table entry, X remains the whole dword rather than the low byte required by the overwritten `BUF_FMT_8_UINT` format. Honor the tracked word-3 value, or reject descriptors whose word 3 was changed, before publishing a translation. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
tedin7 commented 2026-11-25 03:01:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:24:46Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6050791402 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#pullrequestreview-6050791402). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T02:24:46Z. **Review:** COMMENTED --- _No description provided._
tedin7 commented 2026-11-25 03:01:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:24:49Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6050791989 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#pullrequestreview-6050791989). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T02:24:49Z. **Review:** COMMENTED --- _No description provided._
tedin7 commented 2026-11-25 03:01:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:24:46Z.

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

@@ -1257,6 +1267,43 @@ def op_s_swappc_b64(self, ops, mods):
             self.load_format(FETCH_DXGI[e['format']][0], buf, e['vgpr'], e['count'])
         self.fetched = True
 
+    def mubuf_format(self, ops, mods, count):
+        """buffer_load_format_x/xy/xyz: FORMAT and DST_SEL come from word 3 of the descriptor, known at draw time.
+
+        The runtime passes that word as an entry constant. Each supported format becomes one case of a switch
+        on the FORMAT field that decodes the four components as the tbuffer path does; DST_SEL then picks, for
+        each destination register, a component or the constant 0 or 1. A format outside the table decodes as
+        zeros (assumption: the invalid format 0 loads zero) and a descriptor the draw cannot read passes word 3 as 0.
+        """
+        dst = reg_range(ops[0])
+        buf, address = self.buffer_address(ops, mods)
+        word3 = 'ud%d' % self.pipe.ud(('descword3', self.pipe.resources[self.descriptor(ops[2])]['index']))
+        self.emit('a = %s;' % address)
+        self.emit('{ uint c0 = 0, c1 = 0, c2 = 0, c3 = 0, one = U(1.0);')
+        self.emit('switch ((%s >> %d) & %du) {' % (word3, DESC_FORMAT_SHIFT, DESC_FORMAT_MASK))
+        for fmt, code in sorted(DESC_FORMAT_CODES.items(), key=lambda kv: kv[1]):
+            load, comps = FETCH_FORMATS[fmt]
+            body = ['w = %s;' % load.format(buf)] if load else []
+            body += ['c%d = %s;' % (i, comps[i].format(buf)) for i in range(4)]
+            if fmt in DESC_ONE_INTEGER:
+                body.append('one = 1u;')
+            self.emit('case %du: %s break;' % (code, ' '.join(body)))
+        self.emit('default: break; }')
+        pick = ('((%s >> %d) & 7u)' % (word3, 3 * i) for i in range(count))
+        for i, sel in enumerate(pick):
+            self.set_v(dst[1] + i, '%s == 4u ? c0 : %s == 5u ? c1 : %s == 6u ? c2 : %s == 7u ? c3 : %s == 1u ? one : 0u'
+                       % (sel, sel, sel, sel, sel))
+        self.emit('}')
+
+    def op_buffer_load_format_x(self, ops, mods):
+        self.mubuf_format(ops, mods, 1)

Fixed in 8917f825 (controls expect translation for _x/_xy/_xyz, xyzw still refused); re-verified at a3f8419a. Verification (Win2025, dev and release): ctest -R startup(vertex_fetch_formats|buffer_address) 6/6 passed (controls, warp, hardware); Linux: python3 -B tests/startup_buffer_address_check.py controls and tests/startup_vertex_fetch_formats_check.py controls pass.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689484362 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#discussion_r4689484362). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T02:24:46Z. **Code review location:** `tools/startup/gfx2hlsl.py`; line 1299 ~~~~diff @@ -1257,6 +1267,43 @@ def op_s_swappc_b64(self, ops, mods): self.load_format(FETCH_DXGI[e['format']][0], buf, e['vgpr'], e['count']) self.fetched = True + def mubuf_format(self, ops, mods, count): + """buffer_load_format_x/xy/xyz: FORMAT and DST_SEL come from word 3 of the descriptor, known at draw time. + + The runtime passes that word as an entry constant. Each supported format becomes one case of a switch + on the FORMAT field that decodes the four components as the tbuffer path does; DST_SEL then picks, for + each destination register, a component or the constant 0 or 1. A format outside the table decodes as + zeros (assumption: the invalid format 0 loads zero) and a descriptor the draw cannot read passes word 3 as 0. + """ + dst = reg_range(ops[0]) + buf, address = self.buffer_address(ops, mods) + word3 = 'ud%d' % self.pipe.ud(('descword3', self.pipe.resources[self.descriptor(ops[2])]['index'])) + self.emit('a = %s;' % address) + self.emit('{ uint c0 = 0, c1 = 0, c2 = 0, c3 = 0, one = U(1.0);') + self.emit('switch ((%s >> %d) & %du) {' % (word3, DESC_FORMAT_SHIFT, DESC_FORMAT_MASK)) + for fmt, code in sorted(DESC_FORMAT_CODES.items(), key=lambda kv: kv[1]): + load, comps = FETCH_FORMATS[fmt] + body = ['w = %s;' % load.format(buf)] if load else [] + body += ['c%d = %s;' % (i, comps[i].format(buf)) for i in range(4)] + if fmt in DESC_ONE_INTEGER: + body.append('one = 1u;') + self.emit('case %du: %s break;' % (code, ' '.join(body))) + self.emit('default: break; }') + pick = ('((%s >> %d) & 7u)' % (word3, 3 * i) for i in range(count)) + for i, sel in enumerate(pick): + self.set_v(dst[1] + i, '%s == 4u ? c0 : %s == 5u ? c1 : %s == 6u ? c2 : %s == 7u ? c3 : %s == 1u ? one : 0u' + % (sel, sel, sel, sel, sel)) + self.emit('}') + + def op_buffer_load_format_x(self, ops, mods): + self.mubuf_format(ops, mods, 1) ~~~~ --- Fixed in 8917f825 (controls expect translation for _x/_xy/_xyz, _xyzw still refused); re-verified at a3f8419a. Verification (Win2025, dev and release): ctest -R startup_(vertex_fetch_formats|buffer_address) 6/6 passed (controls, warp, hardware); Linux: python3 -B tests/startup_buffer_address_check.py controls and tests/startup_vertex_fetch_formats_check.py controls pass. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 03:01:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:24:49Z.

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

@@ -1257,6 +1267,43 @@ def op_s_swappc_b64(self, ops, mods):
             self.load_format(FETCH_DXGI[e['format']][0], buf, e['vgpr'], e['count'])
         self.fetched = True
 
+    def mubuf_format(self, ops, mods, count):
+        """buffer_load_format_x/xy/xyz: FORMAT and DST_SEL come from word 3 of the descriptor, known at draw time.
+
+        The runtime passes that word as an entry constant. Each supported format becomes one case of a switch
+        on the FORMAT field that decodes the four components as the tbuffer path does; DST_SEL then picks, for
+        each destination register, a component or the constant 0 or 1. A format outside the table decodes as
+        zeros (assumption: the invalid format 0 loads zero) and a descriptor the draw cannot read passes word 3 as 0.
+        """
+        dst = reg_range(ops[0])
+        buf, address = self.buffer_address(ops, mods)
+        word3 = 'ud%d' % self.pipe.ud(('descword3', self.pipe.resources[self.descriptor(ops[2])]['index']))

Fixed in a3f8419a: a formatted buffer load is now refused unless all four descriptor words are still the loaded ones, so a rewritten word 3 is never read from the table. New regression case (s_mov_b32 s19 after the load) fails before the fix and passes after. Verification (Win2025, dev and release): ctest -R startup_(vertex_fetch_formats|buffer_address) 6/6 passed (controls, warp, hardware); Linux: python3 -B tests/startup_buffer_address_check.py controls and tests/startup_vertex_fetch_formats_check.py controls pass.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689484828 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#discussion_r4689484828). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T02:24:49Z. **Code review location:** `tools/startup/gfx2hlsl.py`; line 1280 ~~~~diff @@ -1257,6 +1267,43 @@ def op_s_swappc_b64(self, ops, mods): self.load_format(FETCH_DXGI[e['format']][0], buf, e['vgpr'], e['count']) self.fetched = True + def mubuf_format(self, ops, mods, count): + """buffer_load_format_x/xy/xyz: FORMAT and DST_SEL come from word 3 of the descriptor, known at draw time. + + The runtime passes that word as an entry constant. Each supported format becomes one case of a switch + on the FORMAT field that decodes the four components as the tbuffer path does; DST_SEL then picks, for + each destination register, a component or the constant 0 or 1. A format outside the table decodes as + zeros (assumption: the invalid format 0 loads zero) and a descriptor the draw cannot read passes word 3 as 0. + """ + dst = reg_range(ops[0]) + buf, address = self.buffer_address(ops, mods) + word3 = 'ud%d' % self.pipe.ud(('descword3', self.pipe.resources[self.descriptor(ops[2])]['index'])) ~~~~ --- Fixed in a3f8419a: a formatted buffer load is now refused unless all four descriptor words are still the loaded ones, so a rewritten word 3 is never read from the table. New regression case (s_mov_b32 s19 after the load) fails before the fix and passes after. Verification (Win2025, dev and release): ctest -R startup_(vertex_fetch_formats|buffer_address) 6/6 passed (controls, warp, hardware); Linux: python3 -B tests/startup_buffer_address_check.py controls and tests/startup_vertex_fetch_formats_check.py controls pass. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-25 07:00:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T06:18:08Z.

Review: COMMENTED


I verified that the previous Python request-control and rewritten-word-3 findings are fixed at this head. I prepared a local candidate for the remaining runtime review against 8150d800: preflight the descword3 bindings, snapshot the hardware table descriptor once for format validation and buffer binding, and refuse missing metadata, unsupported FORMAT or unresolved backing. Desktop view tokens do not carry raw descriptor word 3. The translator also limits the new path to graphics table descriptors proven in the entry block, so a branch cannot bypass the load or leave a rewritten word live.

On Windows build 26200, the Release candidate passed ctest --test-dir <build> --no-tests=error -j 1 -R '^startup_(mubuf_descriptor|vertex_fetch_formats|buffer_address)_' with 8 passed and 0 skipped. The new source-built draw fixture ran with SDK 10.0.26100.0 FXC on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656, with debug layers enabled. Missing metadata, unsupported FORMAT 2 and absent backing kept the test strips at their blue clear value, and valid R32_FLOAT with actual zero and one payloads drew black and red. The added branch-bypass control also passes. Please keep these distinguishable outcomes when updating the branch so the existing change request can be reassessed on the published head.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6052736711 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#pullrequestreview-6052736711). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T06:18:08Z. **Review:** COMMENTED --- I verified that the previous Python request-control and rewritten-word-3 findings are fixed at this head. I prepared a local candidate for the remaining runtime review against `8150d800`: preflight the `descword3` bindings, snapshot the hardware table descriptor once for format validation and buffer binding, and refuse missing metadata, unsupported FORMAT or unresolved backing. Desktop view tokens do not carry raw descriptor word 3. The translator also limits the new path to graphics table descriptors proven in the entry block, so a branch cannot bypass the load or leave a rewritten word live. On Windows build 26200, the Release candidate passed `ctest --test-dir <build> --no-tests=error -j 1 -R '^startup_(mubuf_descriptor|vertex_fetch_formats|buffer_address)_'` with 8 passed and 0 skipped. The new source-built draw fixture ran with SDK `10.0.26100.0` FXC on WARP `10.0.26100.9818` and RTX 4060 Laptop `32.0.16.1656`, with debug layers enabled. Missing metadata, unsupported FORMAT 2 and absent backing kept the test strips at their blue clear value, and valid R32_FLOAT with actual zero and one payloads drew black and red. The added branch-bypass control also passes. Please keep these distinguishable outcomes when updating the branch so the existing change request can be reassessed on the published head.
tedin7 commented 2026-11-25 07:01:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T06:35:07Z.


Pushed d34731ba for the remaining runtime finding.

Fix: draw_translated now tracks, per binding, a separate desc_hardware flag (set only in the hardware-descriptor branch, together with word 3) and a desc_backed flag (set only where the buffer range was actually bound). Right after the binding loop, before any list command or viewport/scissor change, every descword3 entry must be hardware, backed, and have a FORMAT from the translated table (supported_descriptor_format, same numbers as DESC_FORMAT_CODES). Otherwise the draw returns false (untranslated path) and logs the cause. A word 3 of 0 from missing metadata no longer looks like a real descriptor, and a valid descriptor over zero data still draws.

Regression test: runtime_gate_controls in tests/startup_vertex_fetch_formats_check.py (runs in startup_vertex_fetch_formats_controls). Positive: the runtime FORMAT list equals the translation switch, and word 3 plus the hardware flag are set in one place. Negative: FORMAT 2 and 0 are not accepted; dropping any of the hardware, backed or FORMAT conditions fails the control; a gate placed after the first list command fails it. Limit: this is a source-level control. I did not add the source-built draw fixture with the blue/black/red strips; your local candidate covers that and I kept its distinguishable outcomes in the docs wording.

Verification (Linux): tests/startup_buffer_address_check.py, tests/startup_translator_check.py, tests/docs_links_check.py, tests/startup_vertex_fetch_formats_check.py controls all pass.

Verification (Win2025, build 26100, 3-slot pool): x2w_pipe.py win2025 2138 --force --regex '^startup_(mubuf_descriptor|vertex_fetch_formats|buffer_address)_' --py-checks tests/startup_buffer_address_check.py. Dev and release: 6/6 passed, 0 skipped (startup_vertex_fetch_formats_{controls,warp,hardware}, startup_buffer_address_{controls,warp,hardware}). An earlier release attempt hit an sccache transport error during build, not a compile error; the rerun passed.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7154944261 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#issuecomment-7154944261). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T06:35:07Z. --- Pushed `d34731ba` for the remaining runtime finding. Fix: `draw_translated` now tracks, per binding, a separate `desc_hardware` flag (set only in the hardware-descriptor branch, together with word 3) and a `desc_backed` flag (set only where the buffer range was actually bound). Right after the binding loop, before any list command or viewport/scissor change, every `descword3` entry must be hardware, backed, and have a FORMAT from the translated table (`supported_descriptor_format`, same numbers as `DESC_FORMAT_CODES`). Otherwise the draw returns false (untranslated path) and logs the cause. A word 3 of 0 from missing metadata no longer looks like a real descriptor, and a valid descriptor over zero data still draws. Regression test: `runtime_gate_controls` in `tests/startup_vertex_fetch_formats_check.py` (runs in `startup_vertex_fetch_formats_controls`). Positive: the runtime FORMAT list equals the translation switch, and word 3 plus the hardware flag are set in one place. Negative: FORMAT 2 and 0 are not accepted; dropping any of the hardware, backed or FORMAT conditions fails the control; a gate placed after the first list command fails it. Limit: this is a source-level control. I did not add the source-built draw fixture with the blue/black/red strips; your local candidate covers that and I kept its distinguishable outcomes in the docs wording. Verification (Linux): `tests/startup_buffer_address_check.py`, `tests/startup_translator_check.py`, `tests/docs_links_check.py`, `tests/startup_vertex_fetch_formats_check.py controls` all pass. Verification (Win2025, build 26100, 3-slot pool): `x2w_pipe.py win2025 2138 --force --regex '^startup_(mubuf_descriptor|vertex_fetch_formats|buffer_address)_' --py-checks tests/startup_buffer_address_check.py`. Dev and release: 6/6 passed, 0 skipped (`startup_vertex_fetch_formats_{controls,warp,hardware}`, `startup_buffer_address_{controls,warp,hardware}`). An earlier release attempt hit an sccache transport error during build, not a compile error; the rerun passed. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-25 07:01:15 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T06:57:24Z.


I fast-forwarded this branch from d34731ba to 45d221e8, preserving your descriptor validation commit and its controls. The follow-up snapshots the descriptor before binding, distinguishes absent metadata from an unsupported format, and refuses to use the identity-buffer fallback for a formatted load with missing backing. A later basic block can lower a formatted load when it loads all four untouched descriptor words locally and every predecessor preserves the table pointer. The updated head passed startup_vertex_fetch_formats_controls, startup_buffer_address_controls and startup_mubuf_descriptor_warp. The WARP test keeps the target clear for the three invalid bindings even with the identity fallback enabled, and draws the two valid zero and one payloads.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7155333924 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#issuecomment-7155333924). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T06:57:24Z. --- I fast-forwarded this branch from `d34731ba` to `45d221e8`, preserving your descriptor validation commit and its controls. The follow-up snapshots the descriptor before binding, distinguishes absent metadata from an unsupported format, and refuses to use the identity-buffer fallback for a formatted load with missing backing. A later basic block can lower a formatted load when it loads all four untouched descriptor words locally and every predecessor preserves the table pointer. The updated head passed `startup_vertex_fetch_formats_controls`, `startup_buffer_address_controls` and `startup_mubuf_descriptor_warp`. The WARP test keeps the target clear for the three invalid bindings even with the identity fallback enabled, and draws the two valid zero and one payloads.
thepatrickworld commented 2026-11-25 12:01:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-25T11:39:48Z.


Run at head 64c358e7, compiler dxc, backend hardware.

startup_vertex_fetch_formats_check.py <dxc> <offscreen_check> hardware — the third argument is the backend selector (it is passed straight to the consumer as its first argument), not an adapter name; the fixture does not echo which adapter it opened. This machine has a single GPU.

Two paths, two summaries. The log ends with two lines, and they count different things:

hardware: 13 buffer formats, 16 vertices each, every wrong reference and 12 mutations fail
hardware: 16 buffer_load_format descriptor cases, wrong descriptor words and 16 mutations fail

The first is the reference path (13 formats × 16 vertices, 12 mutations), the second the descriptor path this PR adds (16 cases, 16 mutations). Both are green, and a descriptor word carrying the wrong format is caught rather than silently accepted. The components read back are vertex attributes, not texels — there is no texture in this run.

The format table. DESC_FORMAT_CODES has 13 entries; compared one by one against MTBUF_FORMATS in tools/disasm_rdna2.py:

  • 12 agree exactly (BUF_FMT_8_8_UNORM 14, BUF_FMT_16_16_UNORM 23, BUF_FMT_16_16_FLOAT 29, BUF_FMT_32_FLOAT 22, BUF_FMT_8_8_8_8_UNORM 56, …);
  • the thirteenth, BUF_FMT_8_UNORM = 1, has no key in MTBUF_FORMATS — that dict goes from 0 straight to 2, and has no 1 among its 77 entries. disasm_rdna2.py:1232 already notes that format 1 is LLVM's omitted default, so the value is right and the table is the thing with the hole; disasm_rdna2.py is untouched by this PR.

Worth knowing about the assertion that is supposed to cover this: tests/startup_vertex_fetch_formats_check.py:316 reads

assert MTBUF_FORMATS.get(code, 'BUF_FMT_8_UNORM') == name, name

so for code 1 the lookup returns the default and the assertion passes whatever MTBUF_FORMATS contains — the one code that is missing from the table is exactly the one this check cannot catch.

A silent path. The generated switch ends in default: break; (gfx2hlsl.py:2342), so a descriptor naming a format outside DESC_FORMAT_CODES produces zeros with no error and no warning. I did not probe that case; I am pointing at it because it fails quietly rather than loudly.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7161337412 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#issuecomment-7161337412). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-25T11:39:48Z. --- **Run at head `64c358e7`, compiler `dxc`, backend `hardware`.** `startup_vertex_fetch_formats_check.py <dxc> <offscreen_check> hardware` — the third argument is the backend selector (it is passed straight to the consumer as its first argument), not an adapter name; the fixture does not echo which adapter it opened. This machine has a single GPU. **Two paths, two summaries.** The log ends with two lines, and they count different things: ``` hardware: 13 buffer formats, 16 vertices each, every wrong reference and 12 mutations fail hardware: 16 buffer_load_format descriptor cases, wrong descriptor words and 16 mutations fail ``` The first is the reference path (13 formats × 16 vertices, 12 mutations), the second the descriptor path this PR adds (16 cases, 16 mutations). Both are green, and a descriptor word carrying the wrong format is caught rather than silently accepted. The components read back are vertex attributes, not texels — there is no texture in this run. **The format table.** `DESC_FORMAT_CODES` has 13 entries; compared one by one against `MTBUF_FORMATS` in `tools/disasm_rdna2.py`: - 12 agree exactly (`BUF_FMT_8_8_UNORM` 14, `BUF_FMT_16_16_UNORM` 23, `BUF_FMT_16_16_FLOAT` 29, `BUF_FMT_32_FLOAT` 22, `BUF_FMT_8_8_8_8_UNORM` 56, …); - the thirteenth, `BUF_FMT_8_UNORM` = 1, has **no key in `MTBUF_FORMATS`** — that dict goes from 0 straight to 2, and has no 1 among its 77 entries. `disasm_rdna2.py:1232` already notes that format 1 is LLVM's omitted default, so the value is right and the table is the thing with the hole; `disasm_rdna2.py` is untouched by this PR. Worth knowing about the assertion that is supposed to cover this: `tests/startup_vertex_fetch_formats_check.py:316` reads ```python assert MTBUF_FORMATS.get(code, 'BUF_FMT_8_UNORM') == name, name ``` so for code 1 the lookup returns the default and the assertion passes whatever `MTBUF_FORMATS` contains — the one code that is missing from the table is exactly the one this check cannot catch. **A silent path.** The generated switch ends in `default: break;` (`gfx2hlsl.py:2342`), so a descriptor naming a format outside `DESC_FORMAT_CODES` produces zeros with no error and no warning. I did not probe that case; I am pointing at it because it fails quietly rather than loudly. _AI-assisted._
tedin7 commented 2026-11-25 13:00:58 +00:00 (Migrated from github.com)

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


Thanks, both points are addressed in f1b9936c (on top of the merge with main).

  1. tests/startup_vertex_fetch_formats_check.py: the .get(code, 'BUF_FMT_8_UNORM') default is gone. Code 1 is now checked explicitly as the omitted tbuffer format (absent from MTBUF_FORMATS, must be BUF_FMT_8_UNORM). Every other code is looked up without a default. Two negative controls were added: a renamed format for one code is caught, and giving code 1 a name is caught.
  2. tools/startup/gfx2hlsl.py: the generated FORMAT switch no longer ends in default: break;. The default now sets all four components to a NaN sentinel (DESC_FORMAT_UNKNOWN = 0x7fc0f0f0), so a format the draw failed to refuse shows up in a readback instead of passing as zeros. The test checks that the sentinel default is present for the x, xy and xyz variants and that default: break is gone. With the old default restored, the test fails. With the new one, it passes.

Commands run locally on Linux:

  • python3 -B tests/startup_vertex_fetch_formats_check.py controls
  • python3 -B tests/startup_buffer_address_check.py
  • python3 -B tests/startup_gfx2hlsl_refusals_check.py
  • python3 -B tests/startup_gfx2hlsl_join_symbols_check.py
  • python3 -B tests/startup_gfx2hlsl_readfirstlane_uniform_check.py
  • python3 -B tests/startup_gfx2hlsl_capture_check.py
  • python3 -B tests/startup_image_load_mip_check.py
  • git diff --check

All passed. No Windows or WARP run was done for this change.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7161911890 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#issuecomment-7161911890). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T12:05:43Z. --- Thanks, both points are addressed in `f1b9936c` (on top of the merge with main). 1. `tests/startup_vertex_fetch_formats_check.py`: the `.get(code, 'BUF_FMT_8_UNORM')` default is gone. Code 1 is now checked explicitly as the omitted tbuffer format (absent from `MTBUF_FORMATS`, must be `BUF_FMT_8_UNORM`). Every other code is looked up without a default. Two negative controls were added: a renamed format for one code is caught, and giving code 1 a name is caught. 2. `tools/startup/gfx2hlsl.py`: the generated FORMAT switch no longer ends in `default: break;`. The default now sets all four components to a NaN sentinel (`DESC_FORMAT_UNKNOWN = 0x7fc0f0f0`), so a format the draw failed to refuse shows up in a readback instead of passing as zeros. The test checks that the sentinel default is present for the x, xy and xyz variants and that `default: break` is gone. With the old default restored, the test fails. With the new one, it passes. Commands run locally on Linux: - `python3 -B tests/startup_vertex_fetch_formats_check.py controls` - `python3 -B tests/startup_buffer_address_check.py` - `python3 -B tests/startup_gfx2hlsl_refusals_check.py` - `python3 -B tests/startup_gfx2hlsl_join_symbols_check.py` - `python3 -B tests/startup_gfx2hlsl_readfirstlane_uniform_check.py` - `python3 -B tests/startup_gfx2hlsl_capture_check.py` - `python3 -B tests/startup_image_load_mip_check.py` - `git diff --check` All passed. No Windows or WARP run was done for this change. AI-assisted; commands listed were executed locally.
upstream-sync closed this pull request 2026-11-25 15:01:33 +00:00
R0Y00 commented 2026-11-25 15:01:33 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T14:30:21Z.

Review: APPROVED


Rechecked 60475aaf. Windows Release passed all 6 selected checks on the descriptor path. The integrated draws stayed clear for missing metadata, an unsupported FORMAT and unresolved storage. With a valid descriptor, zero and one produced the distinct expected outputs on WARP and RTX 4060 Laptop. Each backend also caught the 19 translator mutations. The generated fallback is a detectable sentinel. This clears the earlier silent-zero finding.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6059537511 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2138#pullrequestreview-6059537511). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T14:30:21Z. **Review:** APPROVED --- Rechecked `60475aaf`. Windows Release passed all 6 selected checks on the descriptor path. The integrated draws stayed clear for missing metadata, an unsupported FORMAT and unresolved storage. With a valid descriptor, zero and one produced the distinct expected outputs on WARP and RTX 4060 Laptop. Each backend also caught the 19 translator mutations. The generated fallback is a detectable sentinel. This clears the earlier silent-zero finding.
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!2130
No description provided.