GPU: match D3D12 copyable texture footprints #409

Closed
github-bot wants to merge 2 commits from gh-pr/409/head into gh-pr/409/base
Owner

@⁠ToxicmaggotRP on GitHub · 2026-11-24 03:00 UTC · original
ToxicmaggotRP:gpu/copyable-footprints-d3d12-layouts → main · +94 −23 · 1 files · 2 commits · closed without merging

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.

**@⁠ToxicmaggotRP** on GitHub · 2026-11-24 03:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/409) `ToxicmaggotRP:gpu/copyable-footprints-d3d12-layouts` → `main` · +94 −23 · 1 files · 2 commits · closed without merging **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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:02:48 +00:00
github-bot closed this pull request 2026-11-26 04:02:49 +00:00
Author
Owner

@⁠zhouzhidong3-hash on GitHub · 2026-11-24 03:07 UTC · original · edited 2026-11-24 03:10 UTC

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.

**@⁠zhouzhidong3-hash** on GitHub · 2026-11-24 03:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7120793443) · edited 2026-11-24 03:10 UTC 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.
Author
Owner

@⁠ToxicmaggotRP on GitHub · 2026-11-24 03:16 UTC · original · edited 2026-11-24 03:18 UTC

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.

**@⁠ToxicmaggotRP** on GitHub · 2026-11-24 03:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7120942679) · edited 2026-11-24 03:18 UTC 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.
Author
Owner

@⁠LocranKing on GitHub · 2026-11-24 03:22 UTC · original

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.

**@⁠LocranKing** on GitHub · 2026-11-24 03:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7121028154) 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.
Author
Owner

@⁠broccolize on GitHub · 2026-11-24 03:39 UTC · original

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.

**@⁠broccolize** on GitHub · 2026-11-24 03:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7121300049) 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.
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 09:48 UTC · original

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.

**@⁠dcastell1** on GitHub · 2026-11-24 09:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7127923416) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:31 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 00:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7148600634) <!-- 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)_
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 20:15 UTC · original

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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 20:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/409#issuecomment-7173395254) 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.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!409
No description provided.