GPU: reject empty query heaps at creation #2907
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2909"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T23:44:40Z.
Summary
Reject zero-count query heaps before creating a guest object or returning a successful probe.
CreateQueryHeapnow returnsE_INVALIDARGfor a timestamp heap with no queries.Verification
E_INVALIDARGfor count zero and leaves the output slot untouched. Count one creates a heap. Microsoft documents the positive-count requirement in Queries.S_OKand creates a zero-count object, and returnsS_FALSEwith no output slot. The patch returnsE_INVALIDARGin both cases, leaves the output untouched, and still creates the one-query heap.Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T23:52:50Z.
Review: COMMENTED
Correct semantics — count=0 is invalid for a real query heap, and the check runs before the output pointer is written, which the test pins on both paths (probe with null out-pointer also gets E_INVALIDARG). LGTM.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T23:56:57Z.
Review: COMMENTED
Verified head
a414bb28cleanly onorigin/main(63bcca43) on Windows 11 x64.Code Review
desc.count == 0withE_INVALIDARGbefore allocating or touchingoutmatches D3D12CreateQueryHeapvalidation for both normal creation and null-out-pointer probes.Local Verification
cargo test --locked -p victory-gpu --lib query::tests: 4/4 passed (includingempty_query_heaps_are_rejected_at_creation).cargo clippy --locked -p victory-gpu --all-targets -- -D warnings&cargo xtask policy(191 files ok): clean.Looks clean and ready to merge.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T02:20:05Z.
Automated triage for the maintainers.
Needs work.
query.rscreatenow returnsE_INVALIDARGfor a query heap withcount == 0. Onmainthe query heap is a stub (Heap { object, desc }) with no host heap behind it, so a zero count harms nothing today, and the change only alters a return value. CIcheckpasses. To change the verdict: evidence that the title creates an empty query heap and depends on the error, or that the console runtime returns it (its compiler output, a hardware trace, or public documentation of the console API). Without that, it is a guard for a case the title does not reach.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-26T23:36:57Z.
Independent Windows verification of PR #2909 (GPU: reject empty query heaps at creation).
a414bb2, basemain, merge-base63bcca4. OPEN, MERGEABLE/CLEAN, non-draft, no formal approval, no prior comment from me.cargo test --locked, worktree-localCARGO_TARGET_DIR,CARGO_BUILD_JOBS=2(repo pins 1.98.1; no clippy/rustup). No game data, synthetic static vtable only, GPU/driver N/A.cargo test --locked -p victory-gpu --lib -- query::tests::empty_query_heaps_are_rejected_at_creation --exact --quiettest result: ok. 1 passed; 0 failed; 0 ignored; 232 filtered out.git diff --checkagainst merge-base63bcca4: clean (exit 0).origin/main(0 hits).Note: I am aware of the existing
triage: needs workverdict; this comment reports only the local CPU test result and does not contest that verdict. TheE_INVALIDARGbehaviour oncount == 0with a real title was not exercised.AI-assisted (Hy4 flash). No game assets, extracted shaders, keys or DRM content used or uploaded.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.