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

Merged
Jess-Doit merged 1 commit from upstream-pr/869 into main 2026-11-23 15:31:43 +00:00
Jess-Doit commented 2026-11-23 14:54:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-23T14:54:36Z.


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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6562037384 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/869). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-23T14:54:36Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 06:45:10 +00:00
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!863
No description provided.