Shaders: lower image_get_lod on cube textures #1004

Open
github-bot wants to merge 1 commit from github-bot/gh-1004 into main AGit
Owner

@⁠tarcisioads on GitHub · 2026-11-24 14:53 UTC · original
tarcisioads:shader/cube-image-get-lod → main · +85 −3 · 1 files · 1 commits · open

Support image_get_lod (dx.op.calculateLOD.f32, opcode 81) on cube textures (dim = 3) in crates/victory-shader/src/emit/lower.rs:

  • Allow image_get_lod in pixel shaders for dim = 3 (kind = 5, coords = 3).
  • Remove op == 81 from the kind == 5 refusal (keeping *unorm || op == 63), so cube_direction converts the face coordinates into a 3D direction vector before calculateLOD.f32.
  • Add unit test cube_image_get_lod_lowers.

Verification

  • cargo test -p victory-shader (97 passed, 0 failed, 1 ignored benchmark on macOS; Windows dxil.dll validation not run)
  • cargo xtask policy (ok)
**@⁠tarcisioads** on GitHub · 2026-11-24 14:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/1004) `tarcisioads:shader/cube-image-get-lod` → `main` · +85 −3 · 1 files · 1 commits · open Support `image_get_lod` (`dx.op.calculateLOD.f32`, opcode `81`) on cube textures (`dim = 3`) in `crates/victory-shader/src/emit/lower.rs`: - Allow `image_get_lod` in pixel shaders for `dim = 3` (`kind = 5`, `coords = 3`). - Remove `op == 81` from the `kind == 5` refusal (keeping `*unorm || op == 63`), so `cube_direction` converts the face coordinates into a 3D direction vector before `calculateLOD.f32`. - Add unit test `cube_image_get_lod_lowers`. ### Verification - `cargo test -p victory-shader` (97 passed, 0 failed, 1 ignored benchmark on macOS; Windows `dxil.dll` validation not run) - `cargo xtask policy` (ok)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:16:42 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-24 15:06 UTC · original

Windows validation on cbc8c33. I extended the existing cube LOD fixture to pass its emitted DXIL through Microsoft’s validator, then created a pixel PSO with the fixture shader and the test vertex stub. Both checks passed, and validation kept the emitted container hash.

The full shader suite with native WARP 1.0.22 and Agility 1.620.2 reported 121 passed and 1 ignored. The inbox runtime on this host lacks SM 6.6, which accounts for the GPU test failures when run with the default loader.

This check covers DXIL acceptance and PSO creation. AI-assisted.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-24 15:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/1004#issuecomment-7135468990) Windows validation on `cbc8c33`. I extended the existing cube LOD fixture to pass its emitted DXIL through Microsoft’s validator, then created a pixel PSO with the fixture shader and the test vertex stub. Both checks passed, and validation kept the emitted container hash. The full shader suite with native WARP 1.0.22 and Agility 1.620.2 reported 121 passed and 1 ignored. The inbox runtime on this host lacks SM 6.6, which accounts for the GPU test failures when run with the default loader. This check covers DXIL acceptance and PSO creation. AI-assisted.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 15:12 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at cbc8c33: cargo test -p victory-shader passes, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 15:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/1004#issuecomment-7135646905) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at cbc8c33: `cargo test -p victory-shader` passes, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 17:23 UTC · original

Heads-up: this PR and #563 both edit the cube-sample refusal in emit/lower.rs and conflict with each other. Merged together only texel coordinates are still refused; that resolution is in the bundle #1319 (clippy and tests pass). AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-24 17:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1004#issuecomment-7139132830) Heads-up: this PR and #563 both edit the cube-sample refusal in `emit/lower.rs` and conflict with each other. Merged together only texel coordinates are still refused; that resolution is in the bundle #1319 (clippy and tests pass). AI-assisted (Claude Code); no game data.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:25 UTC · original · edited 2026-11-25 22:28 UTC

Automated triage for the maintainers.

Needs rebase. This PR no longer merges cleanly into main: main has moved since the last triage, and the branch now conflicts in crates/victory-shader/src/emit/lower.rs. It will be reviewed again once it is rebased onto current main.

Previous verdict for this head: merge candidate.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/1004#issuecomment-7149536333) · edited 2026-11-25 22:28 UTC <!-- victory-triage v1 head=eb3e2297eda252fa7f9a994f7d1c354e55c5b0cb verdict=needs-rebase at=2026-11-25T22:32:00Z --> Automated triage for the maintainers. **Needs rebase.** This PR no longer merges cleanly into `main`: `main` has moved since the last triage, and the branch now conflicts in `crates/victory-shader/src/emit/lower.rs`. It will be reviewed again once it is rebased onto current `main`. Previous verdict for this head: merge candidate. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-shader/src/emit/lower.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1004/head:github-bot/gh-1004'
git switch 'github-bot/gh-1004'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1004'
git switch 'github-bot/gh-1004'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1004'
git switch 'github-bot/gh-1004'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1004'
git switch 'main'
git merge --squash 'github-bot/gh-1004'
git switch 'main'
git merge --ff-only 'github-bot/gh-1004'
git switch 'main'
git merge 'github-bot/gh-1004'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1004
No description provided.