help wanted: GPU translation, part 5 (vertex and pixel pipelines) #2016

Open
opened 2026-11-24 23:18:17 +00:00 by denn0x · 24 comments
denn0x commented 2026-11-24 23:18:17 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T23:18:17Z.


Ordinary vertex + pixel pipelines that tools/startup/gfx2hlsl.py still refuses. Each row is an independent piece of work for one pull request with a source-built or hand-assembled fixture. Counts are distinct pipeline requests from a private cache (first refusal only; closing one row exposes the next for some requests).

Items (pick one, say so in a comment)

Item What is refused today Requests Notes
A buffer_store_dwordx3, and behind it formatted loads through a descriptor taken from a heap at run time about 470 The typed-load half is shared with compute (part 4, item A): format, stride and size come from descriptor words known only at run time.
B buffer_load_format_x / _xy / _xyz where the format comes from the third buffer-descriptor word about 520
C v_readfirstlane_b32 without a proven uniform source 224 to 352 Needs a rule for when the source is uniform across the lanes that matter (per-primitive or per-draw values), and a precise refusal otherwise.
D Image load with level zero on a 16-bit depth format (the d16 modifier) about 250
E v_cvt_f32_u32 with an SDWA multiply-by-two destination modifier 130 Related: the SDWA conversion forms already lowered.
F image_sample_c_lz with sampler fields the translator does not model (mip filter, upper bits of the third sampler word) 85
G Buffer formats: 16_16_SNORM (76), 8_8_8_8_UINT (30), 2_10_10_10_UNORM (22) about 130 One format per pull request is fine.
H v_min_u32 with a DPP control 64
I v_xor3_b32 55
J s_bitset1_b32 about 47
K v_cvt_pk_u8_f32 31 Related: #1546.
L A lane mask derived from descriptor data 22

Items already listed in part 1 (#1996) are not repeated: v_subrev_f32 with DPP, image_store in a pixel stage, the pixel-stage entry registers.

What a pull request needs

  • One item per pull request.
  • A source-built or hand-assembled fixture (no bytes from any retail software) with a negative control that fails when the lowering is disabled.
  • LLVM / Mesa semantics cited for each instruction or format.
  • The existing tests/startup_gfx2hlsl_*_check.py and tests/startup_translator_check.py still passing.
  • Refuse precisely what the change does not cover.

Related: #1723 (refusal census over an offline archive), #1978 (a census mode that reports every refusal site, not only the first).

Other parts: #1996 (pixel shaders), #1998 (mesh shaders), #1999 (render state and indirect draws), and the compute part filed alongside this one.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6593376998 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-24T23:18:17Z. --- Ordinary vertex + pixel pipelines that `tools/startup/gfx2hlsl.py` still refuses. Each row is an independent piece of work for one pull request with a source-built or hand-assembled fixture. Counts are distinct pipeline requests from a private cache (first refusal only; closing one row exposes the next for some requests). ## Items (pick one, say so in a comment) | Item | What is refused today | Requests | Notes | |---|---|---:|---| | A | `buffer_store_dwordx3`, and behind it formatted loads through a descriptor taken from a heap at run time | about 470 | The typed-load half is shared with compute (part 4, item A): format, stride and size come from descriptor words known only at run time. | | B | `buffer_load_format_x` / `_xy` / `_xyz` where the format comes from the third buffer-descriptor word | about 520 | | | C | `v_readfirstlane_b32` without a proven uniform source | 224 to 352 | Needs a rule for when the source is uniform across the lanes that matter (per-primitive or per-draw values), and a precise refusal otherwise. | | D | Image load with level zero on a 16-bit depth format (the `d16` modifier) | about 250 | | | E | `v_cvt_f32_u32` with an SDWA multiply-by-two destination modifier | 130 | Related: the SDWA conversion forms already lowered. | | F | `image_sample_c_lz` with sampler fields the translator does not model (mip filter, upper bits of the third sampler word) | 85 | | | G | Buffer formats: `16_16_SNORM` (76), `8_8_8_8_UINT` (30), `2_10_10_10_UNORM` (22) | about 130 | One format per pull request is fine. | | H | `v_min_u32` with a DPP control | 64 | | | I | `v_xor3_b32` | 55 | | | J | `s_bitset1_b32` | about 47 | | | K | `v_cvt_pk_u8_f32` | 31 | Related: #1546. | | L | A lane mask derived from descriptor data | 22 | | Items already listed in part 1 (#1996) are not repeated: `v_subrev_f32` with DPP, `image_store` in a pixel stage, the pixel-stage entry registers. ## What a pull request needs - One item per pull request. - A source-built or hand-assembled fixture (no bytes from any retail software) with a negative control that fails when the lowering is disabled. - LLVM / Mesa semantics cited for each instruction or format. - The existing `tests/startup_gfx2hlsl_*_check.py` and `tests/startup_translator_check.py` still passing. - Refuse precisely what the change does not cover. Related: #1723 (refusal census over an offline archive), #1978 (a census mode that reports every refusal site, not only the first). Other parts: #1996 (pixel shaders), #1998 (mesh shaders), #1999 (render state and indirect draws), and the compute part filed alongside this one.
consolelogkyo commented 2026-11-25 01:01:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-24T23:33:49Z.


I'll take item E (v_cvt_f32_u32 and the float-result VEC_U_TO_F conversions in SDWA form with output modifiers clamp, mul:2, mul:4, div:2). I'll apply the output modifier and clamp in hardware order (scale first, saturate second, then bitwise dst_sel / dst_unused placement), keep VEC_U integer/uint-result conversions and float source modifiers refused, and verify with constructed SDWA encodings, negative controls, and desktop GPU readback.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7147541461 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7147541461). Originally posted by [consolelogkyo](https://github.com/consolelogkyo) on 2026-11-24T23:33:49Z. --- I'll take item E (`v_cvt_f32_u32` and the float-result `VEC_U_TO_F` conversions in SDWA form with output modifiers `clamp`, `mul:2`, `mul:4`, `div:2`). I'll apply the output modifier and clamp in hardware order (scale first, saturate second, then bitwise `dst_sel` / `dst_unused` placement), keep `VEC_U` integer/uint-result conversions and float source modifiers refused, and verify with constructed SDWA encodings, negative controls, and desktop GPU readback. AI-assisted.
Ybucaille commented 2026-11-25 01:02:02 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Ybucaille on 2026-11-25T00:09:43Z.


I'll take three small items in tools/startup/gfx2hlsl.py, one pull request each:

  • I, v_xor3_b32: same semantics as the compute lowering in #1573, with a source-built fixture whose three sources differ in every byte and a negative control that drops the third operand.
  • G, the 16_16_SNORM buffer format only (the other two formats stay open): an entry next to BUF_FMT_16_16_UNORM, with -32768 clamped to -1.0 per the D3D/Vulkan SNORM rule, and controls on 0x8000, 0x8001, 0x7fff and 0.
  • K, v_cvt_pk_u8_f32: byte select from src1, insertion into src2, rounding and clamping cited from LLVM 15 and checked against the existing compute_store_aot form if there is one.

Each keeps refusing what its fixture doesn't cover.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148213561 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7148213561). Originally posted by [Ybucaille](https://github.com/Ybucaille) on 2026-11-25T00:09:43Z. --- I'll take three small items in `tools/startup/gfx2hlsl.py`, one pull request each: - **I**, `v_xor3_b32`: same semantics as the compute lowering in #1573, with a source-built fixture whose three sources differ in every byte and a negative control that drops the third operand. - **G**, the `16_16_SNORM` buffer format only (the other two formats stay open): an entry next to `BUF_FMT_16_16_UNORM`, with -32768 clamped to -1.0 per the D3D/Vulkan SNORM rule, and controls on 0x8000, 0x8001, 0x7fff and 0. - **K**, `v_cvt_pk_u8_f32`: byte select from src1, insertion into src2, rounding and clamping cited from LLVM 15 and checked against the existing `compute_store_aot` form if there is one. Each keeps refusing what its fixture doesn't cover. AI-assisted.
Ybucaille commented 2026-11-25 01:02:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Ybucaille on 2026-11-25T00:14:26Z.


Item I is up in #2097 (v_xor3_b32, extends startup_gfx2hlsl_bit_alu_check.py). Item G is up in #2099 (16_16_SNORM only, extends startup_vertex_fetch_formats_check.py). Controls and the llvm-mc fixture checks pass on Linux; the _warp / _hardware draws still need a Windows run. Item K is in progress.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148299016 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7148299016). Originally posted by [Ybucaille](https://github.com/Ybucaille) on 2026-11-25T00:14:26Z. --- Item I is up in #2097 (`v_xor3_b32`, extends `startup_gfx2hlsl_bit_alu_check.py`). Item G is up in #2099 (`16_16_SNORM` only, extends `startup_vertex_fetch_formats_check.py`). Controls and the llvm-mc fixture checks pass on Linux; the `_warp` / `_hardware` draws still need a Windows run. Item K is in progress. AI-assisted.
R0Y00 commented 2026-11-25 01:02:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T00:17:34Z.


Item E is on main in #2062 at 7aa3b53c. The Windows rerun used FXC and DXC on WARP and RTX 4060 Laptop. Each draw matched 1,024 reference words, and all five output-modifier or destination-selection controls produced the expected mismatch. The remainder of this issue still has its own rows and claims.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148356516 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7148356516). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T00:17:34Z. --- Item E is on main in #2062 at 7aa3b53c. The Windows rerun used FXC and DXC on WARP and RTX 4060 Laptop. Each draw matched 1,024 reference words, and all five output-modifier or destination-selection controls produced the expected mismatch. The remainder of this issue still has its own rows and claims.
Ybucaille commented 2026-11-25 01:02:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Ybucaille on 2026-11-25T00:21:45Z.


Item K is up in #2101 (v_cvt_pk_u8_f32, same restriction on S0 as the compute lowering: +0.0 or an integer in 1..255; constants outside are refused). Controls pass on Linux; the _warp / _hardware draws still need a Windows run.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148429501 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7148429501). Originally posted by [Ybucaille](https://github.com/Ybucaille) on 2026-11-25T00:21:45Z. --- Item K is up in #2101 (`v_cvt_pk_u8_f32`, same restriction on S0 as the compute lowering: +0.0 or an integer in 1..255; constants outside are refused). Controls pass on Linux; the `_warp` / `_hardware` draws still need a Windows run. AI-assisted.
R0Y00 commented 2026-11-25 01:02:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T00:41:55Z.


Item G is on main via #2099 (246a875d). I reran the corrected SNORM readback at 0832296e on WARP and RTX 4060 Laptop. Both checked all 12 formats, 16 vertices each, with CPU byte decoding and nine compiled mutations. The typed-buffer route and DXGI format 37 mapping are in that PR; other format rows stay open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148783016 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7148783016). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T00:41:55Z. --- Item G is on main via #2099 (246a875d). I reran the corrected SNORM readback at 0832296e on WARP and RTX 4060 Laptop. Both checked all 12 formats, 16 vertices each, with CPU byte decoding and nine compiled mutations. The typed-buffer route and DXGI format 37 mapping are in that PR; other format rows stay open.
consolelogkyo commented 2026-11-25 01:02:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T00:58:09Z.


I'll take item D (image_load with d16 at mip level zero in tools/startup/gfx2hlsl.py). I'll narrow enabled dmask components from Load to IEEE binary16 with an integer round-to-nearest-even helper (avoiding f32tof16 truncation toward zero on normalized depth values) and pack them pairwise into ceil(popcount(dmask) / 2) destination VGPRs, keep image_load_mip and image_sample* d16 forms refused, and verify with constructed MIMG encodings, negative controls, and desktop GPU readback against DXGI_FORMAT_R16_UNORM and DXGI_FORMAT_R32G32B32A32_FLOAT textures on WARP and hardware.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149073371 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7149073371). Originally posted by [consolelogkyo](https://github.com/consolelogkyo) on 2026-11-25T00:58:09Z. --- I'll take item D (`image_load` with `d16` at mip level zero in `tools/startup/gfx2hlsl.py`). I'll narrow enabled `dmask` components from `Load` to IEEE binary16 with an integer round-to-nearest-even helper (avoiding `f32tof16` truncation toward zero on normalized depth values) and pack them pairwise into `ceil(popcount(dmask) / 2)` destination VGPRs, keep `image_load_mip` and `image_sample*` `d16` forms refused, and verify with constructed MIMG encodings, negative controls, and desktop GPU readback against `DXGI_FORMAT_R16_UNORM` and `DXGI_FORMAT_R32G32B32A32_FLOAT` textures on WARP and hardware. AI-assisted.
R0Y00 commented 2026-11-25 02:02:04 +00:00 (Migrated from github.com)
Author
Contributor

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


There is an overlapping item D implementation in #2119. Please coordinate there before starting a second base-load implementation. The common acceptance needs the bound view type, since float/normalized and integer loads require different conversion, and an input whose ties distinguish binary16 nearest-even from truncation. A source-built mip-zero normalized/float comparison can land first; keep mip and integer forms pending until the same contract is proved. Item I is on main in #2097; the source-built third-input omission fails the translated GPU check on WARP and RTX 4060 Laptop.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149287402 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7149287402). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T01:10:53Z. --- There is an overlapping item D implementation in #2119. Please coordinate there before starting a second base-load implementation. The common acceptance needs the bound view type, since float/normalized and integer loads require different conversion, and an input whose ties distinguish binary16 nearest-even from truncation. A source-built mip-zero normalized/float comparison can land first; keep mip and integer forms pending until the same contract is proved. Item I is on main in #2097; the source-built third-input omission fails the translated GPU check on WARP and RTX 4060 Laptop.
tedin7 commented 2026-11-25 02:02:06 +00:00 (Migrated from github.com)
Author
Contributor

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


Picking up Item B (buffer_load_format_x/xy/xyz format from runtime descriptor) with WARP readback tests.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149495535 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7149495535). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T01:23:27Z. --- Picking up Item B (buffer_load_format_x/xy/xyz format from runtime descriptor) with WARP readback tests.
consolelogkyo commented 2026-11-25 02:02:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T01:29:28Z.


Item D is up in #2139 (image_load with d16 at mip level zero, verified with DXC ps_6_0 and FXC ps_5_1 against R16_UNORM and R32G32B32A32_FLOAT textures and six negative controls on WARP and RX 9070 XT).

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149605470 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7149605470). Originally posted by [consolelogkyo](https://github.com/consolelogkyo) on 2026-11-25T01:29:28Z. --- Item D is up in #2139 (`image_load` with `d16` at mip level zero, verified with DXC `ps_6_0` and FXC `ps_5_1` against `R16_UNORM` and `R32G32B32A32_FLOAT` textures and six negative controls on WARP and RX 9070 XT). AI-assisted.
tedin7 commented 2026-11-25 02:02:07 +00:00 (Migrated from github.com)
Author
Contributor

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


Picking up Item H (v_min_u32 with DPP control) and Item L (lane mask derived from descriptor data) as two separate PRs with D3D12 WARP readback tests.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149833110 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7149833110). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T01:40:58Z. --- Picking up Item H (`v_min_u32` with DPP control) and Item L (lane mask derived from descriptor data) as two separate PRs with D3D12 WARP readback tests.
tedin7 commented 2026-11-25 02:02:08 +00:00 (Migrated from github.com)
Author
Contributor

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


Update: deferring Item H (v_min_u32 DPP) until one of the open DPP base PRs (#2038/#2140/#2141/#2143) lands on main to avoid stacking a conflicting DPP base. Continuing with Item L.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149859205 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7149859205). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T01:42:18Z. --- Update: deferring Item H (`v_min_u32` DPP) until one of the open DPP base PRs (#2038/#2140/#2141/#2143) lands on `main` to avoid stacking a conflicting DPP base. Continuing with Item L.
tedin7 commented 2026-11-25 03:01:23 +00:00 (Migrated from github.com)
Author
Contributor

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


DPP base landed via #2141/#2143; resuming Item H: v_min_u32 with DPP control.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7151185105 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7151185105). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T02:47:10Z. --- DPP base landed via #2141/#2143; resuming Item H: v_min_u32 with DPP control.
RavenCurseBurg commented 2026-11-25 04:04:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T03:41:00Z.


I’ll take the 8_8_8_8_UINT vertex-fetch format in item G. I’ll extend the source-built fixture to check four unsigned channels at unaligned addresses and add a negative control for the channel decoding.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7152145273 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7152145273). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T03:41:00Z. --- I’ll take the `8_8_8_8_UINT` vertex-fetch format in item G. I’ll extend the source-built fixture to check four unsigned channels at unaligned addresses and add a negative control for the channel decoding.
R0Y00 commented 2026-11-25 05:04:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T04:46:23Z.


Item D’s level-zero D16 load is on main in #2139 (ca905008). Independent Windows Release verification passed 10/10 on WARP and RTX 4060 Laptop, including both R16_UNORM double-rounding inputs, the odd-dmask upper-half controls, and refusal of unsupported bound SRVs. If a remaining request uses D16 with a selected mip or an integer view, keep it as a separate reproduction under item D. The other rows remain open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7153150458 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7153150458). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T04:46:23Z. --- Item D’s level-zero D16 load is on `main` in #2139 (`ca905008`). Independent Windows Release verification passed 10/10 on WARP and RTX 4060 Laptop, including both R16_UNORM double-rounding inputs, the odd-`dmask` upper-half controls, and refusal of unsupported bound SRVs. If a remaining request uses D16 with a selected mip or an integer view, keep it as a separate reproduction under item D. The other rows remain open.
ArnabSaga commented 2026-11-25 09:04:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ArnabSaga on 2026-11-25T08:57:09Z.


I'd like to take the 2_10_10_10_UNORM vertex-fetch format in item G.

I'll build on the existing vertex-fetch format table and source-built verification fixture, verify the packed component ordering against LLVM 15 and AMD format definitions, and test normalization, unaligned reads and all four output components on WARP and physical hardware. Negative controls will cover incorrect bit shifts, channel ordering and normalization divisors.

The other buffer formats remain outside this slice.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7157680842 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7157680842). Originally posted by [ArnabSaga](https://github.com/ArnabSaga) on 2026-11-25T08:57:09Z. --- I'd like to take the `2_10_10_10_UNORM` vertex-fetch format in item G. I'll build on the existing vertex-fetch format table and source-built verification fixture, verify the packed component ordering against LLVM 15 and AMD format definitions, and test normalization, unaligned reads and all four output components on WARP and physical hardware. Negative controls will cover incorrect bit shifts, channel ordering and normalization divisors. The other buffer formats remain outside this slice.
ArnabSaga commented 2026-11-25 11:02:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ArnabSaga on 2026-11-25T10:18:33Z.


After checking the existing pull requests, I found that #2006 already covers the 2_10_10_10_UNORM format. I'll withdraw my proposed claim to avoid duplicating that work and investigate another available slice instead.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7159517956 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7159517956). Originally posted by [ArnabSaga](https://github.com/ArnabSaga) on 2026-11-25T10:18:33Z. --- After checking the existing pull requests, I found that #2006 already covers the `2_10_10_10_UNORM` format. I'll withdraw my proposed claim to avoid duplicating that work and investigate another available slice instead.
R0Y00 commented 2026-11-25 15:01:59 +00:00 (Migrated from github.com)
Author
Contributor

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


The descriptor-driven buffer_load_format_x/xy/xyz slice landed in #2138 (a31f70a1). In the independent Windows test, both WARP and RTX 4060 Laptop kept the target clear for missing descriptor metadata, unsupported FORMAT and unresolved storage. With a valid descriptor, zero and one drew black and red. The translated readback passed 17 cases and detected 19 mutations on each adapter.

Build offscreen_check and startup_stream_consumer, then run ctest --preset release --no-tests=error -j 1 -R '^startup_(vertex_fetch_formats_|mubuf_descriptor_)' -V. This evidence is for the formats in the implemented table. The rest of the pipeline inventory stays open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7165398453 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7165398453). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T14:31:02Z. --- The descriptor-driven `buffer_load_format_x/xy/xyz` slice landed in #2138 (`a31f70a1`). In the independent Windows test, both WARP and RTX 4060 Laptop kept the target clear for missing descriptor metadata, unsupported FORMAT and unresolved storage. With a valid descriptor, zero and one drew black and red. The translated readback passed 17 cases and detected 19 mutations on each adapter. Build `offscreen_check` and `startup_stream_consumer`, then run `ctest --preset release --no-tests=error -j 1 -R '^startup_(vertex_fetch_formats_|mubuf_descriptor_)' -V`. This evidence is for the formats in the implemented table. The rest of the pipeline inventory stays open.
consolelogkyo commented 2026-11-25 20:04:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T19:50:52Z.


I'll take an Item F comparison-sampler slice for image_sample_c and image_sample_c_lz in tools/startup/gfx2hlsl.py and src/startup_stubs/translated_sampler_bindings.h: SQ_TEX_CLAMP_BORDER (6) alongside SQ_TEX_CLAMP_LAST_TEXEL (2) in X and Y with fixed SQ_IMG_SAMP_WORD3 BORDER_COLOR_TYPE (TRANS_BLACK, OPAQUE_BLACK, OPAQUE_WHITE), keeping BORDER_COLOR_TYPE == REGISTER, half-border/mirror-once-border modes, and standalone pixel_aot checks refused. I'll include source-built D3D12 draw readback (in-bounds, out-of-bounds, and bilinear border-edge blending across border colors) and negative controls on WARP and AMD hardware.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172843366 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7172843366). Originally posted by [consolelogkyo](https://github.com/consolelogkyo) on 2026-11-25T19:50:52Z. --- I'll take an Item F comparison-sampler slice for `image_sample_c` and `image_sample_c_lz` in `tools/startup/gfx2hlsl.py` and `src/startup_stubs/translated_sampler_bindings.h`: `SQ_TEX_CLAMP_BORDER` (`6`) alongside `SQ_TEX_CLAMP_LAST_TEXEL` (`2`) in X and Y with fixed `SQ_IMG_SAMP_WORD3` `BORDER_COLOR_TYPE` (`TRANS_BLACK`, `OPAQUE_BLACK`, `OPAQUE_WHITE`), keeping `BORDER_COLOR_TYPE == REGISTER`, half-border/mirror-once-border modes, and standalone `pixel_aot` checks refused. I'll include source-built D3D12 draw readback (in-bounds, out-of-bounds, and bilinear border-edge blending across border colors) and negative controls on WARP and AMD hardware. AI-assisted.
consolelogkyo commented 2026-11-25 21:01:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T20:29:50Z.


Item F slice (CLAMP_BORDER + fixed BORDER_COLOR_TYPE for image_sample_c / image_sample_c_lz and static/dynamic sampler decoding) is up in #2549 (016c68ad), verified with DXC ps_6_0 and FXC ps_5_1 across in-bounds, out-of-bounds, mixed-axis, bilinear border PCF, and four negative-control mutations on WARP and Radeon RX 9070 XT.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7173756677 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7173756677). Originally posted by [consolelogkyo](https://github.com/consolelogkyo) on 2026-11-25T20:29:50Z. --- Item F slice (`CLAMP_BORDER` + fixed `BORDER_COLOR_TYPE` for `image_sample_c` / `image_sample_c_lz` and static/dynamic sampler decoding) is up in #2549 (`016c68ad`), verified with DXC `ps_6_0` and FXC `ps_5_1` across in-bounds, out-of-bounds, mixed-axis, bilinear border PCF, and four negative-control mutations on WARP and Radeon RX 9070 XT. AI-assisted.
consolelogkyo commented 2026-11-25 21:01:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T20:58:54Z.


I'll take the Item D explicit-mip follow-up: lowering image_load_mip with d16 in tools/startup/gfx2hlsl.py (2D, 3D and 2D-array views) on top of #2139's pack16_d16 (pack16_rne + pack16_unorm16), d16srv <index> exact SRV validation, and odd-dmask upper-half tracking, keeping compute d16, a16 and tfe refused. I'll include source-built multi-mip D3D12 readback (including R16_UNORM and R32G32B32A32_FLOAT across mips and slices) and negative controls on WARP and AMD hardware.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7174448813 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7174448813). Originally posted by [consolelogkyo](https://github.com/consolelogkyo) on 2026-11-25T20:58:54Z. --- I'll take the Item D explicit-mip follow-up: lowering `image_load_mip` with `d16` in `tools/startup/gfx2hlsl.py` (2D, 3D and 2D-array views) on top of #2139's `pack16_d16` (`pack16_rne` + `pack16_unorm16`), `d16srv <index> exact` SRV validation, and odd-`dmask` upper-half tracking, keeping compute `d16`, `a16` and `tfe` refused. I'll include source-built multi-mip D3D12 readback (including `R16_UNORM` and `R32G32B32A32_FLOAT` across mips and slices) and negative controls on WARP and AMD hardware. AI-assisted.
consolelogkyo commented 2026-11-25 22:02:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by consolelogkyo on 2026-11-25T21:31:47Z.


Item D explicit-mip follow-up (image_load_mip with d16 on 2D, 3D and 2D-array views in tools/startup/gfx2hlsl.py) is up in #2575 (28e58482), verified with DXC ps_6_0 and FXC ps_5_1 across two-mip (8x2 + 4x1) 2D and two-slice 2D-array R16_UNORM and R32G32B32A32_FLOAT textures, odd-dmask upper-half poison checks, and 14 GPU negative-control mutations on WARP and Radeon RX 9070 XT.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7175198251 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7175198251). Originally posted by [consolelogkyo](https://github.com/consolelogkyo) on 2026-11-25T21:31:47Z. --- Item D explicit-mip follow-up (`image_load_mip` with `d16` on 2D, 3D and 2D-array views in `tools/startup/gfx2hlsl.py`) is up in #2575 (`28e58482`), verified with DXC `ps_6_0` and FXC `ps_5_1` across two-mip (`8x2` + `4x1`) 2D and two-slice 2D-array `R16_UNORM` and `R32G32B32A32_FLOAT` textures, odd-`dmask` upper-half poison checks, and 14 GPU negative-control mutations on WARP and Radeon RX 9070 XT. AI-assisted.
SimSalabimse commented 2026-11-26 00:01:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-25T23:57:47Z.


Claiming Item J (s_bitset1_b32, and the natural pair s_bitset0_b32) in tools/startup/gfx2hlsl.py.

Plan: one focused PR on main at e3dda42b. Port the pixel_aot / #1579 lowering (D = D \| (1u << (S0 & 31)) / clear form), refuse lane-mask and descriptor destinations, hand-assembled SOP1 fixture with a negative control that fails when the lowering is disabled. Pure-Python CPU evaluation of the translated text; Windows WARP/hardware draws left for an independent retest if wanted.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178247360 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7178247360). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-25T23:57:47Z. --- Claiming **Item J** (`s_bitset1_b32`, and the natural pair `s_bitset0_b32`) in `tools/startup/gfx2hlsl.py`. Plan: one focused PR on `main` at `e3dda42b`. Port the `pixel_aot` / #1579 lowering (`D = D \| (1u << (S0 & 31))` / clear form), refuse lane-mask and descriptor destinations, hand-assembled SOP1 fixture with a negative control that fails when the lowering is disabled. Pure-Python CPU evaluation of the translated text; Windows WARP/hardware draws left for an independent retest if wanted. AI-assisted.
Leyukaka commented 2026-11-26 02:05:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T01:20:38Z.


@tedin7 taking over Item L since there has been no activity on it for 2 h (claimed in your 2026-11-25 01:40Z comment, last mentioned at 01:42Z; no PR, commit or comment on it since); will hand back if you resume.

On my local capture (counts and instruction shape only), 42 requests stop at mask from descriptor data, with 43 refusal hits between them:

  • 41 hits are s_mov_b64 vcc, s[n:n+1] where s[n:n+1] holds descriptor words. In each, the first later references to vcc or s104..s107 are s[104:107] as the descriptor operand of s_buffer_load_dword*. Over all 43 hits, only one has any later write of vcc or s104..s107. This looks like the compiler assembling a four-dword buffer descriptor whose upper half sits in s106/s107, which vcc aliases.
  • 2 hits are s_mov_b64 exec, s[n:n+1] from descriptor data.

Plan:

  • Record s_mov_b64 vcc, s[n:n+1] from descriptor data as the descriptor symbols of s106/s107 and emit no code, reusing the #2057 path for s_load into s[104:107], so that s[104:107] resolves to the same descriptor as the source registers.

  • Keep it refused on any read of that vcc before it is overwritten, explicit or implicit:

    • v_cndmask, the carry-in of v_addc_co/v_subb_co/v_subbrev_co, v_div_fmas;
    • a vcc/vcc_lo/vcc_hi source operand of any scalar or vector instruction (VOPC e64, SDWA, s_and_saveexec and the like);
    • s_cbranch_vccz/vccnz.

    The only accepted read is s[104:107] as a descriptor operand.

  • exec from descriptor data stays refused.

  • Tests: a hand-assembled pixel shader that builds the descriptor this way and loads through it, checked on WARP against the same load through the original registers, plus refusal controls for the reads above. A mutant that drops the copy must change pixels.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7179678759 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2023#issuecomment-7179678759). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-26T01:20:38Z. --- @tedin7 taking over Item L since there has been no activity on it for 2 h (claimed in your 2026-11-25 01:40Z comment, last mentioned at 01:42Z; no PR, commit or comment on it since); will hand back if you resume. On my local capture (counts and instruction shape only), 42 requests stop at `mask from descriptor data`, with 43 refusal hits between them: - 41 hits are `s_mov_b64 vcc, s[n:n+1]` where `s[n:n+1]` holds descriptor words. In each, the first later references to `vcc` or `s104`..`s107` are `s[104:107]` as the descriptor operand of `s_buffer_load_dword*`. Over all 43 hits, only one has any later write of `vcc` or `s104`..`s107`. This looks like the compiler assembling a four-dword buffer descriptor whose upper half sits in `s106`/`s107`, which `vcc` aliases. - 2 hits are `s_mov_b64 exec, s[n:n+1]` from descriptor data. Plan: - Record `s_mov_b64 vcc, s[n:n+1]` from descriptor data as the descriptor symbols of `s106`/`s107` and emit no code, reusing the #2057 path for `s_load` into `s[104:107]`, so that `s[104:107]` resolves to the same descriptor as the source registers. - Keep it refused on any read of that `vcc` before it is overwritten, explicit or implicit: - `v_cndmask`, the carry-in of `v_addc_co`/`v_subb_co`/`v_subbrev_co`, `v_div_fmas`; - a `vcc`/`vcc_lo`/`vcc_hi` source operand of any scalar or vector instruction (VOPC e64, SDWA, `s_and_saveexec` and the like); - `s_cbranch_vccz`/`vccnz`. The only accepted read is `s[104:107]` as a descriptor operand. - `exec` from descriptor data stays refused. - Tests: a hand-assembled pixel shader that builds the descriptor this way and loads through it, checked on WARP against the same load through the original registers, plus refusal controls for the reads above. A mutant that drops the copy must change pixels. AI-assisted.
Sign in to join this conversation.
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#2016
No description provided.