Support explicit-LOD texture samples with offsets #3168

Open
masteraapjes wants to merge 1 commit from upstream-pr/3168 into main
masteraapjes commented 2026-11-29 20:25:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by masteraapjes on 2026-11-29T20:25:48Z.


What it changes

Admit decoded image_sample_l_o to the SampleLevel path and consume explicit LOD after coordinates while retaining packed texel offsets. Accepting the opcode alone would silently sample mip 0. Keep authored 2D mip/coordinate regressions for positive/negative offsets, A16/full-width coordinates and sequential/NSA registers.

Rebuilt independently on upstream main 5fabb46eaf6ed8771321787f8871051abde69b9b to resolve the conflict after upstream history changed. Obsolete shared CI commits have been removed from the PR diff. Current upstream changes are retained.

How it was tested

Windows, pinned Rust 1.98.1. Tested head: a3a9c4ee9a11fb6cffcc98e32b0702ee4aea076a.

  • Focused CPU translation/DXIL validation emit::sample_lod_offsets_tests::explicit_lod_offset_samples_translate_and_validate: 1 passed.
  • Scoped strict shader Clippy passed with default and all features:
    • cargo clippy --locked --jobs 2 -p victory-shader --all-targets -- -D warnings
    • cargo clippy --locked --jobs 2 -p victory-shader --all-targets --all-features -- -D warnings
  • cargo run --locked --package xtask -- policy: 465 files passed. git diff --check passed.

Current upstream CI blocker, independently reproduced on unmodified main 5fabb46e: both cargo clippy --workspace --all-targets --locked -- -D warnings and cargo clippy --workspace --all-targets --all-features --locked -- -D warnings exit 101 with five errors in host/font.rs:213/260, host/menu.rs:667 and host/panel.rs:602/668. Existing #4679 addresses these. No unrelated fixes or lint suppressions are carried here. This is not a claim that the latest CI check job passed.

This update runs CPU translation/DXIL validation rather than new hardware dispatches. Coverage is 2D sampling with constant offsets in DXIL’s -8..7 range. No new title, wave64 or FPS result is claimed. The full workspace test suite was not rerun for this conflict-resolution update. No game data is included.

Checked for overlap

  • Rechecked current main and targeted open-PR searches alongside the earlier overlap review. Related #3369 preserves array-gather LOD; #2676 separately fixes signed-Z offsets.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5554765886 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3168). Originally posted by [masteraapjes](https://github.com/masteraapjes) on 2026-11-29T20:25:48Z. --- ## What it changes Admit decoded `image_sample_l_o` to the SampleLevel path and consume explicit LOD after coordinates while retaining packed texel offsets. Accepting the opcode alone would silently sample mip 0. Keep authored 2D mip/coordinate regressions for positive/negative offsets, A16/full-width coordinates and sequential/NSA registers. Rebuilt independently on upstream main `5fabb46eaf6ed8771321787f8871051abde69b9b` to resolve the conflict after upstream history changed. Obsolete shared CI commits have been removed from the PR diff. Current upstream changes are retained. ## How it was tested Windows, pinned Rust 1.98.1. Tested head: `a3a9c4ee9a11fb6cffcc98e32b0702ee4aea076a`. - Focused CPU translation/DXIL validation `emit::sample_lod_offsets_tests::explicit_lod_offset_samples_translate_and_validate`: 1 passed. - Scoped strict shader Clippy passed with default and all features: - `cargo clippy --locked --jobs 2 -p victory-shader --all-targets -- -D warnings` - `cargo clippy --locked --jobs 2 -p victory-shader --all-targets --all-features -- -D warnings` - `cargo run --locked --package xtask -- policy`: 465 files passed. `git diff --check` passed. Current upstream CI blocker, independently reproduced on unmodified main `5fabb46e`: both `cargo clippy --workspace --all-targets --locked -- -D warnings` and `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` exit 101 with five errors in `host/font.rs:213/260`, `host/menu.rs:667` and `host/panel.rs:602/668`. Existing [#4679](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4679) addresses these. No unrelated fixes or lint suppressions are carried here. This is not a claim that the latest CI `check` job passed. This update runs CPU translation/DXIL validation rather than new hardware dispatches. Coverage is 2D sampling with constant offsets in DXIL’s -8..7 range. No new title, wave64 or FPS result is claimed. The full workspace test suite was not rerun for this conflict-resolution update. No game data is included. ## Checked for overlap - [x] Rechecked current main and targeted open-PR searches alongside the earlier overlap review. Related #3369 preserves array-gather LOD; #2676 separately fixes signed-Z offsets.
dyshay commented 2026-11-29 20:46:53 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-29T20:46:53Z.


Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with --profile diag --features diagnostics, and the CPU tests of the touched crates pass. A run on an RTX 4090 is queued (Series S with ray tracing, DLSS Quality). Frame times will follow here.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7262352618 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3168#issuecomment-7262352618). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-29T20:46:53Z. --- Merged into our fork's integration branch for testing ([dyshay/VIctory-NVIDIA](https://github.com/dyshay/VIctory-NVIDIA/tree/janus-prs), branch `janus-prs`). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with `--profile diag --features diagnostics`, and the CPU tests of the touched crates pass. A run on an RTX 4090 is queued (Series S with ray tracing, DLSS Quality). Frame times will follow here.
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/3168:upstream-pr/3168'
git switch 'upstream-pr/3168'

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/3168'
git switch 'upstream-pr/3168'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3168'
git switch 'upstream-pr/3168'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3168'
git switch 'main'
git merge --squash 'upstream-pr/3168'
git switch 'main'
git merge --ff-only 'upstream-pr/3168'
git switch 'main'
git merge 'upstream-pr/3168'
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
trustno1-coder/VIctory-NVIDIA!3168
No description provided.