shader: verify lit mesh fallback at Shader Model 6.0 #869

Manually merged
github merged 1 commit from gh-pr/869/head into gh-pr/869/base 2026-11-26 22:24:56 +00:00
Owner

@⁠Jess-Doit on GitHub · 2026-11-23 14:54 UTC · original
Jess-Doit:test/mesh-lit-fallback → main · +79 −33 · 3 files · 1 commits · merged 2026-11-23 15:31 UTC

Change

Run the indexed lit-mesh fixture through the existing Shader Model 6.0 compute and vertex fallback. The fixture uses the same translated mesh and pixel programs and exact CPU image reference as #749. It checks the raw PARAM0 normal exports in indexed order, then checks the interpolated lighting drawn with the light from pixel CBV b0.

Verification

Tested commit 301bfae1affd5fb98d8f5854bca51398647a119a in Debug and Release on Windows 10 22H2 build 19045.6456 with DXC 1.9.2602.17.

Adapter SM 6.0 fallback Native mesh
GTX 1060 6 GB, driver 32.0.15.6094 Passed Capability skip
Windows 10 in-box WARP 10.0.19041.5794 Passed Capability skip
App-local WARP 1.0.22.0 with Agility SDK 1.620.2 Passed Passed

In every fallback run, three lights and the flat-normal and unclamped variants matched all 1,024 RGBA pixels. The three stale image references returned 1 with Draw reference mismatch and exactly 276, 276 and 132 mismatches for the inverted light, flat normal and missing clamp, respectively. All eight draws matched all 128 export bytes and reported zero D3D12 warnings and errors.

The focused matrix included adjacent indexed, attribute, descriptor, texture and depth-pair fixtures and the capability self-test. It returned 54 passes, 32 expected native mesh capability skips and zero failures.

$env:XBOX2WINDOWS_ADAPTER = 'GTX 1060'
$mesh = 'mesh_(lit_(draw|fallback)|indexed_(draw|fallback)|attribute_draw|descriptor_swap|cbv_order|textured_(draw|fallback)|depth_pair(_fallback)?)'
$inBox = "^(${mesh}_(hardware|warp)|compute_mesh_texture(_fallback)?_(hardware|warp)|offscreen_capability_table_self_test|docs_links)$"
$appLocal = "^(${mesh}_warp|compute_mesh_texture(_fallback)?_warp|offscreen_capability_table_self_test|app_local_warp_toggle)$"
foreach ($preset in 'dev', 'release') {
    cmake --preset $preset
    cmake --build --preset $preset --parallel 4 --target offscreen_check
    ctest --preset $preset --no-tests=error -V -R $inBox

    $build = "out/build/app-local-$preset"
    cmake --preset $preset -B $build "-DOFFSCREEN_AGILITY_620_DIR=$agility" "-DOFFSCREEN_WARP_DIR=$warp"
    cmake --build $build --parallel 4 --target offscreen_check
    ctest --test-dir $build --no-tests=error -V -R $appLocal
}
python -B tests/bidi_controls_check.py
git diff HEAD^ HEAD --check

Set $agility and $warp to the local SDK and WARP DLL directories. The bidirectional-control and whitespace checks passed. The existing LLVM binary round-trip still needs the Ubuntu CI job. The local Windows LLVM DLLs lacked the LLVMInitializeAMDGPUTargetInfo export needed by that check.

Evidence and follow-up

The fixtures are built from the repository's MIT-licensed sources. The fallback retains the native fixture's ambient offset so small rasterizer differences cannot move the expected half-float export across a rounding boundary. See the mesh experiments for the focused command.

AI-assisted implementation and verification.

Checklist

  • This pull request covers one reviewable behavior.
  • Verification includes the commands, adapter results and capability skips.
  • All three stale-reference controls failed as expected.
  • Experiment documentation includes the fallback and its reproduction command.
  • The patch contains source-built fixtures and documentation.
**@⁠Jess-Doit** on GitHub · 2026-11-23 14:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/869) `Jess-Doit:test/mesh-lit-fallback` → `main` · +79 −33 · 3 files · 1 commits · merged 2026-11-23 15:31 UTC ## Change Run the indexed lit-mesh fixture through the existing Shader Model 6.0 compute and vertex fallback. The fixture uses the same translated mesh and pixel programs and exact CPU image reference as #749. It checks the raw PARAM0 normal exports in indexed order, then checks the interpolated lighting drawn with the light from pixel CBV b0. ## Verification Tested commit `301bfae1affd5fb98d8f5854bca51398647a119a` in Debug and Release on Windows 10 22H2 build 19045.6456 with DXC 1.9.2602.17. | Adapter | SM 6.0 fallback | Native mesh | | --- | --- | --- | | GTX 1060 6 GB, driver 32.0.15.6094 | Passed | Capability skip | | Windows 10 in-box WARP 10.0.19041.5794 | Passed | Capability skip | | App-local WARP 1.0.22.0 with Agility SDK 1.620.2 | Passed | Passed | In every fallback run, three lights and the flat-normal and unclamped variants matched all 1,024 RGBA pixels. The three stale image references returned 1 with `Draw reference mismatch` and exactly 276, 276 and 132 mismatches for the inverted light, flat normal and missing clamp, respectively. All eight draws matched all 128 export bytes and reported zero D3D12 warnings and errors. The focused matrix included adjacent indexed, attribute, descriptor, texture and depth-pair fixtures and the capability self-test. It returned 54 passes, 32 expected native mesh capability skips and zero failures. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'GTX 1060' $mesh = 'mesh_(lit_(draw|fallback)|indexed_(draw|fallback)|attribute_draw|descriptor_swap|cbv_order|textured_(draw|fallback)|depth_pair(_fallback)?)' $inBox = "^(${mesh}_(hardware|warp)|compute_mesh_texture(_fallback)?_(hardware|warp)|offscreen_capability_table_self_test|docs_links)$" $appLocal = "^(${mesh}_warp|compute_mesh_texture(_fallback)?_warp|offscreen_capability_table_self_test|app_local_warp_toggle)$" foreach ($preset in 'dev', 'release') { cmake --preset $preset cmake --build --preset $preset --parallel 4 --target offscreen_check ctest --preset $preset --no-tests=error -V -R $inBox $build = "out/build/app-local-$preset" cmake --preset $preset -B $build "-DOFFSCREEN_AGILITY_620_DIR=$agility" "-DOFFSCREEN_WARP_DIR=$warp" cmake --build $build --parallel 4 --target offscreen_check ctest --test-dir $build --no-tests=error -V -R $appLocal } python -B tests/bidi_controls_check.py git diff HEAD^ HEAD --check ``` Set `$agility` and `$warp` to the local SDK and WARP DLL directories. The bidirectional-control and whitespace checks passed. The existing LLVM binary round-trip still needs the Ubuntu CI job. The local Windows LLVM DLLs lacked the `LLVMInitializeAMDGPUTargetInfo` export needed by that check. ## Evidence and follow-up The fixtures are built from the repository's MIT-licensed sources. The fallback retains the native fixture's ambient offset so small rasterizer differences cannot move the expected half-float export across a rounding boundary. See [the mesh experiments](docs/experiments.md) for the focused command. AI-assisted implementation and verification. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] Verification includes the commands, adapter results and capability skips. - [x] All three stale-reference controls failed as expected. - [x] Experiment documentation includes the fallback and its reproduction command. - [x] The patch contains source-built fixtures and documentation.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:24:55 +00:00
github manually merged commit 301bfae1af into gh-pr/869/base 2026-11-26 22:24:56 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.