GPU: match D3D12 copyable texture footprints #409

Closed
ToxicmaggotRP wants to merge 2 commits from upstream-pr/409 into main
ToxicmaggotRP commented 2026-11-24 03:00:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ToxicmaggotRP on 2026-11-24T03:00:26Z.


Title:
GPU: match D3D12 copyable texture footprints

Summary

Fixes #386.

  • Treat DXGI formats 68 and 69 as pairs of texels stored in 32-bit words.
  • Preserve an unaligned base offset in GetCopyableFootprints.
  • Align subsequent subresources relative to the supplied base offset.
  • Use checked arithmetic for footprint offsets and sizes, reporting unknown footprints on overflow.
  • Add regression tests for packed formats and unaligned base offsets.

Regression coverage

The new test copyable_footprints_match_native_packed_and_unaligned_cases covers:

  • DXGI formats 68 and 69 with an odd mip width.
  • Correct six-texel footprint width and 12-byte row size.
  • RGBA8 mip offsets with base offsets 0 and 1.
  • Expected total footprint size of 2068 bytes.

Verification status

  • Diff inspected against upstream main.
  • One source file changed.
  • cargo test -p victory-gpu: not yet run.
  • cargo xtask policy: not yet run.
  • GTA VI gameplay: not tested.

AI-assisted contribution; testing and review are still required.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6573627789 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409). Originally posted by [ToxicmaggotRP](https://github.com/ToxicmaggotRP) on 2026-11-24T03:00:26Z. --- **Title:** GPU: match D3D12 copyable texture footprints ## Summary Fixes #386. - Treat DXGI formats 68 and 69 as pairs of texels stored in 32-bit words. - Preserve an unaligned base offset in `GetCopyableFootprints`. - Align subsequent subresources relative to the supplied base offset. - Use checked arithmetic for footprint offsets and sizes, reporting unknown footprints on overflow. - Add regression tests for packed formats and unaligned base offsets. ## Regression coverage The new test `copyable_footprints_match_native_packed_and_unaligned_cases` covers: - DXGI formats 68 and 69 with an odd mip width. - Correct six-texel footprint width and 12-byte row size. - RGBA8 mip offsets with base offsets 0 and 1. - Expected total footprint size of 2068 bytes. ## Verification status - Diff inspected against upstream `main`. - One source file changed. - `cargo test -p victory-gpu`: not yet run. - `cargo xtask policy`: not yet run. - GTA VI gameplay: not tested. AI-assisted contribution; testing and review are still required.
towiice commented 2026-11-24 06:52:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by towiice on 2026-11-24T03:21:29Z.

Review: COMMENTED


Tested PR head 340499c on Windows 11 x64 build 10.0.26300 (26H2), NVIDIA GeForce GTX 1650 SUPER (driver 610.88), Rust 1.100.0 (stable-x86_64-pc-windows-gnullvm):

  • cargo test -p victory-gpu -- --test-threads=4: 44 passed, 0 failed, 1 ignored (0.51 s).

All victory-gpu copyable-footprint / texel-block tests pass cleanly.

<!-- greyfinch-sync:Marvisak/VIctory:review:6033179331 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409#pullrequestreview-6033179331). Originally posted by [towiice](https://github.com/towiice) on 2026-11-24T03:21:29Z. **Review:** COMMENTED --- Tested PR head `340499c` on Windows 11 x64 build 10.0.26300 (26H2), NVIDIA GeForce GTX 1650 SUPER (driver 610.88), Rust 1.100.0 (`stable-x86_64-pc-windows-gnullvm`): - `cargo test -p victory-gpu -- --test-threads=4`: **44 passed, 0 failed, 1 ignored** (0.51 s). All `victory-gpu` copyable-footprint / texel-block tests pass cleanly.
mercuryVM commented 2026-11-24 06:52:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T06:33:15Z.

Review: APPROVED


Tested 340499c on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (265 passed, 0 failed).

  • DXGI 68 and 69 (R8G8_B8G8 / G8R8_G8B8) are 4 bytes per 2×1 texel pair. The old (2, 1) sized them as 16-bit single texels. That got the byte total right only for even widths, and the width was never rounded up to the pair. Separating block_width and block_height in texture_element handles that without touching the BC formats.
  • Footprint offsets are now base + end, with end aligned to 512 between subresources and not after the last. TotalBytes is end. That matches D3D12, which leaves an unaligned BaseOffset as is and doesn't pad past the last subresource. The checked arithmetic turns overflow into the documented all-ones result.
  • The tests' expected values (6×3 footprint, 524 total, offset base + 1536, 2068 total) agree with the formulas above. I did not compare them against a live GetCopyableFootprints call.

No issues found.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6034712578 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409#pullrequestreview-6034712578). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T06:33:15Z. **Review:** APPROVED --- Tested 340499c on Windows 11, RTX 5070, MSVC: `cargo test --workspace --no-fail-fast` passes (265 passed, 0 failed). - DXGI 68 and 69 (`R8G8_B8G8` / `G8R8_G8B8`) are 4 bytes per 2×1 texel pair. The old `(2, 1)` sized them as 16-bit single texels. That got the byte total right only for even widths, and the width was never rounded up to the pair. Separating `block_width` and `block_height` in `texture_element` handles that without touching the BC formats. - Footprint offsets are now `base + end`, with `end` aligned to 512 between subresources and not after the last. `TotalBytes` is `end`. That matches D3D12, which leaves an unaligned `BaseOffset` as is and doesn't pad past the last subresource. The checked arithmetic turns overflow into the documented all-ones result. - The tests' expected values (6×3 footprint, 524 total, offset `base + 1536`, 2068 total) agree with the formulas above. I did not compare them against a live `GetCopyableFootprints` call. No issues found. AI-assisted (Claude Code).
zhouzhidong3-hash commented 2026-11-24 06:55:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by zhouzhidong3-hash on 2026-11-24T03:07:29Z.


Independent RTX 5070 verification of #386 against this PR at 93991703e760add0247c00bf35583b790f7922e9. I reproduced the PR's new unit test failing on the unchanged head: format 68 mip 1 returns (6, 4), expected (6, 3).

The packed element is 2 texels wide and 1 row tall. The changed width is also used to round the height, count rows, and calculate the byte span. For both DXGI 68 and 69, a 10×6 texture queried at mip 1 gives:

Implementation Footprint Rows Bytes per row Span
Native D3D12, RTX 5070 6×3 3 12 524
PR head 6×4 2 12 268

Native aligned upload/readback of synthetic patterns had zero mismatches for both packed formats and RGBA8. A negative control initializing only 10 of 12 payload bytes per packed mip row produced 6 mismatched bytes per format (2 per row × 3 rows); RGBA8 stayed clean.

With the incremental patch below, cargo test --locked -p victory-gpu reported 44 passed, 0 failed, 1 ignored. Separately the patched implementation matched 2,250 subresource records across 1,350 native GetCopyableFootprints queries, comparing offset, width, height, pitch, row count, row size, and total span. Matrix: formats 28/68/69/71/98, widths 8/12/260, heights 4/12/20, three mip levels, all contiguous mip ranges, and bases 0/1/511/512/513. Unaligned bases were queried only. Windows 10 19045, RTX 5070 driver 591.86, Rust 1.100.0 MSVC. No retail title or full-workspace test. AI-assisted by Codex.

Incremental patch against this PR
diff --git a/crates/victory-gpu/src/resource.rs b/crates/victory-gpu/src/resource.rs
index 1facb1f..45f6504 100644
--- a/crates/victory-gpu/src/resource.rs
+++ b/crates/victory-gpu/src/resource.rs
@@ -134,6 +134,13 @@ pub(crate) fn element(format: u32) -> Option<(u64, u64)> {
     })
 }
 
+/// Packed formats 68/69 occupy a pair of texels along X and one row along Y.
+fn texture_element(format: u32) -> Option<(u64, u64, u64)> {
+    let (bytes, width) = element(format)?;
+    let height = if matches!(format, 68 | 69) { 1 } else { width };
+    Some((bytes, width, height))
+}
+
 /// A texture's layout in console memory, as the console's layout library
 /// gives it (`victory-hle`'s `xg` serves the same): the description's
 /// layout field is `0x100 | swizzle mode`, 1 linear, 0 the library's pick.
@@ -195,7 +202,7 @@ fn footprint(desc: &ResourceDesc) -> Option<AllocationInfo> {
     let bytes = if desc.dimension == BUFFER {
         desc.width
     } else {
-        let (element, block) = element(desc.format)?;
+        let (element, block_width, block_height) = texture_element(desc.format)?;
         let (depth, slices) = if desc.dimension == TEXTURE_3D {
             (u64::from(desc.depth_or_array_size), 1)
         } else {
@@ -205,8 +212,8 @@ fn footprint(desc: &ResourceDesc) -> Option<AllocationInfo> {
         let mips = mip_count(desc);
         let mut chain = 0u64;
         for mip in 0..mips.min(64) {
-            let w = (desc.width >> mip).max(1).div_ceil(block);
-            let h = (height >> mip).max(1).div_ceil(block);
+            let w = (desc.width >> mip).max(1).div_ceil(block_width);
+            let h = (height >> mip).max(1).div_ceil(block_height);
             let d = (depth >> mip).max(1);
             chain = chain.checked_add(w.checked_mul(h)?.checked_mul(d)?.checked_mul(element)?)?;
         }
@@ -328,9 +335,9 @@ pub(crate) struct PlacedFootprint {
 impl PlacedFootprint {
     /// The bytes it spans in a buffer: every row pitched but the last.
     pub(crate) fn bytes(&self) -> Option<u64> {
-        let (element, block) = element(self.format)?;
-        let lines = u64::from(self.height).div_ceil(block) * u64::from(self.depth);
-        let last = u64::from(self.width).div_ceil(block) * element;
+        let (element, block_width, block_height) = texture_element(self.format)?;
+        let lines = u64::from(self.height).div_ceil(block_height) * u64::from(self.depth);
+        let last = u64::from(self.width).div_ceil(block_width) * element;
         Some(u64::from(self.row_pitch) * lines.saturating_sub(1) + last)
     }
 }
@@ -370,17 +377,17 @@ fn subresource(desc: &ResourceDesc, index: u32) -> Option<(PlacedFootprint, u32,
     if slice >= slices {
         return None;
     }
-    let (element, block) = element(desc.format)?;
-    let width = (desc.width >> mip).max(1).next_multiple_of(block);
+    let (element, block_width, block_height) = texture_element(desc.format)?;
+    let width = (desc.width >> mip).max(1).next_multiple_of(block_width);
     let height = (u64::from(desc.height) >> mip)
         .max(1)
-        .next_multiple_of(block);
+        .next_multiple_of(block_height);
     let depth = if desc.dimension == TEXTURE_3D {
         (u32::from(desc.depth_or_array_size) >> mip).max(1)
     } else {
         1
     };
-    let row_size = width / block * element;
+    let row_size = width / block_width * element;
     let footprint = PlacedFootprint {
         offset: 0,
         format: desc.format,
@@ -389,7 +396,7 @@ fn subresource(desc: &ResourceDesc, index: u32) -> Option<(PlacedFootprint, u32,
         depth,
         row_pitch: u32::try_from(row_size.next_multiple_of(PITCH)).ok()?,
     };
-    Some((footprint, u32::try_from(height / block).ok()?, row_size))
+    Some((footprint, u32::try_from(height / block_height).ok()?, row_size))
 }
 
 /// Device method: where each subresource goes in an upload buffer. Rows

Additional native D3D12 comparison on the same RTX 5070 and patched revision: 282 GetCopyableFootprints queries, 1,010 subresource records, all matched. I tested three-layer 2D arrays in DXGI formats 28, 68 and 69, plus a depth-five 3D texture in format 28. Each descriptor was 20 by 12 with three mips. I checked every contiguous subresource range at base offsets 0 and 513, comparing offsets, width, height, depth, row pitch, row count, row bytes and total bytes. This checks layout calculation only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7120793443 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7120793443). Originally posted by [zhouzhidong3-hash](https://github.com/zhouzhidong3-hash) on 2026-11-24T03:07:29Z. --- Independent RTX 5070 verification of #386 against this PR at `93991703e760add0247c00bf35583b790f7922e9`. I reproduced the PR's new unit test failing on the unchanged head: format 68 mip 1 returns (6, 4), expected (6, 3). The packed element is 2 texels wide **and 1 row tall**. The changed width is also used to round the height, count rows, and calculate the byte span. For both DXGI 68 and 69, a 10×6 texture queried at mip 1 gives: | Implementation | Footprint | Rows | Bytes per row | Span | |---|---:|---:|---:|---:| | Native D3D12, RTX 5070 | 6×3 | 3 | 12 | 524 | | PR head | 6×4 | 2 | 12 | 268 | Native aligned upload/readback of synthetic patterns had zero mismatches for both packed formats and RGBA8. A negative control initializing only 10 of 12 payload bytes per packed mip row produced 6 mismatched bytes per format (2 per row × 3 rows); RGBA8 stayed clean. With the incremental patch below, `cargo test --locked -p victory-gpu` reported **44 passed, 0 failed, 1 ignored**. Separately the patched implementation matched **2,250 subresource records across 1,350 native GetCopyableFootprints queries**, comparing offset, width, height, pitch, row count, row size, and total span. Matrix: formats 28/68/69/71/98, widths 8/12/260, heights 4/12/20, three mip levels, all contiguous mip ranges, and bases 0/1/511/512/513. Unaligned bases were queried only. Windows 10 19045, RTX 5070 driver 591.86, Rust 1.100.0 MSVC. No retail title or full-workspace test. AI-assisted by Codex. <details><summary>Incremental patch against this PR</summary> ```diff diff --git a/crates/victory-gpu/src/resource.rs b/crates/victory-gpu/src/resource.rs index 1facb1f..45f6504 100644 --- a/crates/victory-gpu/src/resource.rs +++ b/crates/victory-gpu/src/resource.rs @@ -134,6 +134,13 @@ pub(crate) fn element(format: u32) -> Option<(u64, u64)> { }) } +/// Packed formats 68/69 occupy a pair of texels along X and one row along Y. +fn texture_element(format: u32) -> Option<(u64, u64, u64)> { + let (bytes, width) = element(format)?; + let height = if matches!(format, 68 | 69) { 1 } else { width }; + Some((bytes, width, height)) +} + /// A texture's layout in console memory, as the console's layout library /// gives it (`victory-hle`'s `xg` serves the same): the description's /// layout field is `0x100 | swizzle mode`, 1 linear, 0 the library's pick. @@ -195,7 +202,7 @@ fn footprint(desc: &ResourceDesc) -> Option<AllocationInfo> { let bytes = if desc.dimension == BUFFER { desc.width } else { - let (element, block) = element(desc.format)?; + let (element, block_width, block_height) = texture_element(desc.format)?; let (depth, slices) = if desc.dimension == TEXTURE_3D { (u64::from(desc.depth_or_array_size), 1) } else { @@ -205,8 +212,8 @@ fn footprint(desc: &ResourceDesc) -> Option<AllocationInfo> { let mips = mip_count(desc); let mut chain = 0u64; for mip in 0..mips.min(64) { - let w = (desc.width >> mip).max(1).div_ceil(block); - let h = (height >> mip).max(1).div_ceil(block); + let w = (desc.width >> mip).max(1).div_ceil(block_width); + let h = (height >> mip).max(1).div_ceil(block_height); let d = (depth >> mip).max(1); chain = chain.checked_add(w.checked_mul(h)?.checked_mul(d)?.checked_mul(element)?)?; } @@ -328,9 +335,9 @@ pub(crate) struct PlacedFootprint { impl PlacedFootprint { /// The bytes it spans in a buffer: every row pitched but the last. pub(crate) fn bytes(&self) -> Option<u64> { - let (element, block) = element(self.format)?; - let lines = u64::from(self.height).div_ceil(block) * u64::from(self.depth); - let last = u64::from(self.width).div_ceil(block) * element; + let (element, block_width, block_height) = texture_element(self.format)?; + let lines = u64::from(self.height).div_ceil(block_height) * u64::from(self.depth); + let last = u64::from(self.width).div_ceil(block_width) * element; Some(u64::from(self.row_pitch) * lines.saturating_sub(1) + last) } } @@ -370,17 +377,17 @@ fn subresource(desc: &ResourceDesc, index: u32) -> Option<(PlacedFootprint, u32, if slice >= slices { return None; } - let (element, block) = element(desc.format)?; - let width = (desc.width >> mip).max(1).next_multiple_of(block); + let (element, block_width, block_height) = texture_element(desc.format)?; + let width = (desc.width >> mip).max(1).next_multiple_of(block_width); let height = (u64::from(desc.height) >> mip) .max(1) - .next_multiple_of(block); + .next_multiple_of(block_height); let depth = if desc.dimension == TEXTURE_3D { (u32::from(desc.depth_or_array_size) >> mip).max(1) } else { 1 }; - let row_size = width / block * element; + let row_size = width / block_width * element; let footprint = PlacedFootprint { offset: 0, format: desc.format, @@ -389,7 +396,7 @@ fn subresource(desc: &ResourceDesc, index: u32) -> Option<(PlacedFootprint, u32, depth, row_pitch: u32::try_from(row_size.next_multiple_of(PITCH)).ok()?, }; - Some((footprint, u32::try_from(height / block).ok()?, row_size)) + Some((footprint, u32::try_from(height / block_height).ok()?, row_size)) } /// Device method: where each subresource goes in an upload buffer. Rows ``` </details> Additional native D3D12 comparison on the same RTX 5070 and patched revision: 282 GetCopyableFootprints queries, 1,010 subresource records, all matched. I tested three-layer 2D arrays in DXGI formats 28, 68 and 69, plus a depth-five 3D texture in format 28. Each descriptor was 20 by 12 with three mips. I checked every contiguous subresource range at base offsets 0 and 513, comparing offsets, width, height, depth, row pitch, row count, row bytes and total bytes. This checks layout calculation only.
ToxicmaggotRP commented 2026-11-24 06:55:23 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ToxicmaggotRP on 2026-11-24T03:16:57Z.


Thanks for catching this. You're right: the original implementation incorrectly used the packed element width for both axes.

I've pushed the correction in commit 340499c44c7f52b47b856b2bd97dd7626a059b5d.

The implementation now separates block width and block height. DXGI formats 68/69 use a 2-texel width and a 1-row height throughout allocation sizing, footprint span calculations, and subresource row counts.

The resulting resource.rs blob matches the one in your incremental patch.

Thank you for the independent RTX 5070 testing and the detailed native D3D12 comparison. Your report was extremely useful in finding this mistake.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7120942679 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7120942679). Originally posted by [ToxicmaggotRP](https://github.com/ToxicmaggotRP) on 2026-11-24T03:16:57Z. --- Thanks for catching this. You're right: the original implementation incorrectly used the packed element width for both axes. I've pushed the correction in commit `340499c44c7f52b47b856b2bd97dd7626a059b5d`. The implementation now separates block width and block height. DXGI formats 68/69 use a 2-texel width and a 1-row height throughout allocation sizing, footprint span calculations, and subresource row counts. The resulting `resource.rs` blob matches the one in your incremental patch. Thank you for the independent RTX 5070 testing and the detailed native D3D12 comparison. Your report was extremely useful in finding this mistake.
LocranKing commented 2026-11-24 06:55:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by LocranKing on 2026-11-24T03:22:29Z.


Ran the pending checks on Windows 11 + NVIDIA GeForce RTX 3060 Ti (MSVC 1.98.1).

Tested

  • Commit: 340499c (pr-409, clean tree)
  • Environment: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8 GB, driver 32.0.16.2101), pinned Rust 1.98.1 (x86_64-pc-windows-msvc)
  • cargo xtask policy: asset policy: 151 files ok
  • cargo test -p victory-gpu --lib: 44 passed, 0 failed, 1 ignored (resource::tests::copyable_footprints_match_native_packed_and_unaligned_cases ... ok; note frame::tests::waits_end_on_ticks_and_count_frames flaked once under heavy background CPU load and passed cleanly when re-run normally)
  • cargo test --workspace: 265 passed, 0 failed, 4 ignored
  • cargo build --profile diag -p victory --features diagnostics + 35 s boot/menu run on RTX 3060 Ti (VICTORY_D3D12_DRED=1): presented 512+ frames (2551/2551 draws, 256/256 dispatches), no crashes (crashes.log empty).

Not tested: Entering gameplay/world beyond the start screens; standalone native Verify-Footprints.ps1 probe from #386.

AI use: Antigravity (Gemini 4 Hydrogen) ran the checks and drafted this comment from the command outputs.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121028154 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7121028154). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-24T03:22:29Z. --- Ran the pending checks on Windows 11 + NVIDIA GeForce RTX 3060 Ti (MSVC `1.98.1`). **Tested** - Commit: `340499c` (`pr-409`, clean tree) - Environment: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8 GB, driver `32.0.16.2101`), pinned Rust `1.98.1` (`x86_64-pc-windows-msvc`) - `cargo xtask policy`: `asset policy: 151 files ok` - `cargo test -p victory-gpu --lib`: **44 passed, 0 failed, 1 ignored** (`resource::tests::copyable_footprints_match_native_packed_and_unaligned_cases ... ok`; note `frame::tests::waits_end_on_ticks_and_count_frames` flaked once under heavy background CPU load and passed cleanly when re-run normally) - `cargo test --workspace`: **265 passed, 0 failed, 4 ignored** - `cargo build --profile diag -p victory --features diagnostics` + 35 s boot/menu run on RTX 3060 Ti (`VICTORY_D3D12_DRED=1`): presented 512+ frames (`2551/2551` draws, `256/256` dispatches), no crashes (`crashes.log` empty). **Not tested:** Entering gameplay/world beyond the start screens; standalone native `Verify-Footprints.ps1` probe from #386. **AI use:** Antigravity (`Gemini 4 Hydrogen`) ran the checks and drafted this comment from the command outputs.
broccolize commented 2026-11-24 06:55:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by broccolize on 2026-11-24T03:39:29Z.


Following up on #386, I verified 340499c on Windows 11 build 26300.9974. Native GetCopyableFootprints returned identical results on the GTX 1650, Intel UHD Graphics, and Microsoft WARP using synthetic textures.

  • DXGI formats 68 and 69, mip 1 of a 10×6 texture: 6×3 footprint, 3 rows, 12 bytes per row, 256-byte row pitch, and 524 bytes total.
  • RGBA8, 10×6 with two mips: offsets of 0 and 1536 at base 0, and 1 and 1537 at base 1. Both returned 2068 bytes total.

cargo test --locked -p victory-gpu --lib on Rust 1.98.1 (x86_64-pc-windows-gnu) finished with 44 passed, 0 failed, and 1 ignored, including a pass for the footprint regression. The asset policy check passed for all 151 files.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121300049 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7121300049). Originally posted by [broccolize](https://github.com/broccolize) on 2026-11-24T03:39:29Z. --- Following up on #386, I verified `340499c` on Windows 11 build 26300.9974. Native `GetCopyableFootprints` returned identical results on the GTX 1650, Intel UHD Graphics, and Microsoft WARP using synthetic textures. - DXGI formats 68 and 69, mip 1 of a 10×6 texture: 6×3 footprint, 3 rows, 12 bytes per row, 256-byte row pitch, and 524 bytes total. - RGBA8, 10×6 with two mips: offsets of 0 and 1536 at base 0, and 1 and 1537 at base 1. Both returned 2068 bytes total. `cargo test --locked -p victory-gpu --lib` on Rust 1.98.1 (`x86_64-pc-windows-gnu`) finished with 44 passed, 0 failed, and 1 ignored, including a pass for the footprint regression. The asset policy check passed for all 151 files. AI-assisted with Codex.
dcastell1 commented 2026-11-24 10:03:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by dcastell1 on 2026-11-24T09:48:45Z.


Verified on native Windows, no Wine:

  • NVIDIA GeForce RTX 5090 (GB202), driver 621.24, Windows 11 10.0.26300, Rust 1.98.1 (rust-toolchain.toml), MSVC 14.44.35207, debug build.
  • main@8e79c80 baseline on this box: 311 passed, 0 failed, 6 ignored (cargo test --workspace, exit 0).
  • With this PR at 340499c4 applied clean (patch -p1, no fuzz): 312 passed, 0 failed, 6 ignored, exit 0 — one more test than main, which is the footprint expectation, and nothing else changes verdict.

So the new upload_footprints_follow_the_pc_rules expectations hold on the same driver yuniskh reported (#386: 621.24, Windows 11 26300), which is the pair of inputs the issue table names — this is the suite side, not a fresh GetCopyableFootprints comparison.

Tree restored afterwards (checksum against a clean checkout); no game data, the tests are synthetic.

AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7127923416 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7127923416). Originally posted by [dcastell1](https://github.com/dcastell1) on 2026-11-24T09:48:45Z. --- Verified on native Windows, no Wine: - **NVIDIA GeForce RTX 5090 (GB202), driver 621.24**, Windows 11 10.0.26300, Rust 1.98.1 (`rust-toolchain.toml`), MSVC 14.44.35207, debug build. - `main@8e79c80` baseline on this box: **311 passed, 0 failed, 6 ignored** (`cargo test --workspace`, exit 0). - With this PR at `340499c4` applied clean (`patch -p1`, no fuzz): **312 passed, 0 failed, 6 ignored**, exit 0 — one more test than main, which is the footprint expectation, and nothing else changes verdict. So the new `upload_footprints_follow_the_pc_rules` expectations hold on the same driver yuniskh reported (#386: 621.24, Windows 11 26300), which is the pair of inputs the issue table names — this is the suite side, not a fresh `GetCopyableFootprints` comparison. Tree restored afterwards (checksum against a clean checkout); no game data, the tests are synthetic. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Marvisak commented 2026-11-25 01:07:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:31:46Z.


Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (4118f33b). Conflicting files: crates/victory-gpu/src/resource.rs.

The content will be reviewed once the branch is rebased onto main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148600634 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7148600634). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:31:46Z. --- <!-- victory-triage v1 head=340499c44c7f52b47b856b2bd97dd7626a059b5d verdict=needs-rebase at=2026-11-25T00:24:46Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (4118f33b). Conflicting files: `crates/victory-gpu/src/resource.rs`. The content will be reviewed once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
andrewpozdnakov7-jpg commented 2026-11-25 21:03:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T20:15:04Z.


I rebased both commits from 340499c onto 13f91ca for the conflict in resource.rs. The rebase keeps the depth/stencil plane handling from main and uses separate block widths and heights in the copy-row calculation added since the original base.

Both commits retain @ToxicmaggotRP as the Git author. You can cherry-pick 98cef84 followed by 62f276a, or take the rebased branch. Please retain the original Git author if you take the commits.

I ran the same synthetic queries against VIctory and native D3D12 on Windows WARP. Main differed on three out of five queries. With the rebase, every footprint field, row count, row size and total matched in all five.

Case Guest on main Native WARP and rebased guest
Format 68 or 69, odd mip 5×3, 10 bytes per row, 522 bytes total 6×3, 12 bytes per row, 524 bytes total
RGBA8, base offset 1 Offsets 512 and 2048, 2579 bytes total Offsets 1 and 1537, 2068 bytes total

RGBA8 with base offset 0 and all eight D24S8 plane entries with base offset 512 matched on both trees. The app-local WARP GPU suite passed 200 tests, including the extra comparison, with one ignored. Strict Clippy passed with default and all features. The repository asset policy passed. All test inputs were synthetic.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7173395254 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7173395254). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-25T20:15:04Z. --- I rebased both commits from `340499c` onto `13f91ca` for the conflict in `resource.rs`. The rebase keeps the depth/stencil plane handling from main and uses separate block widths and heights in the copy-row calculation added since the original base. Both commits retain @ToxicmaggotRP as the Git author. You can cherry-pick [`98cef84`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/98cef84ba1671631e1f4bbb21f550c1010b8b8e5) followed by [`62f276a`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/62f276ac0b02d3323844ae91c5bc3f14b49bb3a0), or take the [rebased branch](https://github.com/andrewpozdnakov7-jpg/VIctory/tree/codex2/rebase-409). Please retain the original Git author if you take the commits. I ran the same synthetic queries against VIctory and native D3D12 on Windows WARP. Main differed on three out of five queries. With the rebase, every footprint field, row count, row size and total matched in all five. | Case | Guest on main | Native WARP and rebased guest | | --- | --- | --- | | Format 68 or 69, odd mip | 5×3, 10 bytes per row, 522 bytes total | 6×3, 12 bytes per row, 524 bytes total | | RGBA8, base offset 1 | Offsets 512 and 2048, 2579 bytes total | Offsets 1 and 1537, 2068 bytes total | RGBA8 with base offset 0 and all eight D24S8 plane entries with base offset 512 matched on both trees. The app-local WARP GPU suite passed 200 tests, including the extra comparison, with one ignored. Strict Clippy passed with default and all features. The repository asset policy passed. All test inputs were synthetic.
upstream-sync closed this pull request 2026-11-26 00:01:26 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!409
No description provided.