Repository navigation
Conversation
al3xar
left a comment
There was a problem hiding this comment.
Tested b784bee4c on NVIDIA GeForce RTX 3060 (Ampere), driver 621.24 (Vulkan 1.4.357, Vulkan SDK 1.4.363.0), Windows 11 x64, MSVC 19.44.35230.0, CMake + Ninja RelWithDebInfo (no game files): pass.
- Merges cleanly onto
upstream/main(dde82f27e). - Built
d3d12_copy_xfmt_testandd3d12_state_map_testcleanly with zero new warnings in the modified files. - PR head (
b784bee4c) withLEONIDA_VK_VALIDATION=1:CopyResource R32G32_UINT 1x2 -> BC1 4x8, 2 mips: matches 24 upload bytesCopyResource R32G32_UINT 1x2 -> BC1 4x8, 2 mips: matches WARP47 compared, 0 differ (BC <-> uncompressed, controls), 0 depth <-> colour differ(exit 0, 0 Vulkan validation errors).d3d12_state_map_test.exe: OK (exit 0).
- Negative control (
runtime/src/vulkan_replay.hreverted toupstream/main, PR test kept): fails on the new case as expected (CopyResource R32G32_UINT 1x2 -> BC1 4x8, 2 mips: expected 24 upload bytes,46 compared, 1 differ, exit 1). python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md runtime/src/vulkan_replay.h runtime/test/d3d12_copy_xfmt_test.cpp: clean (exit 0).
AI-assisted.
tupacfan04
left a comment
There was a problem hiding this comment.
The edge-copy logic looks correct: runtime/src/vulkan_replay.h:1919-1930 stages only mips whose source block extents exceed the destination, clips width and height, keeps aligned mips direct, and the mixed staged/direct emit is handled. The new test covers a width-partial BC1 mip, but it leaves the two branches the fix is most likely to get wrong unverified.
- The case is
runtime/test/d3d12_copy_xfmt_test.cpp:245-248:R32G32_UINT 1x2 -> BC1 4x8, 2 mips. Mip 1 is 2×4, so it is partial in width (2 < 4) but height 4 is exactly one full block. Theh * db > to.heightpath andmin(h * db, to.height)clipping atvulkan_replay.h:1923-1929are never exercised. Add a height-partial mip (4×2 or 2×2). - The new test is BC1-only.
check_edge_byteshardcodes eight-byte texels (tests/...:115-125,:263-266), so BC3 and BC7 partial destination edges (16-byte blocks, the formats named in the request) have no edge test; the existing BC7 cases are aligned whole copies. - For
check_edge_bytes, a host WARP refusal doescontinue(:287-290) instead of failing or comparing, so the claimed WARP comparison is not guaranteed for the new case either.
No product-code defect found; add the height-partial BC1 and a BC7 partial-edge case with exact-byte readback, and make a refused copy a failure (or an explicit skip with a reason) rather than a silent continue. Synthetic/readback only; no game files. AI-assisted (OpenCode).
|
Tested
AI-assisted (Claude Code). |
|
Independent Windows GPU check of Windows 11, MSVC 19.44.35230, Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Built and ran
Focal check only. Synthetic inputs, no game files. AI-assisted (OpenCode). |
|
Independent build + test: PASS AI-assisted (Claude Code). Windows 11 x64, MSVC 19.44.35220, Ninja RelWithDebInfo, NVIDIA GeForce RTX 3080 driver 621.24 / 32.0.16.2124 (Vulkan layer), WARP as the reference. Head
Code check: for an uncompressed → BC copy whose destination mip ends inside a block, the source is staged as one texel per block in a tightly packed scratch range. The BC write extent is clamped to the mip's real size, so the buffer row stride (w blocks × 8 bytes) is the same on both sides. Mips mixed in one |
Summary
CopyResourcerejected an otherwise valid uncompressed-to-BC copy if a destination mip ended inside a BC block. That dropped the entire command list. Stage only the affected mips through transfer scratch, with one input texel per BC block and a write extent clipped to the destination mip. Aligned mips still use direct image copies.The regression extends
d3d12_copy_xfmtwith a two-mipR32G32_UINT1×2 to BC1 4×8 copy. Mip 0 uses two full blocks and mip 1 uses one partial block. The test checks all 24 bytes against the upload pattern and WARP.Coordination claim in #8047. AI-assisted (OpenAI Codex).
Testing
Windows 11 Pro Insider Preview build 26340, MSVC 19.51.36263.0, Ninja 1.13.2.git.kitware.jobserver-pipe-1, CMake 4.4.3, Vulkan SDK 1.4.363.0. All GPU runs used
LEONIDA_VK_VALIDATION=1, including synchronization validation in the cross-format test.origin/maindde82f27ed3d12_copy_xfmt,d3d12_subresource_copy,d3d12_stencil_copy,d3d12_noop_copy,vk_bc_zero_init,vk_command_replayandreplay_copy_offset.d3d12_vulkan_devicefails thetiles == 1assertion for an 8×8 reserved RGBA8 texture.d3d12_depth_resolvereports changed destination bytes when comparing refused resolves. See d3d12_depth_resolve: read a refused resolve's destination through a list of its own #7930 for related work on that fixture.Checklist
test_ctest_registration.py(4/4),test_ci_registration.py(14/14),git diff --check, andcheck_no_game_data.pyon all changed files.