Query resolves: never write results the host refused #1745

Closed
kais7654 wants to merge 2 commits from upstream-pr/1746 into main
kais7654 commented 2026-11-24 21:53:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kais7654 on 2026-11-24T21:53:59Z.


Stacked on #1731 (base branch is that PR's head, since this fixes it).

resolve_queries took the measured path without checking whether the
resolve's range fits the heap. A range ResolveQueryData refuses (past
the heap's count, or count == 0) leaves the read-back buffer untouched
with undefined contents, and those garbage u64s still went into the
title's memory — worse than the stubs' plausible values. The measured
path now also asks range_fits (first + count against the heap's
count), and a refused range keeps the stub path.

A failing Map of a read-back buffer also logs now, like the other
deferred failures, instead of dropping the results in silence.

Verified: cargo check, cargo clippy and cargo test -p victory-gpu
(51 passed, including #1731's occlusion test). The full workspace test
suite could not finish here for lack of disk space; nothing outside
victory-gpu is touched.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6592165047 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1746). Originally posted by [kais7654](https://github.com/kais7654) on 2026-11-24T21:53:59Z. --- Stacked on #1731 (base branch is that PR's head, since this fixes it). `resolve_queries` took the measured path without checking whether the resolve's range fits the heap. A range `ResolveQueryData` refuses (past the heap's count, or count == 0) leaves the read-back buffer untouched with undefined contents, and those garbage u64s still went into the title's memory — worse than the stubs' plausible values. The measured path now also asks `range_fits` (first + count against the heap's count), and a refused range keeps the stub path. A failing `Map` of a read-back buffer also logs now, like the other deferred failures, instead of dropping the results in silence. Verified: `cargo check`, `cargo clippy` and `cargo test -p victory-gpu` (51 passed, including #1731's occlusion test). The full workspace test suite could not finish here for lack of disk space; nothing outside `victory-gpu` is touched.
upstream-sync closed this pull request 2026-11-24 22:02:14 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1745
No description provided.