Improve diagnostics for unknown DXGI formats #277

Manually merged
github merged 2 commits from github-bot/gh-277 into main 2026-11-27 13:08:26 +00:00 AGit
Owner

@⁠dhruv0807 on GitHub · 2026-11-27 07:33 UTC · original
dhruv0807:fix-unknown-dxgi-format-diagnostics → main · +32 −9 · 3 files · 2 commits · merged 2026-11-27 13:05 UTC

Summary

Improves error reporting when an unknown DXGI render-target format is encountered.

Changes

  • Change color_formats() to return Result<Vec<Format>, u32> so unknown DXGI format values are preserved.
  • Update shader pipeline handling to report the specific unknown target or depth format.
  • Update affected tests and add a regression test for unknown colour formats.

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.dylib is missing on this machine.

**@⁠dhruv0807** on GitHub · 2026-11-27 07:33 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/277) `dhruv0807:fix-unknown-dxgi-format-diagnostics` → `main` · +32 −9 · 3 files · 2 commits · merged 2026-11-27 13:05 UTC ## Summary Improves error reporting when an unknown DXGI render-target format is encountered. ## Changes - Change `color_formats()` to return `Result<Vec<Format>, u32>` so unknown DXGI format values are preserved. - Update shader pipeline handling to report the specific unknown target or depth format. - Update affected tests and add a regression test for unknown colour formats. ## 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.dylib` is missing on this machine.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 07:36:29 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 08:08 UTC · original

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-test and say it still passes.

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 08:08 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/277#issuecomment-7213190104) 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-test` and say it still passes.
github-bot force-pushed github-bot/gh-277 from 3e3d8cd904 to f1c799ff6b 2026-11-27 08:24:18 +00:00 Compare
Author
Owner

@⁠dhruv0807 on GitHub · 2026-11-27 08:23 UTC · original

Thanks! I've rebased the branch onto the latest main and pushed the update. I also ran tools/macos/run-summary.sh --self-test successfully and updated the PR description with the exact test commands and results.

**@⁠dhruv0807** on GitHub · 2026-11-27 08:23 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/277#issuecomment-7213493066) Thanks! I've rebased the branch onto the latest `main` and pushed the update. I also ran `tools/macos/run-summary.sh --self-test` successfully and updated the PR description with the exact test commands and results.
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 10:32 UTC · original

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.

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 10:32 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/277#issuecomment-7216005556) 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.
Author
Owner

@⁠dhruv0807 on GitHub · 2026-11-27 10:36 UTC · original

Thanks for confirming! Appreciate you reviewing the changes. I'll wait for the workflow approval and its result.

**@⁠dhruv0807** on GitHub · 2026-11-27 10:36 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/277#issuecomment-7216095568) Thanks for confirming! Appreciate you reviewing the changes. I'll wait for the workflow approval and its result.
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 11:35 UTC · original

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 run cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings before you push. After that it can merge.

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 11:35 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/277#issuecomment-7217253232) 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 run `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings` before you push. After that it can merge.
Author
Owner

@⁠dhruv0807 on GitHub · 2026-11-27 12:13 UTC · original

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 warnings

It completes successfully with no warnings or errors.

The test now uses a struct literal with ..Default::default() as requested.

Ready for review!

**@⁠dhruv0807** on GitHub · 2026-11-27 12:13 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/277#issuecomment-7217993883) 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 warnings` It completes successfully with no warnings or errors. The test now uses a struct literal with `..Default::default()` as requested. Ready for review!
github manually merged commit aaa3cd6668 into main 2026-11-27 13:08:26 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.