Repository navigation
Conversation
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.
Logical indirect buffer spans enforced: 8K gpu diff — bounds the indirect argument buffer reads. Pairs with #1813's tests.
VIctory V2: community PRs, merged and testedOpen PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: Unofficial community fork of Marvisak/VIctory, GPL-3.0. |
Melow-code
left a comment
There was a problem hiding this comment.
The logical span check and zero-record early-out are correct. One question: when a span exceeds the logical size, is it clamped or rejected? If rejected, a title that intentionally over-reads (relying on the native clamp in #242) would regress.
|
@ruipedro-pinheiro It rejects the call before native recording when the span implied by the requested maximum exceeds the logical argument buffer. An out-of-range count word is also rejected. The native D3D12 contract validates the entire range implied by The current #242 code limits how many records it processes using the GPU count, and it still requests source backing for the maximum span. It cannot establish the size of the logical guest resource from that backing. A D3D12.X title that demonstrably accepts a smaller logical span would need a separate compatibility case backed by console behavior or an authorized trace. Safe support would have to bound both the clamp’s source reads and the native call. This PR keeps the entry-point check. Review · D3D12 contract · #242 AI-assisted using Codex. |
|
Merged upstream The GitHub workspace run hit the same gather and wave-32 permute test failures as upstream at |
…nce/pr1817-ccfb029
|
The gather and wave-32 permute failures on the workspace run are upstream's, not this PR's: the hardware-only shader checks ran on WARP on the GPU-less CI runner. Marvis fixed them in 42363ab ("Tests: hardware-only shader checks skip on a machine without a GPU"), which refuses a software default adapter and skips the permute test when only WARP is there. Rebase it in and those two failures disappear. The logical-span work itself is clean per your report; nothing else from my side. (Reply written with DeepSeek V4 Pro, OpenCode.) |
|
Reviewed the PR's own commits (b1b05ca and its follow-ups, above the merge of main). The fix is the right one at the right layer: the logical span of the last record is checked against the logical resource before any native shadow can widen the extent, which is exactly what the D3D12 contract validates. The checked arithmetic is everywhere ( One point to confirm, non-blocking:
The unit tests cover the span arithmetic for all five kinds, the stride/alignment refusals, and both overflow edges; the GPU-shadow test is properly gated behind a real device. The zero-record skip is a nice touch. Nothing blocking. (Review written with DeepSeek V4 Pro, OpenCode.) |
The 12-byte payload for kind 105 follows the existing upstream documentation in [list.rs]( VIctory/crates/victory-gpu/src/list.rs Lines 1281 to 1287 in 42363ab |
|
Automated triage for the maintainers. Merge candidate (a recommendation to look, not an approval). The new push ( The branch merges cleanly. CI: Generated by Claude Code |
|
The counted-call case is addressed at |
Melow-code
left a comment
There was a problem hiding this comment.
Re-checked at ca48abb. The counted case is capped to complete payloads, fixed counts are refused when they don't fit, and the last-record span (payload, no trailing padding) matches the clamp shader's reads. My earlier question is answered. LGTM — nits only: the diagnostics label says "max" while printing the capped limit, and range is unused on non-Windows builds without the diagnostics feature (#2890).
What changed
Validate the argument and count spans against the title resource before selecting a larger overlapping native shadow. For counted calls, cap the native maximum to the number of complete payloads that fit the logical argument buffer. The GPU count can still select fewer records at execution. Fixed-count calls retain their exact requested count and are refused when it cannot fit. The shadow refresh stops at the last payload. The clamp's 32-bit byte offsets and the four-byte count word are also checked.
This follows the native D3D12 rule for counted execution. It preserves records in a short logical argument buffer even if the title supplies a larger ceiling. ExecuteIndirect contract
Verification
Both controls passed on default hardware and WARP. They cover a generous maximum with a tight buffer, an out-of-range fixed count, exact-end count words, malformed strides, and two placed buffers sharing a larger backing shadow. The placed-buffer fixture checks selection and range calculation. Strict GPU diagnostics Clippy passed.
Thanks to raffclar for the final-record case from #40 and Melow-code for reviewing the logical span. #242's native count and ordering investigation remains separate. AI-assisted with OpenAI Codex.