D3D12.X: clamp translated sampler LOD bias #1374

Open
hajduzsolt wants to merge 1 commit from upstream-pr/1384 into main
hajduzsolt commented 2026-11-24 15:28:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T15:28:16Z.


What is in it

  • Clamp the decoded LOD bias and test the extrema and adjacent fixed-point values for ordinary and comparison samplers.

Tested

  • Windows 11 Pro x64 build 26300, Ryzen 7 9800X3D, Radeon RX 9070 XT, driver 32.0.32029.2010; Rust 1.98.1 MSVC, debug.
  • cargo test -p xcl --lib sampler_lod_bias_stays_within_d3d12_limits: 1 passed.
  • cargo test --workspace -- --test-threads=4 --nocapture: 752 passed, 0 failed, 41 ignored. The reported passes include tests that returned early.
  • SKIPPED: test_title_draws_with_a_root_signature_under_the_debug_layer and uploads_start_from_each_subresources_state, because the D3D12 debug layer is unavailable.

Regression run

main:

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: AMD Radeon RX 9070 XT
title: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1675 (PresentX 1675)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14837 MB

PR:

xcl-smoke v1
commit: e15ddb2dffdbf54df8944d2b71fa78165861686b
gpu: AMD Radeon RX 9070 XT
title: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1676 (PresentX 1676)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14840 MB

Not tested

  • Retail titles, debug-layer validation, and adapters other than the one above. No claim is made about actual title usage of extreme bias values.

AI use

  • Codex, GPT-6: investigation, implementation, synthetic test, and validation.
<!-- greyfinch-sync:ivall/xcl:issue:5475155867 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1384). Originally posted by [hajduzsolt](https://github.com/hajduzsolt) on 2026-11-24T15:28:16Z. --- **What is in it** - Clamp the decoded LOD bias and test the extrema and adjacent fixed-point values for ordinary and comparison samplers. **Tested** - Windows 11 Pro x64 build 26300, Ryzen 7 9800X3D, Radeon RX 9070 XT, driver 32.0.32029.2010; Rust 1.98.1 MSVC, debug. - `cargo test -p xcl --lib sampler_lod_bias_stays_within_d3d12_limits`: 1 passed. - `cargo test --workspace -- --test-threads=4 --nocapture`: 752 passed, 0 failed, 41 ignored. The reported passes include tests that returned early. - SKIPPED: `test_title_draws_with_a_root_signature_under_the_debug_layer` and `uploads_start_from_each_subresources_state`, because the D3D12 debug layer is unavailable. **Regression run** main: ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: AMD Radeon RX 9070 XT title: A newer retail game seconds: 60 exit: 0x0 frames shown: 1675 (PresentX 1675) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14837 MB ``` PR: ``` xcl-smoke v1 commit: e15ddb2dffdbf54df8944d2b71fa78165861686b gpu: AMD Radeon RX 9070 XT title: A newer retail game seconds: 60 exit: 0x0 frames shown: 1676 (PresentX 1676) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14840 MB ``` **Not tested** - Retail titles, debug-layer validation, and adapters other than the one above. No claim is made about actual title usage of extreme bias values. **AI use** - Codex, GPT-6: investigation, implementation, synthetic test, and validation.
futurepro62 commented 2026-11-24 16:07:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T15:34:40Z.


Full-suite run, since this PR has no test report yet. Tested exact head e15ddb2 (on its base 930e8b4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: sampler_lod_bias_stays_within_d3d12_limits.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored, no skips.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7136261351 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1384#issuecomment-7136261351). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T15:34:40Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `e15ddb2` (on its base `930e8b4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **752 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `sampler_lod_bias_stays_within_d3d12_limits`. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **752 passed, 0 failed, 41 ignored**, no skips. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-24 17:06:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T16:55:28Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7138416782 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1384#issuecomment-7138416782). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T16:55:28Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. Thanks!
afpruivo commented 2026-11-26 13:05:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by afpruivo on 2026-11-26T12:18:17Z.


Tested e15ddb2 on an RTX 3090, as part of a batch merged onto main b49be18: no failures, no regression.

  • Batch: #1384 e15ddb2, #1594 6ea563b, #1621 39788e8, #1653 69f70c1. They touch no common file and merged cleanly onto b49be18 (local commit 1e3fb07). Check posted in #1607: B21, https://github.com/xcl-dev/xcl/issues/1607#issuecomment-7191828681.
  • Hardware: RTX 3090 24 GB, driver 621.40, Windows 11 26300, Rust stable MSVC.
  • Suite: cargo test --workspace -- --test-threads=4 (debug): 1,439 passed, 0 failed, 47 ignored. 26 SKIPPED GPU tests, mostly no wave64 on this card; they are not coverage.
  • Smoke: scripts/smoke.ps1, 60 s, retail 1.0.2.1 (title: 3c290c16), release. Peak commit was lower on the batch.
commit frames shown presents per 2 s (last 3) device removals crashes peak commit
main b49be18 1,649 60 60 60 0 0 17,023 MB
batch 1e3fb07 1,627 60 60 60 0 0 15,516 MB
  • I read the diff. The clamp is in sampler_d3d12, so comparison and plain samplers both get it, and the new test covers the edges on both sides (0x2000–0x2fff to the minimum, 0x0ffe–0x1fff to the maximum).

Not tested: a run that reaches this change on purpose (the smoke title only shows that nothing regresses); AMD.

AI use: Claude Code (Claude Opus 5.5) ran the commands on my machine and drafted this. Checked by me before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7191829949 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1384#issuecomment-7191829949). Originally posted by [afpruivo](https://github.com/afpruivo) on 2026-11-26T12:18:17Z. --- **Tested `e15ddb2` on an RTX 3090, as part of a batch merged onto `main` `b49be18`: no failures, no regression.** - **Batch:** #1384 `e15ddb2`, #1594 `6ea563b`, #1621 `39788e8`, #1653 `69f70c1`. They touch no common file and merged cleanly onto `b49be18` (local commit `1e3fb07`). Check posted in #1607: B21, https://github.com/xcl-dev/xcl/issues/1607#issuecomment-7191828681. - **Hardware:** RTX 3090 24 GB, driver 621.40, Windows 11 26300, Rust stable MSVC. - **Suite:** `cargo test --workspace -- --test-threads=4` (debug): 1,439 passed, 0 failed, 47 ignored. 26 `SKIPPED` GPU tests, mostly no wave64 on this card; they are not coverage. - **Smoke:** `scripts/smoke.ps1`, 60 s, retail 1.0.2.1 (`title: 3c290c16`), release. Peak commit was lower on the batch. | | commit | frames shown | presents per 2 s (last 3) | device removals | crashes | peak commit | |---|---|---|---|---|---|---| | `main` | `b49be18` | 1,649 | 60 60 60 | 0 | 0 | 17,023 MB | | batch | `1e3fb07` | 1,627 | 60 60 60 | 0 | 0 | 15,516 MB | - I read the diff. The clamp is in `sampler_d3d12`, so comparison and plain samplers both get it, and the new test covers the edges on both sides (`0x2000`–`0x2fff` to the minimum, `0x0ffe`–`0x1fff` to the maximum). **Not tested:** a run that reaches this change on purpose (the smoke title only shows that nothing regresses); AMD. **AI use:** Claude Code (Claude Opus 5.5) ran the commands on my machine and drafted this. Checked by me before posting.
github-actions[bot] commented 2026-11-30 08:39:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:39:06Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273172703 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1384#issuecomment-7273172703). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:39:06Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
saintwolf commented 2026-11-30 17:39:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T17:39:31Z.


merge-check claim
head: e15ddb2dff

<!-- greyfinch-sync:ivall/xcl:comment:7286650601 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1384#issuecomment-7286650601). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T17:39:31Z. --- merge-check claim head: e15ddb2dffdbf54df8944d2b71fa78165861686b
saintwolf commented 2026-11-30 17:45:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T17:45:32Z.


merge-check
base: 9dfbe3ea66
head: e15ddb2dff
merge: clean (trial merge 702a7b490165a81f303f1434401242781ae2f84a; git diff --check clean; +19/-1 in crates/xcl/src/gpu/desc.rs)
build: cargo build --workspace -> ok (pre-existing warnings only, none from the PR's lines)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored (base + 1 new test); SKIPPED: 27, the standard set for this card (22 "no wave64" — wave32-only GPU, 2 "no heap windows", 1 "cannot disable the driver cache (Developer Mode)", 2 "no xgameruntime.dll"). Failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 — pre-existing on this machine, identical on base 9dfbe3ea. The new sampler_lod_bias_stays_within_d3d12_limits passes with the change and fails on a clean base worktree with only the test added (raw 0x2000: -32.0 unclamped vs the D3D12 minimum of -16.0).
review: read the whole diff. The console sampler word encodes MipLODBias as a 14-bit two's-complement 5.8 fixed-point value (s5_8, desc.rs:310: sign bit 13, five integer bits, eight fraction bits, / 256), whose range is -32.0 .. 31.996 — outside D3D12's D3D12_MIP_LOD_BIAS_MIN/MAX (±16.0), which CreateSampler requires. The one-line .clamp() brings the translated descriptor into spec; it sits in the shared struct literal, so comparison and plain samplers both get it, and in-range values pass through unchanged (the existing test's -1.5 is untouched). I verified every vector of the new test by hand against that encoding: 0x2000/0x2fff clamp to the minimum (-32.0 and -16.0039), 0x3000 is exactly -16.0 and 0x3fff is -1/256 unclamped, 0x0ffd = 4093/256 passes through, 0x0ffe/0x1fff (15.992 and 31.996) clamp to the maximum; the loop runs each raw value for both comparison and plain samplers. Thread: futurepro62's full workspace runs on an RTX 5070 Ti (752/0/41) and the RDNA2 iGPU of a 9800X3D (752/0/41) pass at this head with the new test running; DavidM1911's RTX 3060 Ti lib run is clean; afpruivo batch-ran this PR with three others on an RTX 3090 (1,439/0/47) plus a 60 s retail xcl-smoke (1,627 frames, 15,516 MB peak commit vs 1,649 / 17,023 MB on main, no crashes) and read the diff to confirm the clamp reaches both sampler kinds — the smoke pair is on the batch commit, which touches no common file with this one. No duplicates; one file, no unsafe, no new dependencies, no stop-criteria files.
performance: none; one f32 clamp in the sampler descriptor translation.
verdict: safe to merge
hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 / OpenCode, Qwen 3.8 27B

<!-- greyfinch-sync:ivall/xcl:comment:7286801165 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1384#issuecomment-7286801165). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T17:45:32Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: e15ddb2dffdbf54df8944d2b71fa78165861686b merge: clean (trial merge 702a7b490165a81f303f1434401242781ae2f84a; git diff --check clean; +19/-1 in crates/xcl/src/gpu/desc.rs) build: cargo build --workspace -> ok (pre-existing warnings only, none from the PR's lines) tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored (base + 1 new test); SKIPPED: 27, the standard set for this card (22 "no wave64" — wave32-only GPU, 2 "no heap windows", 1 "cannot disable the driver cache (Developer Mode)", 2 "no xgameruntime.dll"). Failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 — pre-existing on this machine, identical on base 9dfbe3ea. The new sampler_lod_bias_stays_within_d3d12_limits passes with the change and fails on a clean base worktree with only the test added (raw 0x2000: -32.0 unclamped vs the D3D12 minimum of -16.0). review: read the whole diff. The console sampler word encodes MipLODBias as a 14-bit two's-complement 5.8 fixed-point value (s5_8, desc.rs:310: sign bit 13, five integer bits, eight fraction bits, / 256), whose range is -32.0 .. 31.996 — outside D3D12's D3D12_MIP_LOD_BIAS_MIN/MAX (±16.0), which CreateSampler requires. The one-line .clamp() brings the translated descriptor into spec; it sits in the shared struct literal, so comparison and plain samplers both get it, and in-range values pass through unchanged (the existing test's -1.5 is untouched). I verified every vector of the new test by hand against that encoding: 0x2000/0x2fff clamp to the minimum (-32.0 and -16.0039), 0x3000 is exactly -16.0 and 0x3fff is -1/256 unclamped, 0x0ffd = 4093/256 passes through, 0x0ffe/0x1fff (15.992 and 31.996) clamp to the maximum; the loop runs each raw value for both comparison and plain samplers. Thread: futurepro62's full workspace runs on an RTX 5070 Ti (752/0/41) and the RDNA2 iGPU of a 9800X3D (752/0/41) pass at this head with the new test running; DavidM1911's RTX 3060 Ti lib run is clean; afpruivo batch-ran this PR with three others on an RTX 3090 (1,439/0/47) plus a 60 s retail xcl-smoke (1,627 frames, 15,516 MB peak commit vs 1,649 / 17,023 MB on main, no crashes) and read the diff to confirm the clamp reaches both sampler kinds — the smoke pair is on the batch commit, which touches no common file with this one. No duplicates; one file, no unsafe, no new dependencies, no stop-criteria files. performance: none; one f32 clamp in the sampler descriptor translation. verdict: safe to merge hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 / OpenCode, Qwen 3.8 27B
coolpersonnn commented 2026-11-30 17:58:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-11-30T17:58:44Z.


merge-check claim
head: e15ddb2dff

<!-- greyfinch-sync:ivall/xcl:comment:7287131195 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1384#issuecomment-7287131195). Originally posted by [coolpersonnn](https://github.com/coolpersonnn) on 2026-11-30T17:58:44Z. --- merge-check claim head: e15ddb2dffdbf54df8944d2b71fa78165861686b
coolpersonnn commented 2026-11-30 18:05:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-11-30T18:05:35Z.


merge-check
base: 9dfbe3ea66
head: e15ddb2dff
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored (25 SKIPPED: 22 no wave64, 2 no heap windows, 1 cannot disable the driver cache); failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 (fails identically on base 9dfbe3ea alone); new test gpu::desc::tests::sampler_lod_bias_stays_within_d3d12_limits passed
review: none. Read the full diff (+19/-1 in crates/xcl/src/gpu/desc.rs). In sampler_d3d12, s5_8(w[2] & 0x3FFF) decodes a 14-bit signed 5.8 fixed-point value in [-32.0, 31.99609375], which is always finite and can exceed D3D12's CreateSampler limits [D3D12_MIP_LOD_BIAS_MIN (-16.0), D3D12_MIP_LOD_BIAS_MAX (15.99)]. Clamping in the shared D3D12_SAMPLER_DESC literal covers both normal and comparison samplers without altering in-range values. The new unit test covers both clamped extrema, adjacent fixed-point boundaries (0x2fff/0x3000, 0x0ffd/0x0ffe), and both comparison modes; without the clamp, 0x2000 decodes to -32.0 and fails the test. Scope is minimal; no duplicates found in open/merged PRs or #1607.
performance: none (reasoned: a single f32 clamp during sampler descriptor translation; no extra allocations or hot-path cost)
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5090 (driver 32.0.16.2101), AMD Ryzen 9 9950X3D, Windows 11 Pro build 26300, Rust 1.100.0 / T3 Code (Antigravity), Gemini 4 Neon (Medium)

<!-- greyfinch-sync:ivall/xcl:comment:7287335265 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1384#issuecomment-7287335265). Originally posted by [coolpersonnn](https://github.com/coolpersonnn) on 2026-11-30T18:05:35Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: e15ddb2dffdbf54df8944d2b71fa78165861686b merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored (25 SKIPPED: 22 no wave64, 2 no heap windows, 1 cannot disable the driver cache); failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 (fails identically on base 9dfbe3ea alone); new test gpu::desc::tests::sampler_lod_bias_stays_within_d3d12_limits passed review: none. Read the full diff (+19/-1 in crates/xcl/src/gpu/desc.rs). In sampler_d3d12, s5_8(w[2] & 0x3FFF) decodes a 14-bit signed 5.8 fixed-point value in [-32.0, 31.99609375], which is always finite and can exceed D3D12's CreateSampler limits [D3D12_MIP_LOD_BIAS_MIN (-16.0), D3D12_MIP_LOD_BIAS_MAX (15.99)]. Clamping in the shared D3D12_SAMPLER_DESC literal covers both normal and comparison samplers without altering in-range values. The new unit test covers both clamped extrema, adjacent fixed-point boundaries (0x2fff/0x3000, 0x0ffd/0x0ffe), and both comparison modes; without the clamp, 0x2000 decodes to -32.0 and fails the test. Scope is minimal; no duplicates found in open/merged PRs or #1607. performance: none (reasoned: a single f32 clamp during sampler descriptor translation; no extra allocations or hot-path cost) verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 5090 (driver 32.0.16.2101), AMD Ryzen 9 9950X3D, Windows 11 Pro build 26300, Rust 1.100.0 / T3 Code (Antigravity), Gemini 4 Neon (Medium)
Foniass commented 2026-12-01 05:36:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:36:14Z.


Triage (#1607) – head e15ddb2

No open or merged PR clamps MipLODBias in desc::sampler_d3d12; main still passes s5_8(w[2] & 0x3FFF) unclamped (range -32..32, D3D12 allows -16..15.99). #1885 and #3248 change other sampler fields.
No problems found in the diff; the test covers both ends of the range for both sampler kinds.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7301942567 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1384#issuecomment-7301942567). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:36:14Z. --- **Triage (#1607)** – head e15ddb2 No open or merged PR clamps `MipLODBias` in `desc::sampler_d3d12`; main still passes `s5_8(w[2] & 0x3FFF)` unclamped (range -32..32, D3D12 allows -16..15.99). #1885 and #3248 change other sampler fields. No problems found in the diff; the test covers both ends of the range for both sampler kinds. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1384:upstream-pr/1384'
git switch 'upstream-pr/1384'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1384'
git switch 'upstream-pr/1384'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1384'
git switch 'upstream-pr/1384'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1384'
git switch 'main'
git merge --squash 'upstream-pr/1384'
git switch 'main'
git merge --ff-only 'upstream-pr/1384'
git switch 'main'
git merge 'upstream-pr/1384'
git push origin 'main'
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
xcl-dev/xcl!1374
No description provided.