Repository navigation
Conversation
|
I reproduced a I created two 8×8 textures with three guest mips, seeded mip 1 of an
The host descriptions confirm that the source stayed at 8×8 and the destination dropped to 4×4 in both Synthetic readback only. No game data used. AI-assisted with Codex. |
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (940d32f, Windows 11 x64, Rust 1.98.1 MSVC):
cargo test -p victory-gpu --lib srv_mips_adjustment— passed (srv_mips_adjustment_handles_straddled_and_dropped_views)cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok (183 files ok)
Clean VICTORY_TEXTURE_MIP_DROP SRV/resource mip-window adjustment and DXGI high-performance adapter selection. Looks good.
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
VICTORY_TEXTURE_MIP_DROP + DXGI high-performance adapter selection — env-tunable perf knobs; check the mip-drop math doesn't break feedback effects.
|
@DrDarkDK — great catch, thank you for the exact repro! Fixed in
|
|
Automated triage for the maintainers. Needs work. Thanks for the update; the description now matches the code. On
The known limit stands for this opt-in switch: CI: passing. Generated by Claude Code |
Xvania7
left a comment
There was a problem hiding this comment.
Verified 959e9aa on Windows 10 + NVIDIA GeForce RTX 5060:
descriptor::host::tests::srv_mips_adjustment_handles_straddled_and_dropped_views(passed)list::tests::copy_overlapping_mips_allows_same_format_family(passed)resource::tests::mip_drop_computation_respects_constraints&subresource_index_remapping_and_pruning(passed)texture::tests::auto_mip_drop_threshold_selects_low_vram_gpus,host_written_tracks_subresources_and_many_promotion&texture_mip_drop_runs_without_panic(passed)cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warningscargo xtask policy: 182 files ok
Approving.
|
Updated in
|
|
On #1272 vs this PR: #2146 is the maintained continuation of #737 (opened Unlike #1272 (currently |
b03edb8 to
d3f4227
Compare
d3f4227 to
773414a
Compare
773414a to
53a2b35
Compare
…res that many levels down (off by default) Port of ztrx PR #84 (antikohza, after Marvisak/VIctory#2146; in fork/z2 as 082f8b19 / merge cb0ac38) onto cool_fox's held levels instead of its own subresource remapping: a placed 2D texture the title fills, of at least VICTORY_TEXTURE_MIP_DROP_MIN_SIZE (1024) on both sides, gets its host copy from level min(drop, levels - 2) on (resource::base_level), so views below that level show it (descriptor::host::from_base), uploads read from it, and a view of a larger level never makes the copy grow past it (want_level). Such a texture is not made level by level (VICTORY_LEVELS_ON_DEMAND); with the held levels on (LEVELS_ON_DEMAND unset) the copy starts at the larger of the dropped level and the first level viewed. The held-levels line is logged when the drop is on and names its value. No automatic drop by VRAM size (fork/z2 enables 1 on <= 8 GB cards). Co-Authored-By: antikohza <244305127+antikohza@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TsTmwWj9LVy4o3qDH52Jas Signed-off-by: Impre-visible <69050895+Impre-visible@users.noreply.github.com>
…res that many levels down (off by default) Port of ztrx PR Marvisak#84 (antikohza, after Marvisak#2146; in fork/z2 as 082f8b1 / merge cb0ac38) onto cool_fox's held levels instead of its own subresource remapping: a placed 2D texture the title fills, of at least VICTORY_TEXTURE_MIP_DROP_MIN_SIZE (1024) on both sides, gets its host copy from level min(drop, levels - 2) on (resource::base_level), so views below that level show it (descriptor::host::from_base), uploads read from it, and a view of a larger level never makes the copy grow past it (want_level). Such a texture is not made level by level (VICTORY_LEVELS_ON_DEMAND); with the held levels on (LEVELS_ON_DEMAND unset) the copy starts at the larger of the dropped level and the first level viewed. The held-levels line is logged when the drop is on and names its value. No automatic drop by VRAM size (fork/z2 enables 1 on <= 8 GB cards). [cool/play-2: applied unchanged from Impre-visible/victory-gtx1660 (GPL-3.0-or-later) patches/0002 at d5c5a0cb (sha256 cbf20ea4...7a). The chain: antikohza's ztrx PR Marvisak#84 (fork/z2 082f8b1, merge cb0ac38), after Marvisak#2146, ported onto cool_fox f4b48ad by Impre-visible. Off by default: VICTORY_TEXTURE_MIP_DROP unset or 0 changes nothing.] Co-Authored-By: antikohza <244305127+antikohza@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TsTmwWj9LVy4o3qDH52Jas Signed-off-by: Impre-visible <69050895+Impre-visible@users.noreply.github.com>
Resolves #737. Supersedes closed #1296 and #1617 per triage instructions on #737. (DXGI adapter selection / #1226 was split out into #2371 per triage feedback.)
Summary
Adds an opt-in texture mip-drop quality switch (
VICTORY_TEXTURE_MIP_DROP=0..=3, default0) and minimum size floor (VICTORY_TEXTURE_MIP_DROP_MIN_SIZE, default1024) to reduce texture VRAM usage on 6–8 GB GPUs.What this changes
resource.rs): Dropsktop mips (compute_mip_drop_explicit) for pure sampled power-of-two textures>= min_size(excluding buffers, 3D textures, render/depth/UAV targets, MSAA, and BC-misaligned dimensions).descriptor/host.rs):adjust_srv_for_dropped_mipsshiftsMostDetailedMip,MipLevels, andResourceMinLODClamponto the smaller host mip chain. (Note: only the SRV mip window is shifted; shaderimage_get_resinfosees the host dimensions and D3D12 guarantees out-of-boundsimage_load/image_load_mipreads return0without faulting.)texture.rs,list.rs): Detiles console miphost_mip + mip_dropinto the smaller staging allocation, remaps/prunes dropped subresources inCopyTextureRegion/ResolveSubresource, and handlesCopyResourceacross different mip-drop counts viacopy_overlapping_mips+compatible_mip_drop_copy.Verification
CI/checkpassing on773414a.