Improve diagnostics for unknown DXGI formats #277
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/277"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by dhruv0807 on 2026-11-27T07:33:19Z.
Summary
Improves error reporting when an unknown DXGI render-target format is encountered.
Changes
color_formats()to returnResult<Vec<Format>, u32>so unknown DXGI format values are preserved.How it was tested
cargo test -p victory-gpu native::state::tests— passed (10 tests).cargo test -p victory-gpu native::console_state::tests— passed (5 tests).cargo check -p victory-gpu— passed.tools/macos/run-summary.sh --self-test— passed (self-test ok).git diff --check origin/main...HEAD— passed (no whitespace errors).A broader test run could not complete because
/usr/local/lib/libmetalirconverter.dylibis missing on this machine.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T08:08:14Z.
Thank you for your first pull request. The change does what the title says, and the unit test pins it.
Please update the branch on main, and fill in the "How it was tested" part of the template (the exact commands you ran and their result). Your workflow needs my approval to run; I will do that. I have not run it myself.
One thing to check: the refusal text now has the format number in it. Please run
tools/macos/run-summary.sh --self-testand say it still passes.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by dhruv0807 on 2026-11-27T08:23:53Z.
Thanks! I've rebased the branch onto the latest
mainand pushed the update. I also rantools/macos/run-summary.sh --self-testsuccessfully and updated the PR description with the exact test commands and results.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T10:32:23Z.
Thank you. The rebase, the filled-in description and the self-test run are all there. The only thing left is your workflow, which needs my approval to run. Once it has run and passed I will merge. I have not run it myself.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by dhruv0807 on 2026-11-27T10:36:47Z.
Thanks for confirming! Appreciate you reviewing the changes. I'll wait for the workflow approval and its result.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T11:35:38Z.
Your workflow has run now. Clippy fails in your new test: "field assignment outside of initializer for an instance created with Default::default()" (the test build of
victory-gpu). Please build the value with a struct literal (Type { field: value, ..Default::default() }) and runcargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningsbefore you push. After that it can merge.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by dhruv0807 on 2026-11-27T12:13:55Z.
Thanks! I've pushed the fix in commit
4e857b2.I've now successfully run the exact requested command:
cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningsIt completes successfully with no warnings or errors.
The test now uses a struct literal with
..Default::default()as requested.Ready for review!