Repository navigation
GPU dxgi: null out on NOT_FOUND, preserve display mode format, add GetDesc1 - #1307
geiyiliyabumo wants to merge 1 commit into
Conversation
DenRakEiw
left a comment
There was a problem hiding this comment.
Tested merged cleanly onto main (ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC) with NVIDIA GeForce RTX 5090 (Blackwell) and WARP (VICTORY_D3D12_WARP=1):
cargo test -p victory-gpu(RTX 5090): 54 passed, 0 failed, 1 ignoredVICTORY_D3D12_WARP=1 cargo test -p victory-gpu(WARP): 54 passed, 0 failed, 1 ignoredcargo clippy -p victory-gpu --all-targets: 0 warningscargo xtask policy: ok
Clean DXGI fixes (NOT_FOUND null out, display mode format preservation, GetDesc1), verified on Blackwell hardware and WARP. Approving.
AI-assisted (Gemini 4 Neon).
|
I tested |
|
Local patches for two issues hit while running GTA VI 1.0.2.1 through VIctory on Linux (GE-Proton 11-14, vkd3d-proton 3.2.0, RTX 4060 Ti 8 GB):
Both are local uncommitted diffs, posted here for reuse. Tested only on the configuration above. diff --git a/crates/victory-gpu/src/dxgi.rs b/crates/victory-gpu/src/dxgi.rs
index c7f7c45..2535b68 100644
--- a/crates/victory-gpu/src/dxgi.rs
+++ b/crates/victory-gpu/src/dxgi.rs
@@ -219,6 +219,19 @@ struct Mode {
}
const _: () = assert!(size_of::<Mode>() == 32);
+/// The console's fixed output mode, overridable for hosts smaller than the
+/// console's 4K target: `VICTORY_MODE=1920x1080` reports that instead.
+fn mode_size() -> (u32, u32) {
+ const DEFAULT: (u32, u32) = (3840, 2160);
+ let Some(text) = std::env::var_os("VICTORY_MODE") else {
+ return DEFAULT;
+ };
+ let text = text.to_string_lossy();
+ text.split_once('x')
+ .and_then(|(w, h)| Some((w.trim().parse().ok()?, h.trim().parse().ok()?)))
+ .unwrap_or(DEFAULT)
+}
+
/// The console's mode list: one 4K mode at 60 Hz (Grand Theft Auto VI looks
/// for a 120 Hz one to allow 120 Hz frame intervals).
/// shortcut: fixed mode, not the host display's; report the host's rates if
@@ -242,9 +255,10 @@ extern "system" fn modes(
return MORE_DATA;
}
*count = 1;
+ let (width, height) = mode_size();
let mode = Mode {
- width: 3840,
- height: 2160,
+ width,
+ height,
refresh: [60, 1],
format: 0,
scanlines: 1, // progressive
diff --git a/crates/victory-hle/src/modules/gameinput.rs b/crates/victory-hle/src/modules/gameinput.rs
index a411bd0..da8d66c 100644
--- a/crates/victory-hle/src/modules/gameinput.rs
+++ b/crates/victory-hle/src/modules/gameinput.rs
@@ -1134,6 +1134,11 @@ mod host {
impl Source for Host {
fn pad(&mut self, slot: usize) -> Option<PadState> {
+ // The keyboard stand-in pad only exists while no host pad is
+ // connected; this hides a host pad the title mis-handles.
+ if std::env::var_os("VICTORY_NO_HOST_PAD").is_some() {
+ return None;
+ }
if self.empty_until[slot].is_some_and(|until| Instant::now() < until) {
return None;
} |
|
Automated triage for the maintainers. Closing because another open pull request covers the same change. See #553. Same NOT_FOUND fix as the smaller #553, plus extras without title evidence: GetDesc1 at adapter slot 0x50 (no title is logged calling it) and echoing the requested format in the console mode list (the title passes 0). If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
Summary
Audits \crates/victory-gpu/src/dxgi.rs\ and fixes three DXGI contract bugs:
Verification
AI-assisted; synthetic tests only, no game files.