shader: lower gfx1030 comparison sample LOD and bias #1561

Merged
stan495 merged 4 commits from upstream-pr/1568 into main 2026-11-26 01:02:19 +00:00
stan495 commented 2026-11-24 14:19:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-24T14:19:06Z.


Summary

Lower gfx1030 image_sample_c_l, image_sample_c_l_o, image_sample_c_b and image_sample_c_b_o for the two-mip 2D point-comparison profile. Use SampleCmpLevel for an explicit level and SampleCmpBias for an instruction bias. The profile accepts statically known +0.0 or 1.0, red dmask:0x1 and contiguous full-width operands with an optional signed XY offset. Bias requires whole-quad UVs. The sampler uses normalized clamp-to-edge addressing, point XY and mip filtering, and LOD range 0 through 1.

Refs #1487

Verification

Tested clean head 97a4bb5e6efd3ed7aaeb5e8970d9e2986cf1db45 on 9e7bed97fe4e0371be12dccdc83e7556ec5f0c4a.

. .\tools\dev.ps1
$root = (Get-Location).Path
cmake --preset dev -DINTAKE_PYTHON=<python.exe>
cmake --build --preset dev --target offscreen_check
$env:TEMP = "$root/out"
$env:TMP = $env:TEMP
ctest --preset dev --no-tests=error -j 1 -R '^pixel_aot_(compare_lod_(level|bias)|compare_sample|compare|gather|sample_lod|sample_offset)_(warp|hardware)$' -V --output-junit "$root/out/cmp-lod-97a4bb5e.xml"
python -B tools/form_coverage.py out/cmp-lod-97a4bb5e.xml --records out/build/dev/form_coverage --json out/cmp-lod-97a4bb5e.coverage.json
python -B tests/pixel_compare_lod_check.py compile level dxc
python -B tests/pixel_compare_lod_check.py compile bias dxc
python -B tests/form_coverage_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py

CTest reported 13 passes, 0 failures and 1 capability skip. Both adapters passed both level forms. WARP passed both bias forms. Arc B390 reported Comparison bias requires SampleCmpGradientAndBiasSupported and returned 77. The two passing WARP records contain all four forms. The hardware level record contains both level forms.

Translated pixels matched the CPU reference at 8×8 and 16×16. Setting the level or bias operand to zero first changed red from 1 to 0 at (2,0) without an offset and at (0,0) with an offset. Setting the signed offset to zero first changed red from 1 to 0 at (0,0). The translator rejects a dynamic level, unsupported sampler modes and an unwaited read. Both DXC compile checks and the three Python checks passed.

Windows 11 build 26300.9974, Intel Arc B390 driver 32.0.101.8509, Microsoft WARP 10.0.26100.9818. The debug layer was unavailable.

python3 -B tests/pixel_compare_lod_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1
python3 -B tests/pixel_compare_sample_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1
python3 -B tests/pixel_sample_offset_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1
python3 -B tests/pixel_sample_gradient_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 llc-15
python3 -B tests/pixel_gather_check.py --binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1

All five LLVM checks passed. The four added forms assembled, disassembled and translated through the synthetic-container CLI. git diff --check origin/main...HEAD and git merge-tree --write-tree origin/main HEAD passed. A separate simulation merged #1562, #1565 and this branch in that order against 800a4500e27fd36221bd0373081967f69770c043.

Physical GPU follow-up

Tested the clean PR head 97a4bb5e6efd3ed7aaeb5e8970d9e2986cf1db45 on Windows 11 x64 (25H2, build 26200.9974) with MSVC 19.44.35228.0 and DXC from Windows SDK 10.0.26100.0. The same 14-test CTest selection above passed with no failures or capability skips.

Backend Adapter Driver D3D12 debug layer Level Bias CTest results
Hardware AMD Radeon RX 7900 XTX 32.0.32029.2010 Enabled Pass Pass 7 passed, 0 failed, 0 skipped
WARP Microsoft Basic Render Driver 10.0.26100.9818 Enabled Pass Pass 7 passed, 0 failed, 0 skipped

The RX 7900 XTX passed the SM 6.8 and D3D12_OPTIONS21.SampleCmpGradientAndBiasSupported checks. Both image_sample_c_b and image_sample_c_b_o matched the CPU pixel reference at 8×8 and 16×16 on the physical GPU. Both backends recorded all four level and bias forms. The D3D12 debug layer reported zero errors and warnings on the level and bias tests.

For the bias mutations, setting the bias operand to zero first changed red from 1 to 0 at (2,0) for image_sample_c_b and at (0,0) for image_sample_c_b_o. Setting the signed offset to zero first changed red from 1 to 0 at (0,0). The first mismatch coordinates were the same at both sizes and on both backends.

To rerun the physical GPU checks after building offscreen_check as above, run the following from the repository root.

$root = (Get-Location).Path
ctest --preset dev --no-tests=error -j 1 -R '^pixel_aot_compare_lod_(level|bias)_hardware$' -V --output-junit "$root/out/cmp-lod-second-gpu.xml"
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6583859898 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1568). Originally posted by [stan495](https://github.com/stan495) on 2026-11-24T14:19:06Z. --- ## Summary Lower gfx1030 `image_sample_c_l`, `image_sample_c_l_o`, `image_sample_c_b` and `image_sample_c_b_o` for the two-mip 2D point-comparison profile. Use `SampleCmpLevel` for an explicit level and `SampleCmpBias` for an instruction bias. The profile accepts statically known `+0.0` or `1.0`, red `dmask:0x1` and contiguous full-width operands with an optional signed XY offset. Bias requires whole-quad UVs. The sampler uses normalized clamp-to-edge addressing, point XY and mip filtering, and LOD range 0 through 1. Refs #1487 ## Verification Tested clean head `97a4bb5e6efd3ed7aaeb5e8970d9e2986cf1db45` on `9e7bed97fe4e0371be12dccdc83e7556ec5f0c4a`. ```powershell . .\tools\dev.ps1 $root = (Get-Location).Path cmake --preset dev -DINTAKE_PYTHON=<python.exe> cmake --build --preset dev --target offscreen_check $env:TEMP = "$root/out" $env:TMP = $env:TEMP ctest --preset dev --no-tests=error -j 1 -R '^pixel_aot_(compare_lod_(level|bias)|compare_sample|compare|gather|sample_lod|sample_offset)_(warp|hardware)$' -V --output-junit "$root/out/cmp-lod-97a4bb5e.xml" python -B tools/form_coverage.py out/cmp-lod-97a4bb5e.xml --records out/build/dev/form_coverage --json out/cmp-lod-97a4bb5e.coverage.json python -B tests/pixel_compare_lod_check.py compile level dxc python -B tests/pixel_compare_lod_check.py compile bias dxc python -B tests/form_coverage_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py ``` CTest reported 13 passes, 0 failures and 1 capability skip. Both adapters passed both level forms. WARP passed both bias forms. Arc B390 reported `Comparison bias requires SampleCmpGradientAndBiasSupported` and returned 77. The two passing WARP records contain all four forms. The hardware level record contains both level forms. Translated pixels matched the CPU reference at 8×8 and 16×16. Setting the level or bias operand to zero first changed red from `1` to `0` at `(2,0)` without an offset and at `(0,0)` with an offset. Setting the signed offset to zero first changed red from `1` to `0` at `(0,0)`. The translator rejects a dynamic level, unsupported sampler modes and an unwaited read. Both DXC compile checks and the three Python checks passed. Windows 11 build `26300.9974`, Intel Arc B390 driver `32.0.101.8509`, Microsoft WARP `10.0.26100.9818`. The debug layer was unavailable. ```sh python3 -B tests/pixel_compare_lod_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 python3 -B tests/pixel_compare_sample_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 python3 -B tests/pixel_sample_offset_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 python3 -B tests/pixel_sample_gradient_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 llc-15 python3 -B tests/pixel_gather_check.py --binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` All five LLVM checks passed. The four added forms assembled, disassembled and translated through the synthetic-container CLI. `git diff --check origin/main...HEAD` and `git merge-tree --write-tree origin/main HEAD` passed. A separate simulation merged #1562, #1565 and this branch in that order against `800a4500e27fd36221bd0373081967f69770c043`. ## Physical GPU follow-up Tested the clean PR head `97a4bb5e6efd3ed7aaeb5e8970d9e2986cf1db45` on Windows 11 x64 (25H2, build `26200.9974`) with MSVC `19.44.35228.0` and DXC from Windows SDK `10.0.26100.0`. The same 14-test CTest selection above passed with no failures or capability skips. | Backend | Adapter | Driver | D3D12 debug layer | Level | Bias | CTest results | | --- | --- | --- | --- | --- | --- | --- | | Hardware | AMD Radeon RX 7900 XTX | `32.0.32029.2010` | Enabled | Pass | Pass | 7 passed, 0 failed, 0 skipped | | WARP | Microsoft Basic Render Driver | `10.0.26100.9818` | Enabled | Pass | Pass | 7 passed, 0 failed, 0 skipped | The RX 7900 XTX passed the SM 6.8 and `D3D12_OPTIONS21.SampleCmpGradientAndBiasSupported` checks. Both `image_sample_c_b` and `image_sample_c_b_o` matched the CPU pixel reference at 8×8 and 16×16 on the physical GPU. Both backends recorded all four level and bias forms. The D3D12 debug layer reported zero errors and warnings on the level and bias tests. For the bias mutations, setting the bias operand to zero first changed red from `1` to `0` at `(2,0)` for `image_sample_c_b` and at `(0,0)` for `image_sample_c_b_o`. Setting the signed offset to zero first changed red from `1` to `0` at `(0,0)`. The first mismatch coordinates were the same at both sizes and on both backends. To rerun the physical GPU checks after building `offscreen_check` as above, run the following from the repository root. ```powershell $root = (Get-Location).Path ctest --preset dev --no-tests=error -j 1 -R '^pixel_aot_compare_lod_(level|bias)_hardware$' -V --output-junit "$root/out/cmp-lod-second-gpu.xml" ```
tedin7 commented 2026-11-24 15:02:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T14:30:45Z.

Review: COMMENTED


Dual-platform peer review of PR #1568 (97a4bb5e6efd3ed7aaeb5e8970d9e2986cf1db45).

Code & Hygiene Audit

  • Scope & Clean-room: Title-neutral, focused on lowering gfx1030 image_sample_c_l, image_sample_c_l_o, image_sample_c_b, and image_sample_c_b_o to SampleCmpLevel / SampleCmpBias in tools/pixel_aot.py, plus two-mip support in tests/pixel_compare_render.cpp and tests/offscreen_check.cpp. Merges cleanly against origin/main.
  • Correctness & Edge Cases:
    • Address operand order matches RDNA2 (offset, bias, reference, U, V, explicit_lod), popping offset first if _o, then lod from the back (_l) or bias from the front (_b), leaving [reference, u, v].
    • Enforces statically known +0.0 (0) or 1.0 (0x3f800000) for the LOD/bias operand, MAX_LOD = 1, point XY and mip filtering, vmcnt wait before use, and whole-quad UV provenance for _b (not required for _l).
    • tests/offscreen_check.cpp gates SM 6.7 AdvancedTextureOpsSupported (level) and SM 6.8 SampleCmpGradientAndBiasSupported (bias), returning skip (77) when unavailable or on older SDK headers.
    • tests/pixel_compare_render.cpp validates texWidth >= 2 && texHeight >= 2 for two-mip cases and uploads both subresources cleanly.
  • Negative controls & coverage: tests/pixel_compare_lod_check.py checks 8x8 and 16x16 readbacks, zeroed LOD/bias and zeroed offset mutations against predicted first pixel mismatches, and translator rejections (dynamic/out-of-range LOD/bias, unsupported sampler modes, dmask, a16, unwaited operand, missing quad provenance for bias, out-of-range offset).

Verification

  • Linux checks:
    • git diff --check origin/main..HEAD: passed
    • python3 tests/docs_links_check.py: passed (16 Markdown files, 345 links)
    • python3 tests/bidi_controls_check.py: passed (1255 tracked files)
    • python3 -B tests/pixel_compare_lod_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: passed
  • Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at 97a4bb5e6efd3ed7aaeb5e8970d9e2986cf1db45:
    • Windows Python checks: tests/form_coverage_check.py passed (43.16s)
    • Debug (--preset dev): cmake --build --preset dev --target offscreen_check -- -j 6 succeeded; ctest --preset dev -R '^pixel_aot_compare_lod_' --parallel 4 --no-tests=error --output-on-failure — 4/4 passed (pixel_aot_compare_lod_level_warp, pixel_aot_compare_lod_bias_warp, pixel_aot_compare_lod_level_hardware, pixel_aot_compare_lod_bias_hardware; note: this VM only has WARP)
    • Release /O2 (--preset release): cmake --build --preset release --target offscreen_check -- -j 6 succeeded; ctest --preset release -R '^pixel_aot_compare_lod_' --parallel 4 --no-tests=error --output-on-failure — 4/4 passed (same 4 tests)
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6041097073 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1568#pullrequestreview-6041097073). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T14:30:45Z. **Review:** COMMENTED --- Dual-platform peer review of PR #1568 (`97a4bb5e6efd3ed7aaeb5e8970d9e2986cf1db45`). ### Code & Hygiene Audit - **Scope & Clean-room**: Title-neutral, focused on lowering gfx1030 `image_sample_c_l`, `image_sample_c_l_o`, `image_sample_c_b`, and `image_sample_c_b_o` to `SampleCmpLevel` / `SampleCmpBias` in `tools/pixel_aot.py`, plus two-mip support in `tests/pixel_compare_render.cpp` and `tests/offscreen_check.cpp`. Merges cleanly against `origin/main`. - **Correctness & Edge Cases**: - Address operand order matches RDNA2 (`offset`, `bias`, `reference`, `U`, `V`, `explicit_lod`), popping `offset` first if `_o`, then `lod` from the back (`_l`) or `bias` from the front (`_b`), leaving `[reference, u, v]`. - Enforces statically known `+0.0` (`0`) or `1.0` (`0x3f800000`) for the LOD/bias operand, `MAX_LOD = 1`, point XY and mip filtering, `vmcnt` wait before use, and whole-quad UV provenance for `_b` (not required for `_l`). - `tests/offscreen_check.cpp` gates SM 6.7 `AdvancedTextureOpsSupported` (level) and SM 6.8 `SampleCmpGradientAndBiasSupported` (bias), returning skip (77) when unavailable or on older SDK headers. - `tests/pixel_compare_render.cpp` validates `texWidth >= 2 && texHeight >= 2` for two-mip cases and uploads both subresources cleanly. - **Negative controls & coverage**: `tests/pixel_compare_lod_check.py` checks 8x8 and 16x16 readbacks, zeroed LOD/bias and zeroed offset mutations against predicted first pixel mismatches, and translator rejections (dynamic/out-of-range LOD/bias, unsupported sampler modes, `dmask`, `a16`, unwaited operand, missing quad provenance for bias, out-of-range offset). ### Verification - **Linux checks**: - `git diff --check origin/main..HEAD`: passed - `python3 tests/docs_links_check.py`: passed (16 Markdown files, 345 links) - `python3 tests/bidi_controls_check.py`: passed (1255 tracked files) - `python3 -B tests/pixel_compare_lod_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so`: passed - **Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP)** at `97a4bb5e6efd3ed7aaeb5e8970d9e2986cf1db45`: - **Windows Python checks**: `tests/form_coverage_check.py` passed (`43.16s`) - **Debug (`--preset dev`)**: `cmake --build --preset dev --target offscreen_check -- -j 6` succeeded; `ctest --preset dev -R '^pixel_aot_compare_lod_' --parallel 4 --no-tests=error --output-on-failure` — **4/4 passed** (`pixel_aot_compare_lod_level_warp`, `pixel_aot_compare_lod_bias_warp`, `pixel_aot_compare_lod_level_hardware`, `pixel_aot_compare_lod_bias_hardware`; note: this VM only has WARP) - **Release `/O2` (`--preset release`)**: `cmake --build --preset release --target offscreen_check -- -j 6` succeeded; `ctest --preset release -R '^pixel_aot_compare_lod_' --parallel 4 --no-tests=error --output-on-failure` — **4/4 passed** (same 4 tests)
tedin7 commented 2026-11-24 18:02:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T17:18:09Z.

Review: COMMENTED


Re-review at head_sha: bc49d1ec103a0f987e36102a1800881f43fbce48 (previously reviewed at 97a4bb5e).

Findings

No P1/P2. No defect found.

  • The new head is a merge of current main into the branch. Comparing the PR's patch against its merge-base before and after, the added and removed lines are identical except for one: the LLVM check that used to be a standalone python3 -B tests/pixel_compare_lod_check.py binary llvm-mc-15 ... step in .github/workflows/windows.yml is now an entry in the CHECKS list, (["tests/pixel_compare_lod_check.py", *COMMON_LLVM], {}), next to pixel_sample_offset_check and pixel_compare_sample_check. That matches how main now runs its sibling checks, and COMMON_LLVM expands to the same binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 arguments, so the CI coverage is unchanged.
  • git merge-tree against current main (bc65bb1b) reports no conflicts (tree 185387b7).
  • Re-read the lowering in tools/pixel_aot.py once more against RDNA 2 address order (offset, bias, reference, U, V, explicit LOD): _o pops the offset first, _b then pops the bias from the front, _l pops the LOD from the back, leaving [reference, u, v]; the HLSL argument order of SampleCmpLevel/SampleCmpBias (location, compare value, LOD or bias, offset) is respected. The MAX_LOD == 1 and point-filter checks use the right operator precedence (& binds tighter than !=).

Verified

Limits: Linux x86-64 only. No D3D12 device, no shader model 6.7/6.8 capability, so draw and the offscreen_check changes were not run. Those rest on the unchanged patch and the earlier Windows results on the previous head.

  • python3 -B tests/pixel_compare_lod_check.py (controls) -> "gfx1030 depth-comparison LOD/bias checks passed", exit 0.
  • python3 -B tests/pixel_compare_lod_check.py binary /usr/bin/llvm-mc-19 /usr/bin/llvm-objcopy-19 /usr/lib/x86_64-linux-gnu/libLLVM-19.so -> passed (two fixture records, 29 and 30 instructions), exit 0.
  • Mutation 1: the mip-filter test (sampler[2] >> 26) & 3 != 1 changed to != 2; the check fails with ValueError: Comparison LOD/bias requires MAX_LOD 1 and point mip filtering (exit 1). Restored.
  • Mutation 2: "image_sample_c_l": "SampleCmpLevel" changed to "SampleCmpBias"; the check fails with an AssertionError (exit 1). Restored; git status --short clean.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6044027077 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1568#pullrequestreview-6044027077). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T17:18:09Z. **Review:** COMMENTED --- Re-review at `head_sha`: `bc49d1ec103a0f987e36102a1800881f43fbce48` (previously reviewed at `97a4bb5e`). ### Findings No P1/P2. No defect found. - The new head is a merge of current `main` into the branch. Comparing the PR's patch against its merge-base before and after, the added and removed lines are identical except for one: the LLVM check that used to be a standalone `python3 -B tests/pixel_compare_lod_check.py binary llvm-mc-15 ...` step in `.github/workflows/windows.yml` is now an entry in the `CHECKS` list, `(["tests/pixel_compare_lod_check.py", *COMMON_LLVM], {})`, next to `pixel_sample_offset_check` and `pixel_compare_sample_check`. That matches how `main` now runs its sibling checks, and `COMMON_LLVM` expands to the same `binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1` arguments, so the CI coverage is unchanged. - `git merge-tree` against current `main` (`bc65bb1b`) reports no conflicts (tree `185387b7`). - Re-read the lowering in `tools/pixel_aot.py` once more against RDNA 2 address order (offset, bias, reference, U, V, explicit LOD): `_o` pops the offset first, `_b` then pops the bias from the front, `_l` pops the LOD from the back, leaving `[reference, u, v]`; the HLSL argument order of `SampleCmpLevel`/`SampleCmpBias` (location, compare value, LOD or bias, offset) is respected. The `MAX_LOD == 1` and point-filter checks use the right operator precedence (`&` binds tighter than `!=`). ### Verified Limits: Linux x86-64 only. No D3D12 device, no shader model 6.7/6.8 capability, so `draw` and the `offscreen_check` changes were not run. Those rest on the unchanged patch and the earlier Windows results on the previous head. - `python3 -B tests/pixel_compare_lod_check.py` (controls) -> "gfx1030 depth-comparison LOD/bias checks passed", exit 0. - `python3 -B tests/pixel_compare_lod_check.py binary /usr/bin/llvm-mc-19 /usr/bin/llvm-objcopy-19 /usr/lib/x86_64-linux-gnu/libLLVM-19.so` -> passed (two fixture records, 29 and 30 instructions), exit 0. - **Mutation 1:** the mip-filter test `(sampler[2] >> 26) & 3 != 1` changed to `!= 2`; the check fails with `ValueError: Comparison LOD/bias requires MAX_LOD 1 and point mip filtering` (exit 1). Restored. - **Mutation 2:** `"image_sample_c_l": "SampleCmpLevel"` changed to `"SampleCmpBias"`; the check fails with an `AssertionError` (exit 1). Restored; `git status --short` clean. AI-assisted; commands listed were executed locally.
thepatrickworld commented 2026-11-25 04:04:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-25T03:56:37Z.


Hardware run, draw bias mode — RX 9070 XT, driver 32.0.32029.2010:

filter=0x80 func=2 pixels=256 mismatches=60
image_sample_c_b_o 16 offset-zero readback pixel_mismatch x=0 y=0 expected=1,0.578125,0.5,1 actual=0,0.578125,0.5,1
gfx1030 depth-comparison LOD/bias checks passed

The count of expected mismatches comes out the same on the card as in the check, so the bias is applied to the depth-comparison sample rather than to a plain one.

Limits: AMD only, no NVIDIA; ps_6_7/ps_6_8 needed DXC 1.9 here, and the lod mode name is not a FORMS key (KeyError: 'lod'), so only the bias path was run.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7152383691 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1568#issuecomment-7152383691). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-25T03:56:37Z. --- Hardware run, `draw bias` mode — RX 9070 XT, driver 32.0.32029.2010: ``` filter=0x80 func=2 pixels=256 mismatches=60 image_sample_c_b_o 16 offset-zero readback pixel_mismatch x=0 y=0 expected=1,0.578125,0.5,1 actual=0,0.578125,0.5,1 gfx1030 depth-comparison LOD/bias checks passed ``` The count of expected mismatches comes out the same on the card as in the check, so the bias is applied to the depth-comparison sample rather than to a plain one. Limits: AMD only, no NVIDIA; `ps_6_7`/`ps_6_8` needed DXC 1.9 here, and the `lod` mode name is not a `FORMS` key (`KeyError: 'lod'`), so only the `bias` path was run. _AI-assisted._
stan495 commented 2026-11-25 06:01:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-25T05:36:18Z.


Verified head bc49d1ec on Windows x64 (MSVC 19.44.35228.0, SDK 10.0.26100.0) in both dev and release (/O2) configurations:

  • python -B tests/pixel_compare_lod_check.py -> passed (gfx1030 depth-comparison LOD/bias checks passed)
  • python -B tests/docs_links_check.py -> passed (16 Markdown files, 350 links)
  • ctest --preset dev --no-tests=error -R '^pixel_aot_compare_lod_' -V -> 4/4 passed (pixel_aot_compare_lod_level_hardware, pixel_aot_compare_lod_bias_hardware, pixel_aot_compare_lod_level_warp, pixel_aot_compare_lod_bias_warp)
  • ctest --preset release --no-tests=error -R '^pixel_aot_compare_lod_' -V -> 4/4 passed

Adapters (debug_layer=enabled, debug_errors=0 debug_warnings=0):

  • Hardware: AMD Radeon RX 7900 XTX (vendor=1002 device=744c, driver 32.0.32029.2010)
  • WARP: Microsoft Basic Render Driver (vendor=1414 device=008c, driver 10.0.26100.9818)
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7153949789 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1568#issuecomment-7153949789). Originally posted by [stan495](https://github.com/stan495) on 2026-11-25T05:36:18Z. --- Verified head `bc49d1ec` on Windows x64 (MSVC `19.44.35228.0`, SDK `10.0.26100.0`) in both `dev` and `release` (`/O2`) configurations: - `python -B tests/pixel_compare_lod_check.py` -> passed (`gfx1030 depth-comparison LOD/bias checks passed`) - `python -B tests/docs_links_check.py` -> passed (16 Markdown files, 350 links) - `ctest --preset dev --no-tests=error -R '^pixel_aot_compare_lod_' -V` -> 4/4 passed (`pixel_aot_compare_lod_level_hardware`, `pixel_aot_compare_lod_bias_hardware`, `pixel_aot_compare_lod_level_warp`, `pixel_aot_compare_lod_bias_warp`) - `ctest --preset release --no-tests=error -R '^pixel_aot_compare_lod_' -V` -> 4/4 passed Adapters (`debug_layer=enabled`, `debug_errors=0 debug_warnings=0`): - Hardware: `AMD Radeon RX 7900 XTX` (`vendor=1002 device=744c`, driver `32.0.32029.2010`) - WARP: `Microsoft Basic Render Driver` (`vendor=1414 device=008c`, driver `10.0.26100.9818`)
stan495 commented 2026-11-25 12:01:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-25T11:12:10Z.


Friendly ping on bc49d1ec: all required CI checks are green (Assemble and translate gfx1013 fixtures, Run platform-independent Python checks on Linux, and Build and test on Windows), the branch is MERGEABLE, and bc49d1ec has Windows dev/release verification, an RX 9070 XT hardware run, and a P1/P2-free re-review from @tedin7.

@tedin7 @R0Y00 Please let me know if anything else is needed before an approval or merge.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7160731245 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1568#issuecomment-7160731245). Originally posted by [stan495](https://github.com/stan495) on 2026-11-25T11:12:10Z. --- Friendly ping on `bc49d1ec`: all required CI checks are green (`Assemble and translate gfx1013 fixtures`, `Run platform-independent Python checks on Linux`, and `Build and test on Windows`), the branch is `MERGEABLE`, and `bc49d1ec` has Windows `dev`/`release` verification, an RX 9070 XT hardware run, and a P1/P2-free re-review from @tedin7. @tedin7 @R0Y00 Please let me know if anything else is needed before an approval or merge.
Makto94 commented 2026-11-25 14:05:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Makto94 on 2026-11-25T13:32:11Z.


Hardware run on head bc49d1ec (NVIDIA; I did not see an NVIDIA report in this thread): level and bias both pass.

Environment: NVIDIA GeForce RTX 3070 Ti (10de:2482), driver 32.0.16.2101, Windows 11 build 26300.9974, Debug build, dxc 1.9.2602.17, D3D12 debug layer enabled. The hardware run was serial on an idle machine.

Command: .\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^pixel_aot_compare_lod_(level|bias)_hardware$' -V gave 2/2 passed, 0 capability skips (77). The bias test was not skipped on this card.
I also ran -R '^pixel_aot_compare_lod_(level|bias)_warp$': 2/2 passed.

Each log has 32 debug_errors= lines; none has a nonzero value. The RTX and WARP sequences of pixels=/mismatches= lines are identical for both modes, and level and bias match each other too.

form, size, variant pixels mismatches (RTX = WARP)
c_l/c_b 8x8, operand-zero 64 21
c_l/c_b 16x16, operand-zero 256 61
c_l_o/c_b_o 8x8, operand-zero 64 33
c_l_o/c_b_o 8x8, offset-zero 64 28
c_l_o/c_b_o 16x16, operand-zero 256 65
c_l_o/c_b_o 16x16, offset-zero 256 60

All the unmutated and mutated-readback draws report 0 mismatches.

The 60 for c_b_o 16x16 offset-zero is the same on RTX, on WARP and in the RX 9070 XT report above (that report does not state its head). The test only compares the first pixel_mismatch line of each negative control, not the count, so these counts are extra observations and not asserted.

One card and one driver.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7163918165 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1568#issuecomment-7163918165). Originally posted by [Makto94](https://github.com/Makto94) on 2026-11-25T13:32:11Z. --- Hardware run on head `bc49d1ec` (NVIDIA; I did not see an NVIDIA report in this thread): `level` and `bias` both pass. Environment: NVIDIA GeForce RTX 3070 Ti (`10de:2482`), driver 32.0.16.2101, Windows 11 build 26300.9974, Debug build, dxc 1.9.2602.17, D3D12 debug layer enabled. The hardware run was serial on an idle machine. Command: `.\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^pixel_aot_compare_lod_(level|bias)_hardware$' -V` gave 2/2 passed, 0 capability skips (77). The `bias` test was not skipped on this card. I also ran `-R '^pixel_aot_compare_lod_(level|bias)_warp$'`: 2/2 passed. Each log has 32 `debug_errors=` lines; none has a nonzero value. The RTX and WARP sequences of `pixels=`/`mismatches=` lines are identical for both modes, and `level` and `bias` match each other too. | form, size, variant | pixels | mismatches (RTX = WARP) | |---|---|---| | `c_l`/`c_b` 8x8, operand-zero | 64 | 21 | | `c_l`/`c_b` 16x16, operand-zero | 256 | 61 | | `c_l_o`/`c_b_o` 8x8, operand-zero | 64 | 33 | | `c_l_o`/`c_b_o` 8x8, offset-zero | 64 | 28 | | `c_l_o`/`c_b_o` 16x16, operand-zero | 256 | 65 | | `c_l_o`/`c_b_o` 16x16, offset-zero | 256 | 60 | All the unmutated and mutated-readback draws report 0 mismatches. The 60 for `c_b_o` 16x16 offset-zero is the same on RTX, on WARP and in the RX 9070 XT report above (that report does not state its head). The test only compares the first `pixel_mismatch` line of each negative control, not the count, so these counts are extra observations and not asserted. One card and one driver.
R0Y00 commented 2026-11-25 23:02:08 +00:00 (Migrated from github.com)

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


I resolved the current tools/pixel_aot.py conflict locally by keeping main’s per-dword load assignments alongside the new comparison-LOD/bias opcode match. On that candidate, ctest --preset release --no-tests=error -R '^pixel_aot_compare_(lod_(level|bias)|sample)_(warp|hardware)$' -V passed 6/6 on WARP and RTX 4060 Laptop, with zero skips. GitHub still shows this PR at bc49d1ec, but the fork branch advertises 335d19f5, so I left the branch untouched. Please make sure the PR is tracking the intended focused branch. Once GitHub shows its current head, we can verify the combined hunk and its exact CI.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7176986618 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1568#issuecomment-7176986618). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T22:57:44Z. --- I resolved the current `tools/pixel_aot.py` conflict locally by keeping main’s per-dword load assignments alongside the new comparison-LOD/bias opcode match. On that candidate, `ctest --preset release --no-tests=error -R '^pixel_aot_compare_(lod_(level|bias)|sample)_(warp|hardware)$' -V` passed 6/6 on WARP and RTX 4060 Laptop, with zero skips. GitHub still shows this PR at `bc49d1ec`, but the fork branch advertises `335d19f5`, so I left the branch untouched. Please make sure the PR is tracking the intended focused branch. Once GitHub shows its current head, we can verify the combined hunk and its exact CI.
upstream-sync closed this pull request 2026-11-26 02:04:43 +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!1561
No description provided.