Repository navigation
Conversation
al3xar
left a comment
There was a problem hiding this comment.
AI-assisted review and test.
Independent Windows MSVC + GPU verification of c0209f3d2 on Windows 11 x64 (es-ES), MSVC 19.44.35230.0 (RelWithDebInfo, -DLEONIDA_REQUIRE_VULKAN=ON), NVIDIA GeForce RTX 3060 (driver 621.24, Vulkan SDK 1.4.363.0), no game files used: pass.
- Merge & hygiene: Merges cleanly with
upstream/main(867d922f0,git merge-treeexit 0);python -I scripts/check_no_game_data.pyclean. - Build:
replay_copy_offset_testandd3d12_copy_xfmt_testbuilt cleanly with MSVC/W4(no new warnings). - Tests (
LEONIDA_VK_VALIDATION=1):replay_copy_offset_test: pass (exit 0).d3d12_copy_xfmt_test: pass, 0 validation errors (46 compared, 0 differ (BC <-> uncompressed, controls), 0 depth <-> colour differ).
- Negative control: Reverting
runtime/src/vulkan_replay.htoupstream/maincausesreplay_copy_offset_testto fail on the new 32-bit wrap cases (UINT32_MAX, exit 1). - Code check: Widening the destination block and texel sums to
std::uint64_tinprepare_texture_copycleanly prevents 32-bit wraparound on BC/uncompressed format-conversion copies.
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Independent Windows review (commit c0209f3d202a47651b46a51e48cd2396b071854e)
What changed:
runtime/src/vulkan_replay.h:- In
prepare_texture_copy, promotes destination block offset arithmetic tostd::uint64_t. - Prevents 32-bit integer overflow wrapping when copying large mip offsets or elevated slice bounds during texture format conversion.
- In
runtime/test/replay_copy_offset_test.cpp:- Tests boundary conditions at
UINT32_MAX.
- Tests boundary conditions at
Verification:
- Verified on Windows host: boundary checks and promotion logic pass cleanly.
- Clean diff: no game data.
LGTM!
Grimkeh
left a comment
There was a problem hiding this comment.
Independent Linux CPU review
What changed: prepare_texture_copy destination bounds for format-conversion copies no longer wrap in 32 bits; BC→uncompressed cases covered in replay_copy_offset_test.
Checked: compiled + ran runtime/test/replay_copy_offset_test.cpp → replay_copy_offset: ….
Looks correct; no game files / no GPU.
|
Tested on Apple M1 Max, macOS 27.2.1 arm64: built |
|
Tested
AI-assisted: yes. |
|
Tested
So the new test depends on the change. Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) with the agent's recheck.sh before posting. |
|
Tested on AMD Radeon RX 7700 XT (RDNA3), AMD Windows driver 32.0.32029.2010, Windows 11, MSVC 14.51 Release, at c0209f3. Full No regression. The only failures are the same 5 as on AI-assisted (Claude Code). |
Claimed in #9065 (comment)
@ItsNotRexed: an exe PR, as you asked.
What
Use 64-bit destination bounds sums for texture-to-texture BC/uncompressed conversion. Add CPU-only replay regression coverage. AI-assisted.
Why
32-bit addition could wrap and accept an invalid destination offset, emitting an image copy with a negative offset.
Tested
replay_copy_offset_testvia ctest: passed. Before the fix the same test failed for x = 0xFFFFFFFF and y = 0xFFFFFFFF (an image copy was emitted); the x = 0 positive control passed./root/fast_test_exe.sh, targetreplay_copy_offset_test, fresh configure): EXIT 0 with the fix.runtime/src/vulkan_replay.hreverted to origin/main: EXIT 1 (FAIL: conversion bounds result,FAIL: invalid conversion emits no image copy).git diff --checkand the game-data check passed.What is left out
The buffer/texture footprint path, covered by PR #8777, is unchanged. No GPU or game-file testing.
AI-assisted: yes