runtime: bind cube texture SRVs for published native compute #3353

Manually merged
github merged 4 commits from github-bot/gh-3351 into main 2026-11-29 14:08:08 +00:00 AGit
Owner

@⁠JB2WIN on GitHub · 2026-11-28 11:29 UTC · original
JB2WIN:native/compute-cube-srv → main · +405 −23 · 11 files · 4 commits · merged 2026-11-29 14:02 UTC

Refs #3226. Follows #3308 (1D, 2D-array and 3D texture SRVs).

The direct translator declares a cube sample or gather as a TextureCubeArray (DXIL resource kind 9, layer = face >> 3). The published compute manifest had no line for it, so these programs got no <key>.txt.

  • Writer: cube_sample_srv with one descriptor and the cube dimension publishes srv N texcubearr table R B. texcube keeps its draw meaning (TextureCube).
  • Runtime: texcubearr needs a recorded TEXTURECUBE view that fits its texture (six slices). The view is rebuilt as a one-cube TEXTURECUBEARRAY with the same mips and format. Named refusals: no recorded view description, view not cube, view does not fit.
  • The catch-all reader refusal now reads "... 1D/2D/2D-array/3D/cube texture".

Impact, local 2,689-request cohort, measured on the #3308 head with only the writer swapped back: 382 -> 413 manifests (+31), every new one has a texcubearr line, the other 382 are byte-identical.

Tests:

  • native_compute_manifest_reasons: the published line, and the cube kinds that stay refused.
  • startup_compute_dispatch_cube_{controls,warp,hardware}: 2x2 R32_FLOAT cube, 24 distinct texels, lanes over all six faces at texel centres, readback checked against the D3D face mapping (not the translator's own table). Debug layer on, no message. Controls: TEXTURE2DARRAY view, no view description, 12-slice cube view, manifest rewritten to tex2da, tex2d or texcube; each refuses by name and leaves the output untouched.
  • WARP can't build [WaveSize(32)] pipelines, so the WARP run uses an equivalent HLSL program; the hardware run uses the translated DXIL.
  • With the src/ changes reverted, native_compute_manifest_reasons and the three cube tests fail.
  • 181/181 of startup_compute|native_compile_dxil|direct_compute|compute_manifest pass on the rebased branch.

Limits:

  • No run tells the TEXTURECUBEARRAY rewrite apart from binding the TEXTURECUBE view directly (same words, no debug-layer message on WARP or RTX). The rewrite follows the declared kind.
  • Gather on a cube is published the same way but not run by the fixture.
  • Faces >= 8 (cube arrays in the program) and title TEXTURECUBEARRAY views stay out (the latter refused as "not cube").
  • MSAA resources are not excluded; the same gap exists for the other dimensions since #3308 and wants its own change.
  • gfx2hlsl compute still refuses cube; the in-process route is unchanged. No output revision bump (the line was never published before).
  • Not on the default route: since #3451 the launchers set X2W_NATIVE_SHADERS_ONLY=1, and load_compute_translation returns before it reads <key>.txt, so the texcubearr reader is not reached. The in-process route still refuses cube_sample_srv ("view kind ... is not bound for a natively translated program"). The binding applies with -Translate or X2W_NATIVE_SHADERS_ONLY=0.
  • image_load on a cube never reaches publication: the translator refuses it first (unsupported cube or multisample operation).

Ran on RTX 3080 (32.0.16.2124) and WARP, DXC 1.8.2502.11, Windows 26200.

AI-assisted.

🤖 Generated with Claude Code

**@⁠JB2WIN** on GitHub · 2026-11-28 11:29 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351) `JB2WIN:native/compute-cube-srv` → `main` · +405 −23 · 11 files · 4 commits · merged 2026-11-29 14:02 UTC Refs #3226. Follows #3308 (1D, 2D-array and 3D texture SRVs). The direct translator declares a cube sample or gather as a TextureCubeArray (DXIL resource kind 9, layer = face >> 3). The published compute manifest had no line for it, so these programs got no `<key>.txt`. - Writer: `cube_sample_srv` with one descriptor and the cube dimension publishes `srv N texcubearr table R B`. `texcube` keeps its draw meaning (TextureCube). - Runtime: `texcubearr` needs a recorded TEXTURECUBE view that fits its texture (six slices). The view is rebuilt as a one-cube TEXTURECUBEARRAY with the same mips and format. Named refusals: no recorded view description, view not cube, view does not fit. - The catch-all reader refusal now reads "... 1D/2D/2D-array/3D/cube texture". Impact, local 2,689-request cohort, measured on the #3308 head with only the writer swapped back: 382 -> 413 manifests (+31), every new one has a `texcubearr` line, the other 382 are byte-identical. Tests: - `native_compute_manifest_reasons`: the published line, and the cube kinds that stay refused. - `startup_compute_dispatch_cube_{controls,warp,hardware}`: 2x2 R32_FLOAT cube, 24 distinct texels, lanes over all six faces at texel centres, readback checked against the D3D face mapping (not the translator's own table). Debug layer on, no message. Controls: TEXTURE2DARRAY view, no view description, 12-slice cube view, manifest rewritten to `tex2da`, `tex2d` or `texcube`; each refuses by name and leaves the output untouched. - WARP can't build `[WaveSize(32)]` pipelines, so the WARP run uses an equivalent HLSL program; the hardware run uses the translated DXIL. - With the `src/` changes reverted, `native_compute_manifest_reasons` and the three cube tests fail. - 181/181 of `startup_compute|native_compile_dxil|direct_compute|compute_manifest` pass on the rebased branch. Limits: - No run tells the TEXTURECUBEARRAY rewrite apart from binding the TEXTURECUBE view directly (same words, no debug-layer message on WARP or RTX). The rewrite follows the declared kind. - Gather on a cube is published the same way but not run by the fixture. - Faces >= 8 (cube arrays in the program) and title TEXTURECUBEARRAY views stay out (the latter refused as "not cube"). - MSAA resources are not excluded; the same gap exists for the other dimensions since #3308 and wants its own change. - gfx2hlsl compute still refuses cube; the in-process route is unchanged. No output revision bump (the line was never published before). - Not on the default route: since #3451 the launchers set `X2W_NATIVE_SHADERS_ONLY=1`, and `load_compute_translation` returns before it reads `<key>.txt`, so the `texcubearr` reader is not reached. The in-process route still refuses `cube_sample_srv` ("view kind ... is not bound for a natively translated program"). The binding applies with `-Translate` or `X2W_NATIVE_SHADERS_ONLY=0`. - `image_load` on a cube never reaches publication: the translator refuses it first (`unsupported cube or multisample operation`). Ran on RTX 3080 (32.0.16.2124) and WARP, DXC 1.8.2502.11, Windows 26200. AI-assisted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The direct translator declares a cube sample or gather as a TextureCubeArray (DXIL resource kind 9), which
format_compute_runtime_manifest refused ("SRV kind cube_sample_srv cube"). A cube_sample_srv of one cube
is now published as `srv N texcubearr table R B` (`texcube` keeps its draw meaning). The compute reader
takes the name; the stand-in Dispatch binds the title's described TEXTURECUBE view of a six-slice texture
as a one-cube TEXTURECUBEARRAY (same mips and format, First2DArrayFace 0, NumCubes 1), or refuses with a
name: no recorded view description, view is not cube (a TEXTURE2DARRAY or TEXTURECUBEARRAY view), or view
does not fit its texture. Cube arrays, image_load on a cube, cube comparison and descriptor arrays stay
refused at publication; gfx2hlsl.py and the in-process route are unchanged. No native output revision bump
(the line was never published before). The reader catch-all refusal now reads
"... 1D/2D/2D-array/3D/cube texture". Gather on a cube is published the same way but not run by the fixture.

Tests: native_compute_manifest_reasons (published line plus three refusals), and the new
startup_compute_dispatch_cube_{controls,warp,hardware}: a synthetic 24-lane cube-sampling program is
published with compile_dxil --requests and dispatched through startup_stream_consumer (dispatch-cube*)
against a CPU reference from the D3D face mapping (6 faces x 2x2 texels); controls are a TEXTURE2DARRAY
view, no description, a twelve-slice texture, and the manifest line rewritten to tex2da, tex2d or texcube.
WARP cannot create the translator's [WaveSize(32)] shader, so on WARP the test swaps in an HLSL equivalent
and covers the manifest, reader and view only; hardware runs the translated DXIL.

Experiment (not kept): with the TEXTURECUBEARRAY rewrite removed (the title's TEXTURECUBE desc bound as is
against the kind 9 declaration), the positive case on WARP and on the hardware adapter with the D3D12 debug
layer enabled produced no debug-layer message of any severity, all 320 words equal to the reference, no
refusal and no crash. The rewrite is therefore not observable there; it follows the declared DXIL kind.

Impact (local 2,689-request cohort, same build, writer swapped back): 382 -> 413 manifests, each of
the 31 new ones with a texcubearr line, the other 382 byte-identical. 181/181 of the startup_compute,
native_compile_dxil, direct_compute and compute_manifest tests pass (RTX 3080 and WARP); with the src
changes reverted the four new tests fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EF3hKGcUDvQ6pxjDDMrvbn
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 11:38:08 +00:00
Author
Owner

@⁠RonLogic on GitHub · 2026-11-28 12:39 UTC · original

Independent verification at 12568d8acb5a4c7a90a04e5b2e28adae022f93a2. Debug and Release each passed 5/5 for ^(startup_compute_dispatch_cube_.*|native_compute_manifest_reasons(_requests)?)$ on RTX 4070 (driver 32.0.16.2124) and app-local WARP 1.0.22 (Windows 26300.10075, DXC 1.9.2602.17). The stock WARP fixture in that count uses the HLSL replacement.

I also ran the original native blob on app-local WARP, which passed the separate forced-wave32 probe. In a scratch runner I left the published <key>.cs.cso in place instead of calling hlsl_program. The stand-in logged one translated Dispatch(3, 2, 2), but all 288 output slots kept their sentinels in both builds. The first expected word was 0x42c80000, actual 0xc5c5c5c5.

With one fixture-only change, prepend s_mov_b32 exec_lo, 0x00ffffff before the original guest words. That mask covers exactly the 24 guest threads. Still using the native blob, all 288 samples across the six faces matched in both builds. The six view and manifest refusal controls preserved the output and the debug layer reported no errors. This is consistent with the partial-wave entry EXEC behavior tracked in #3162. It verifies the cube-binding path on this WARP build when guest EXEC is explicit and leaves the original fixture failure visible.

cmake --build --preset <dev-or-release> --target compile_dxil startup_stream_consumer d3d12_xs_shim offscreen_check native_compute_manifest_reasons
ctest --preset <dev-or-release> --no-tests=error -j 1 -V -R '^(startup_compute_dispatch_cube_.*|native_compute_manifest_reasons(_requests)?)$'

I used Codex for the scratch runner and ran the verification locally.

**@⁠RonLogic** on GitHub · 2026-11-28 12:39 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#issuecomment-7239381297) Independent verification at `12568d8acb5a4c7a90a04e5b2e28adae022f93a2`. Debug and Release each passed **5/5** for `^(startup_compute_dispatch_cube_.*|native_compute_manifest_reasons(_requests)?)$` on RTX 4070 (driver 32.0.16.2124) and app-local WARP 1.0.22 (Windows 26300.10075, DXC 1.9.2602.17). The stock WARP fixture in that count uses the HLSL replacement. I also ran the original native blob on app-local WARP, which passed the separate forced-wave32 probe. In a scratch runner I left the published `<key>.cs.cso` in place instead of calling `hlsl_program`. The stand-in logged one translated `Dispatch(3, 2, 2)`, but all 288 output slots kept their sentinels in both builds. The first expected word was `0x42c80000`, actual `0xc5c5c5c5`. With one fixture-only change, prepend `s_mov_b32 exec_lo, 0x00ffffff` before the original guest words. That mask covers exactly the 24 guest threads. Still using the native blob, all 288 samples across the six faces matched in both builds. The six view and manifest refusal controls preserved the output and the debug layer reported no errors. This is consistent with the partial-wave entry EXEC behavior tracked in #3162. It verifies the cube-binding path on this WARP build when guest EXEC is explicit and leaves the original fixture failure visible. ```powershell cmake --build --preset <dev-or-release> --target compile_dxil startup_stream_consumer d3d12_xs_shim offscreen_check native_compute_manifest_reasons ctest --preset <dev-or-release> --no-tests=error -j 1 -V -R '^(startup_compute_dispatch_cube_.*|native_compute_manifest_reasons(_requests)?)$' ``` I used Codex for the scratch runner and ran the verification locally.
github-bot force-pushed github-bot/gh-3351 from 12568d8acb to 58694f58d9 2026-11-28 14:26:42 +00:00 Compare
github-bot force-pushed github-bot/gh-3351 from 58694f58d9 to 932b6e8adc 2026-11-28 19:10:40 +00:00 Compare
Author
Owner

@⁠JB2WIN on GitHub · 2026-11-28 19:10 UTC · original

Thanks for running it on both. The WARP fixture uses the HLSL replacement on purpose, since stock WARP builds do not all create the [WaveSize(32)] pipeline from the native blob. Your result fits that: with an explicit exec_lo for the 24 threads the native blob matches, and without it the outputs keep their sentinels, which is the partial-wave entry EXEC behavior from #3162. The hardware run uses the native blob. I left the fixture unchanged so that failure stays visible until #3162 is settled.

Rebased onto main to resolve the startup_stream_consumer.cpp conflict (main's dispatch-scalar-window block kept, cube condition unchanged); the cube tests and native_compute_manifest_reasons pass on the new head. Four compute tests (startup_compute_dispatch_output_{warp,hardware}, startup_compute_half_buffer_uav_{controls,hardware}) fail there too, but they fail the same way on main f5a6f6ba without this commit, so I'll look at that separately.

AI-assisted

**@⁠JB2WIN** on GitHub · 2026-11-28 19:10 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#issuecomment-7244348988) Thanks for running it on both. The WARP fixture uses the HLSL replacement on purpose, since stock WARP builds do not all create the `[WaveSize(32)]` pipeline from the native blob. Your result fits that: with an explicit `exec_lo` for the 24 threads the native blob matches, and without it the outputs keep their sentinels, which is the partial-wave entry EXEC behavior from #3162. The hardware run uses the native blob. I left the fixture unchanged so that failure stays visible until #3162 is settled. Rebased onto main to resolve the `startup_stream_consumer.cpp` conflict (main's `dispatch-scalar-window` block kept, cube condition unchanged); the cube tests and `native_compute_manifest_reasons` pass on the new head. Four compute tests (`startup_compute_dispatch_output_{warp,hardware}`, `startup_compute_half_buffer_uav_{controls,hardware}`) fail there too, but they fail the same way on main f5a6f6ba without this commit, so I'll look at that separately. AI-assisted
Author
Owner

@⁠KelboLive on GitHub · 2026-11-28 20:59 UTC · original · approved these changes

LGTM — clean cube texture support for the published native compute route.

Patches format_compute_runtime_manifest to emit srv N texcubearr table R B for cube_sample_srv, adds texcubearr to the manifest reader (mapping to D3D12_SRV_DIMENSION_TEXTURECUBE), and rewrites the title's TEXTURECUBE view as a one-cube TEXTURECUBEARRAY at dispatch time. The fixture verifies correct D3D face mapping for 24 distinct texels, and refuses -array, -undescribed, -twelve, and manifest mutants.

Ready to land.

**@⁠KelboLive** on GitHub · 2026-11-28 20:59 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#pullrequestreview-6100063637) · **approved these changes** LGTM — clean cube texture support for the published native compute route. Patches `format_compute_runtime_manifest` to emit `srv N texcubearr table R B` for cube_sample_srv, adds `texcubearr` to the manifest reader (mapping to D3D12_SRV_DIMENSION_TEXTURECUBE), and rewrites the title's TEXTURECUBE view as a one-cube TEXTURECUBEARRAY at dispatch time. The fixture verifies correct D3D face mapping for 24 distinct texels, and refuses -array, -undescribed, -twelve, and manifest mutants. Ready to land.
Author
Owner

@⁠KelboLive on GitHub · 2026-11-28 21:57 UTC · original · approved these changes

LGTM — clean cube texture support for the published native compute route.

Patches format_compute_runtime_manifest to emit srv N texcubearr table R B for cube_sample_srv, adds texcubearr to the manifest reader (mapping to D3D12_SRV_DIMENSION_TEXTURECUBE), and rewrites the title's TEXTURECUBE view as a one-cube TEXTURECUBEARRAY at dispatch time. The fixture verifies correct D3D face mapping for 24 distinct texels, and refuses -array, -undescribed, -twelve, and manifest mutants.

Ready to land.

**@⁠KelboLive** on GitHub · 2026-11-28 21:57 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#pullrequestreview-6100254691) · **approved these changes** LGTM — clean cube texture support for the published native compute route. Patches `format_compute_runtime_manifest` to emit `srv N texcubearr table R B` for cube_sample_srv, adds `texcubearr` to the manifest reader (mapping to D3D12_SRV_DIMENSION_TEXTURECUBE), and rewrites the title's TEXTURECUBE view as a one-cube TEXTURECUBEARRAY at dispatch time. The fixture verifies correct D3D face mapping for 24 distinct texels, and refuses -array, -undescribed, -twelve, and manifest mutants. Ready to land.
Author
Owner

@⁠Leyukaka on GitHub · 2026-11-29 06:04 UTC · original · approved these changes

Reviewed the diff at 932b6e8a by reading only (not built or run). git merge-tree against main 212d4b5f is clean.

Checked:

  • Writer (src/direct_compute_cache.cpp:969-973): texcubearr is published exactly for what the translator on main declares as kind 9: cube_sample = dim == 3 && (sample || gather) (src/gfx1013_direct_compute.inl:1081), handle kind 9u (:1105), layer face >> 3 (:1201).
  • Reader (src/startup_stubs/d3d12_compute_dispatch.inl:195): texcubearr requires a recorded TEXTURECUBE view. address_view_fits on main limits it to a 2D resource of exactly 6 slices with MinLODClamp 0 (src/startup_stubs/address_texture.h:104-106).
  • Rewrite (d3d12_compute_dispatch.inl:702-715): works on a local copy of the recorded description, reads the mips before writing the union, and the field order matches both structs.
  • The catch-all string has no user on main other than tests/startup_compute_root_srv_dispatch_check.py:175-179, which the PR updates.
  • project() matches the D3D sc/tc table for all six faces, and direction() is its inverse.

Points:

  1. docs/experiments/startup-compute-native-dispatch.md:97 describes image_load on a cube as "a plain texture_srv of the cube dimension", refused at publication. The translator refuses it earlier (gfx1013_direct_compute.inl:1075-1077, "unsupported cube or multisample operation"), so it never reaches the writer. A texture_srv of dimension 3 comes from the size query (dimensions, op 14, :1029), declared as kind 5. docs/startup-runtime.md:1015 and docs/experiments/native-compile-dxil-refusals.md:29 list image_load on a cube among the unpublished view shapes for the same reason.
  2. These mutations survive the tests: removing the rewrite (stated in the PR), MipLevels = levels -> 1, and MostDetailedMip = most_detailed -> 0. The fixture view is {0, 1, 0.0f} on a one-mip texture. The stand-in enables the debug layer without GPU-based validation (src/startup_stubs/d3d12_xs_device.cpp:8025-8031), so a view/declaration dimension mismatch is not reported.
  3. The manifest tex2da and manifest tex2d controls end in reader branches that already exist on main. The controls that depend on this change are -array, -undescribed, -twelve, manifest texcube and the three new native_compute_manifest_reasons cases.
  4. CI on this PR builds and runs only --preset pr. Its targets include neither compile_dxil nor startup_stream_consumer, and its filter matches none of native_compute_manifest_reasons, startup_compute_dispatch_cube_* or startup_compute_root_srv_*, so none of the changed tests ran. After merge, the push run excludes _hardware$, so the translated-DXIL cube path is covered only by local hardware runs.

Verdict at 932b6e8a: approve. The code is correct as far as reading shows. Point 1 is a wording fix that can follow; points 2-4 are coverage notes, not blockers.

**@⁠Leyukaka** on GitHub · 2026-11-29 06:04 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#pullrequestreview-6101689034) · **approved these changes** Reviewed the diff at 932b6e8a by reading only (not built or run). `git merge-tree` against main 212d4b5f is clean. Checked: - Writer (`src/direct_compute_cache.cpp:969-973`): `texcubearr` is published exactly for what the translator on main declares as kind 9: `cube_sample = dim == 3 && (sample || gather)` (`src/gfx1013_direct_compute.inl:1081`), handle kind `9u` (`:1105`), layer `face >> 3` (`:1201`). - Reader (`src/startup_stubs/d3d12_compute_dispatch.inl:195`): `texcubearr` requires a recorded TEXTURECUBE view. `address_view_fits` on main limits it to a 2D resource of exactly 6 slices with MinLODClamp 0 (`src/startup_stubs/address_texture.h:104-106`). - Rewrite (`d3d12_compute_dispatch.inl:702-715`): works on a local copy of the recorded description, reads the mips before writing the union, and the field order matches both structs. - The catch-all string has no user on main other than `tests/startup_compute_root_srv_dispatch_check.py:175-179`, which the PR updates. - `project()` matches the D3D sc/tc table for all six faces, and `direction()` is its inverse. Points: 1. `docs/experiments/startup-compute-native-dispatch.md:97` describes `image_load` on a cube as "a plain `texture_srv` of the cube dimension", refused at publication. The translator refuses it earlier (`gfx1013_direct_compute.inl:1075-1077`, "unsupported cube or multisample operation"), so it never reaches the writer. A `texture_srv` of dimension 3 comes from the size query (`dimensions`, op 14, `:1029`), declared as kind 5. `docs/startup-runtime.md:1015` and `docs/experiments/native-compile-dxil-refusals.md:29` list `image_load` on a cube among the unpublished view shapes for the same reason. 2. These mutations survive the tests: removing the rewrite (stated in the PR), `MipLevels = levels` -> `1`, and `MostDetailedMip = most_detailed` -> `0`. The fixture view is `{0, 1, 0.0f}` on a one-mip texture. The stand-in enables the debug layer without GPU-based validation (`src/startup_stubs/d3d12_xs_device.cpp:8025-8031`), so a view/declaration dimension mismatch is not reported. 3. The `manifest tex2da` and `manifest tex2d` controls end in reader branches that already exist on main. The controls that depend on this change are `-array`, `-undescribed`, `-twelve`, `manifest texcube` and the three new `native_compute_manifest_reasons` cases. 4. CI on this PR builds and runs only `--preset pr`. Its targets include neither `compile_dxil` nor `startup_stream_consumer`, and its filter matches none of `native_compute_manifest_reasons`, `startup_compute_dispatch_cube_*` or `startup_compute_root_srv_*`, so none of the changed tests ran. After merge, the push run excludes `_hardware$`, so the translated-DXIL cube path is covered only by local hardware runs. Verdict at 932b6e8a: approve. The code is correct as far as reading shows. Point 1 is a wording fix that can follow; points 2-4 are coverage notes, not blockers.
Author
Owner

@⁠Leyukaka on GitHub · 2026-11-29 12:06 UTC · original

This branch conflicts with main 1990fead in tests/startup_stream_consumer.cpp only (one region): main added an if (mode == "dispatch-input-committed-token") { ... } block at the place where this branch adds if (mode.rfind("dispatch-cube", 0) == 0) { ... }.

Resolution: keep both blocks, each with its own closing brace (the conflict leaves a single shared } after the markers).

Nothing else is open from my review: the approval is on 932b6e8a, and the doc wording in point 1 can follow.

**@⁠Leyukaka** on GitHub · 2026-11-29 12:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#issuecomment-7255576683) This branch conflicts with `main` `1990fead` in `tests/startup_stream_consumer.cpp` only (one region): main added an `if (mode == "dispatch-input-committed-token") { ... }` block at the place where this branch adds `if (mode.rfind("dispatch-cube", 0) == 0) { ... }`. Resolution: keep both blocks, each with its own closing brace (the conflict leaves a single shared `}` after the markers). Nothing else is open from my review: the approval is on `932b6e8a`, and the doc wording in point 1 can follow.
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-29 12:55 UTC · original

Review of head 932b6e8a against main af1cab5c. Read only, nothing built or run.

MUST

  1. This conflicts with main. git merge-tree --write-tree --name-only origin/main 932b6e8a exits 1 with CONFLICT (content): Merge conflict in tests/startup_stream_consumer.cpp, in one region. All source files merge cleanly. The 12:06 resolution still applies on af1cab5c: keep both blocks, each with its own closing brace. Please rebase.

SHOULD

  1. No effect on the default launcher path. This is new since the approvals. #3451 (1990fead) landed after this branch's base f5a6f6ba. The launchers now set X2W_NATIVE_SHADERS_ONLY=1, and load_compute_translation returns at if (native_shaders_only()) { before it reads <key>.txt. So nothing reads the new texcubearr line (if (!std::strcmp(name, "texcubearr")) return D3D12_SRV_DIMENSION_TEXTURECUBE; is inside load_compute_translation) in a default run. The in-process route has no cube case. Its texture_input accepts only texture_srv or comparison_texture_srv at image_dimension == 1, so cube_sample_srv (enum value 14) is thrown as view kind 14 is not bound for a natively translated program. The cube binding therefore helps only -Translate or X2W_NATIVE_SHADERS_ONLY=0 runs. Please say so in startup-compute-native-dispatch.md and the body when you rebase. The doc wording on image_load (point 1 of the 06:04 review) can be fixed in the same push.

AI-assisted.

**@⁠JohnConnorNPC** on GitHub · 2026-11-29 12:55 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#issuecomment-7256161136) Review of head `932b6e8a` against `main` `af1cab5c`. Read only, nothing built or run. **MUST** 1. This conflicts with `main`. `git merge-tree --write-tree --name-only origin/main 932b6e8a` exits 1 with `CONFLICT (content): Merge conflict in tests/startup_stream_consumer.cpp`, in one region. All source files merge cleanly. The 12:06 resolution still applies on `af1cab5c`: keep both blocks, each with its own closing brace. Please rebase. **SHOULD** 2. No effect on the default launcher path. This is new since the approvals. #3451 (`1990fead`) landed after this branch's base `f5a6f6ba`. The launchers now set `X2W_NATIVE_SHADERS_ONLY=1`, and `load_compute_translation` returns at `if (native_shaders_only()) {` before it reads `<key>.txt`. So nothing reads the new `texcubearr` line (`if (!std::strcmp(name, "texcubearr")) return D3D12_SRV_DIMENSION_TEXTURECUBE;` is inside `load_compute_translation`) in a default run. The in-process route has no cube case. Its `texture_input` accepts only `texture_srv` or `comparison_texture_srv` at `image_dimension == 1`, so `cube_sample_srv` (enum value 14) is thrown as `view kind 14 is not bound for a natively translated program`. The cube binding therefore helps only `-Translate` or `X2W_NATIVE_SHADERS_ONLY=0` runs. Please say so in `startup-compute-native-dispatch.md` and the body when you rebase. The doc wording on `image_load` (point 1 of the 06:04 review) can be fixed in the same push. AI-assisted.
Author
Owner

@⁠JB2WIN on GitHub · 2026-11-29 13:07 UTC · original

Merged current main (af1cab5c) to clear the conflict: tests/startup_stream_consumer.cpp had the new dispatch-input-committed-token mode (#3433) next to dispatch-cube; both modes are kept. Local run on d456d3f2: startup_compute_dispatch_cube_{controls,warp,hardware}, startup_compute_dispatch_input_{warp,hardware}, startup_compute_dispatch_output_{warp,hardware}, native_compute_manifest_reasons{,_requests}: 9/9 passed.

AI-assisted.

**@⁠JB2WIN** on GitHub · 2026-11-29 13:07 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#issuecomment-7256302039) Merged current `main` (af1cab5c) to clear the conflict: `tests/startup_stream_consumer.cpp` had the new `dispatch-input-committed-token` mode (#3433) next to `dispatch-cube`; both modes are kept. Local run on d456d3f2: `startup_compute_dispatch_cube_{controls,warp,hardware}`, `startup_compute_dispatch_input_{warp,hardware}`, `startup_compute_dispatch_output_{warp,hardware}`, `native_compute_manifest_reasons{,_requests}`: 9/9 passed. AI-assisted.
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-29 13:22 UTC · original

Re-review of the delta 932b6e8a → d456d3f2, a merge of main af1cab5c (read-only, on Linux; no build or run here). MUST 1 (the conflict) is resolved. Two doc SHOULDs are still open, so I'm not merging yet.

Resolved

  • MUST 1: git show --remerge-diff d456d3f2 changes only tests/startup_stream_consumer.cpp. Both blocks are kept, and the PR's dispatch-cube block gets its own closing } ahead of main's dispatch-input-committed-token block, which is the resolution from 12:06. The PR's own changes are the same as before: git diff --stat af1cab5c d456d3f2 and git diff --stat f5a6f6ba 932b6e8a both show 11 files changed, 391 insertions(+), 19 deletions(-). git merge-tree --write-tree origin/main d456d3f2 exits with rc 0 on current main c04e0dd6. Your local 9/9 run on d456d3f2 covers the cube controls, WARP and hardware tests, plus the input and output dispatch tests next to the resolved region.

Still open (SHOULD)

  1. Neither the merge nor the diff of docs/experiments/startup-compute-native-dispatch.md touches the image_load sentence. It still says that image_load on a cube (a plain texture_srv of the cube dimension) is refused at publication. In fact the translator refuses it first (unsupported cube or multisample operation), and a dim-3 texture_srv comes only from the size query.
  2. The default-path note is also missing. Since #3451, the launchers set X2W_NATIVE_SHADERS_ONLY=1, and load_compute_translation returns before it reads texcubearr. The in-process route still throws view kind 14 is not bound for a natively translated program for cube_sample_srv. So this binding takes effect only in -Translate runs or with X2W_NATIVE_SHADERS_ONLY=0. Please state that in the doc and in the PR body.

Both fixes are doc-only. Once they are pushed, this is ready to merge. The approvals are on 932b6e8a, and the code is unchanged since then.

This comment was AI-assisted.

**@⁠JohnConnorNPC** on GitHub · 2026-11-29 13:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#issuecomment-7256492442) Re-review of the delta 932b6e8a → d456d3f2, a merge of main af1cab5c (read-only, on Linux; no build or run here). MUST 1 (the conflict) is resolved. Two doc SHOULDs are still open, so I'm not merging yet. **Resolved** - MUST 1: `git show --remerge-diff d456d3f2` changes only `tests/startup_stream_consumer.cpp`. Both blocks are kept, and the PR's `dispatch-cube` block gets its own closing `}` ahead of main's `dispatch-input-committed-token` block, which is the resolution from 12:06. The PR's own changes are the same as before: `git diff --stat af1cab5c d456d3f2` and `git diff --stat f5a6f6ba 932b6e8a` both show `11 files changed, 391 insertions(+), 19 deletions(-)`. `git merge-tree --write-tree origin/main d456d3f2` exits with rc 0 on current main c04e0dd6. Your local 9/9 run on d456d3f2 covers the cube controls, WARP and hardware tests, plus the input and output dispatch tests next to the resolved region. **Still open (SHOULD)** 1. Neither the merge nor the diff of `docs/experiments/startup-compute-native-dispatch.md` touches the `image_load` sentence. It still says that `image_load` on a cube (a plain `texture_srv` of the cube dimension) is refused at publication. In fact the translator refuses it first (`unsupported cube or multisample operation`), and a dim-3 `texture_srv` comes only from the size query. 2. The default-path note is also missing. Since #3451, the launchers set `X2W_NATIVE_SHADERS_ONLY=1`, and `load_compute_translation` returns before it reads `texcubearr`. The in-process route still throws `view kind 14 is not bound for a natively translated program` for `cube_sample_srv`. So this binding takes effect only in `-Translate` runs or with `X2W_NATIVE_SHADERS_ONLY=0`. Please state that in the doc and in the PR body. Both fixes are doc-only. Once they are pushed, this is ready to merge. The approvals are on 932b6e8a, and the code is unchanged since then. This comment was AI-assisted.
Author
Owner

@⁠Leyukaka on GitHub · 2026-11-29 13:28 UTC · original · approved these changes

Re-checked the delta 932b6e8a -> d456d3f2 by reading only (not built or run).

  • d456d3f2 is a merge commit with parents 932b6e8a and main af1cab5c.
  • The PR's own changes are identical: the added and removed lines of git diff -U0 f5a6f6ba 932b6e8a and git diff -U0 af1cab5c d456d3f2 are the same (11 files, +391/-19 in both).
  • git show --remerge-diff d456d3f2 touches only tests/startup_stream_consumer.cpp. The resolution keeps both blocks: dispatch-cube gets its own closing }, followed by main's dispatch-input-committed-token block unchanged.
  • git merge-tree --write-tree against main 17b662a2 is clean.

Still open, doc-only, not blocking:

  1. docs/experiments/startup-compute-native-dispatch.md:99 still lists image_load on a cube as "a plain texture_srv of the cube dimension" refused at publication. The translator refuses it first (src/gfx1013_direct_compute.inl:1135-1137, "unsupported cube or multisample operation"); a dimension-3 texture_srv comes only from the size query. docs/experiments/native-compile-dxil-refusals.md:29 lists the same case among the kinds without a manifest line.
  2. The docs do not say that the binding is outside the default path. Since the merge of main, load_compute_translation returns at if (native_shaders_only()) (src/startup_stubs/d3d12_compute_dispatch.inl:174) before it reads <key>.txt, so the texcubearr reader (:240) is not reached; the launchers set X2W_NATIVE_SHADERS_ONLY=1 unless -Translate is given (tools/startup/run.ps1:84-101, tools/startup/run.sh:176-178). The in-process route accepts only texture_srv and comparison_texture_srv with image_dimension == 1 as texture inputs and throws "view kind ... is not bound for a natively translated program" for the rest (d3d12_compute_dispatch.inl:400-409). The cube binding therefore applies only with -Translate or X2W_NATIVE_SHADERS_ONLY=0. startup-compute-native-dispatch.md (around :92-100) and the PR body should state it.

The coverage notes 2-4 of the earlier review are unchanged.

**@⁠Leyukaka** on GitHub · 2026-11-29 13:28 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#pullrequestreview-6103076086) · **approved these changes** Re-checked the delta 932b6e8a -> d456d3f2 by reading only (not built or run). - d456d3f2 is a merge commit with parents 932b6e8a and main af1cab5c. - The PR's own changes are identical: the added and removed lines of `git diff -U0 f5a6f6ba 932b6e8a` and `git diff -U0 af1cab5c d456d3f2` are the same (11 files, +391/-19 in both). - `git show --remerge-diff d456d3f2` touches only `tests/startup_stream_consumer.cpp`. The resolution keeps both blocks: `dispatch-cube` gets its own closing `}`, followed by main's `dispatch-input-committed-token` block unchanged. - `git merge-tree --write-tree` against main 17b662a2 is clean. Still open, doc-only, not blocking: 1. `docs/experiments/startup-compute-native-dispatch.md:99` still lists `image_load` on a cube as "a plain `texture_srv` of the cube dimension" refused at publication. The translator refuses it first (`src/gfx1013_direct_compute.inl:1135-1137`, "unsupported cube or multisample operation"); a dimension-3 `texture_srv` comes only from the size query. `docs/experiments/native-compile-dxil-refusals.md:29` lists the same case among the kinds without a manifest line. 2. The docs do not say that the binding is outside the default path. Since the merge of main, `load_compute_translation` returns at `if (native_shaders_only())` (`src/startup_stubs/d3d12_compute_dispatch.inl:174`) before it reads `<key>.txt`, so the `texcubearr` reader (`:240`) is not reached; the launchers set `X2W_NATIVE_SHADERS_ONLY=1` unless `-Translate` is given (`tools/startup/run.ps1:84-101`, `tools/startup/run.sh:176-178`). The in-process route accepts only `texture_srv` and `comparison_texture_srv` with `image_dimension == 1` as texture inputs and throws "view kind ... is not bound for a natively translated program" for the rest (`d3d12_compute_dispatch.inl:400-409`). The cube binding therefore applies only with `-Translate` or `X2W_NATIVE_SHADERS_ONLY=0`. `startup-compute-native-dispatch.md` (around `:92-100`) and the PR body should state it. The coverage notes 2-4 of the earlier review are unchanged.
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-29 13:36 UTC · original

This was ready to merge at d456d3f2 (0 MUST, approved at head). #3400 landed just before, and now the branch conflicts with main 4b0586d4. git merge-tree --write-tree --name-only origin/main d456d3f2 exits 1 with two conflicts. Source files merge cleanly.

  1. docs/startup-runtime.md: the native dispatch paragraph. main now lists the texture UAVs from #3400 (four-channel float and packed half4 UAVs in 1D, 2D, 2D-array and 3D; exact-width float UAVs in 2D, 2D-array and 3D), plus root buffer SRVs, and says "Cube texture SRVs are not published." Keep main's wording. Replace that last sentence with this branch's texcubearr sentence, and correct its image_load clause the way the earlier doc SHOULD asked.
  2. tests/native_compute_manifest_reasons.cpp: the published[] table. main keys each row by binding (0 = SRV, 1 = UAV) and adds four uav 0 tex* float … channels 4 rows. This branch keys rows by kind and adds {K::cube_sample_srv, 3, "srv 0 texcubearr table 1 64\n"}. One way to merge them is to keep main's binding field, add a K kind field, list main's eight rows plus the cube row, and set binding.kind = c.kind in the loop.

Please merge main again and re-run native_compute_manifest_reasons{,_requests} and startup_compute_dispatch_cube_{controls,warp,hardware}. Since 0 MUST is open, it merges once the branch is clean.

AI-assisted.

**@⁠JohnConnorNPC** on GitHub · 2026-11-29 13:36 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#issuecomment-7256670551) This was ready to merge at `d456d3f2` (0 MUST, approved at head). #3400 landed just before, and now the branch conflicts with `main` `4b0586d4`. `git merge-tree --write-tree --name-only origin/main d456d3f2` exits 1 with two conflicts. Source files merge cleanly. 1. `docs/startup-runtime.md`: the native dispatch paragraph. `main` now lists the texture UAVs from #3400 (four-channel float and packed half4 UAVs in 1D, 2D, 2D-array and 3D; exact-width float UAVs in 2D, 2D-array and 3D), plus root buffer SRVs, and says "Cube texture SRVs are not published." Keep `main`'s wording. Replace that last sentence with this branch's `texcubearr` sentence, and correct its `image_load` clause the way the earlier doc SHOULD asked. 2. `tests/native_compute_manifest_reasons.cpp`: the `published[]` table. `main` keys each row by `binding` (0 = SRV, 1 = UAV) and adds four `uav 0 tex* float … channels 4` rows. This branch keys rows by `kind` and adds `{K::cube_sample_srv, 3, "srv 0 texcubearr table 1 64\n"}`. One way to merge them is to keep `main`'s `binding` field, add a `K kind` field, list `main`'s eight rows plus the cube row, and set `binding.kind = c.kind` in the loop. Please merge `main` again and re-run `native_compute_manifest_reasons{,_requests}` and `startup_compute_dispatch_cube_{controls,warp,hardware}`. Since 0 MUST is open, it merges once the branch is clean. AI-assisted.
# Conflicts:
#	docs/startup-runtime.md
#	tests/native_compute_manifest_reasons.cpp
Review of #3351 (JohnConnorNPC, Leyukaka).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠JB2WIN on GitHub · 2026-11-29 13:54 UTC · original

Merged main (e3f9a64f) again and addressed both doc points (bcaacadf merge, d396c1e1 docs):

  • docs/startup-runtime.md: kept main's wording and replaced "Cube texture SRVs are not published." with the texcubearr sentence; image_load on a cube is now described as refused by the translator; added the default-route note.
  • tests/native_compute_manifest_reasons.cpp: one table with binding and kind, main's eight rows plus the cube row, binding.kind = c.kind.
  • startup-compute-native-dispatch.md and native-compile-dxil-refusals.md: the image_load clause and the default-route note. PR body updated.

Local on d396c1e1: native_compute_manifest_reasons{,_requests} (the run prints publishes srv 0 texcubearr and the four uav ... channels 4 rows), startup_compute_dispatch_cube_{controls,warp,hardware}, startup_compute_dispatch_{input,output}_{warp,hardware}: 9/9 passed.

AI-assisted.

**@⁠JB2WIN** on GitHub · 2026-11-29 13:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#issuecomment-7256895816) Merged `main` (e3f9a64f) again and addressed both doc points (bcaacadf merge, d396c1e1 docs): - `docs/startup-runtime.md`: kept main's wording and replaced "Cube texture SRVs are not published." with the `texcubearr` sentence; `image_load` on a cube is now described as refused by the translator; added the default-route note. - `tests/native_compute_manifest_reasons.cpp`: one table with `binding` and `kind`, main's eight rows plus the cube row, `binding.kind = c.kind`. - `startup-compute-native-dispatch.md` and `native-compile-dxil-refusals.md`: the `image_load` clause and the default-route note. PR body updated. Local on d396c1e1: `native_compute_manifest_reasons{,_requests}` (the run prints `publishes srv 0 texcubearr` and the four `uav ... channels 4` rows), `startup_compute_dispatch_cube_{controls,warp,hardware}`, `startup_compute_dispatch_{input,output}_{warp,hardware}`: 9/9 passed. AI-assisted.
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-29 14:02 UTC · original

Re-review of the delta d456d3f2 → d396c1e1 (read-only, on Linux; no build or run here). Verdict: merge (0 MUST).

  • Conflict resolution (bcaacadf, merge of main e3f9a64f). git show --remerge-diff bcaacadf touches only the two conflicting files. In docs/startup-runtime.md main's paragraph is kept, and "Cube texture SRVs are not published" is replaced by the texcubearr sentence. In tests/native_compute_manifest_reasons.cpp main's published[] table, keyed by binding, gains a kind column and the {0, K::cube_sample_srv, 3, "srv 0 texcubearr table 1 64\n"} row. binding.kind = c.kind gives the four UAV rows K::texture_uav, the same as main's c.binding == 0 ? K::texture_srv : K::texture_uav.
  • Code unchanged. The added and removed lines in src/ and tools/ match between af1cab5c..d456d3f2 and e3f9a64f..d396c1e1. The approved code is what merges.
  • Both doc SHOULDs are resolved. The image_load sentence now says the translator refuses it first (unsupported cube or multisample operation). The default-path note matches the code: run.ps1 sets X2W_NATIVE_SHADERS_ONLY = "1" on the native branch and "0" otherwise, and load_compute_translation returns under native_shaders_only() before it reads <key>.txt.
  • git merge-tree --write-tree origin/main d396c1e1 rc 0. Windows, Linux and gfx1013 CI pass at d396c1e1. git diff --check rc 0.

The two NITs (rewrite unpinned, cube gather and faces ≥ 8 not run) are stated in Limits and do not block the merge.

AI-assisted review.

**@⁠JohnConnorNPC** on GitHub · 2026-11-29 14:02 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3351#issuecomment-7256990990) Re-review of the delta `d456d3f2` → `d396c1e1` (read-only, on Linux; no build or run here). **Verdict: merge** (0 MUST). - **Conflict resolution (`bcaacadf`, merge of main `e3f9a64f`).** `git show --remerge-diff bcaacadf` touches only the two conflicting files. In `docs/startup-runtime.md` main's paragraph is kept, and "Cube texture SRVs are not published" is replaced by the `texcubearr` sentence. In `tests/native_compute_manifest_reasons.cpp` main's `published[]` table, keyed by binding, gains a `kind` column and the `{0, K::cube_sample_srv, 3, "srv 0 texcubearr table 1 64\n"}` row. `binding.kind = c.kind` gives the four UAV rows `K::texture_uav`, the same as main's `c.binding == 0 ? K::texture_srv : K::texture_uav`. - **Code unchanged.** The added and removed lines in `src/` and `tools/` match between `af1cab5c..d456d3f2` and `e3f9a64f..d396c1e1`. The approved code is what merges. - **Both doc SHOULDs are resolved.** The `image_load` sentence now says the translator refuses it first (`unsupported cube or multisample operation`). The default-path note matches the code: `run.ps1` sets `X2W_NATIVE_SHADERS_ONLY = "1"` on the native branch and `"0"` otherwise, and `load_compute_translation` returns under `native_shaders_only()` before it reads `<key>.txt`. - `git merge-tree --write-tree origin/main d396c1e1` rc 0. Windows, Linux and gfx1013 CI pass at `d396c1e1`. `git diff --check` rc 0. The two NITs (rewrite unpinned, cube gather and faces ≥ 8 not run) are stated in Limits and do not block the merge. AI-assisted review.
github manually merged commit 0ed385dc03 into main 2026-11-29 14:08:08 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.