[pr-tests] descriptor slots: a test of the plain scan, the allocator that runs outside tests #417
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!417
Loading…
Reference in a new issue
No description provided.
Delete branch "iboom72/tests/plain-slots-test"
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?
What it changes
plain()(crates/darner-gpu/src/descriptor/slots.rs:38) returnsfalseundercfg!(test).So every unit test in
slots.rsruns the opt-in bitmap allocator (DARNER_SLOTS_BITMAP=1), and none reachesplain_allocorplain_release, which are what runs by default.The new test puts the plain scan against the file's own reference allocator: the same slots, free count, cursor and occupancy over 4,000 random steps at six sizes (1, 2, 63, 64, 65, 300), with releases of free slots and of ranges past the end. Test only.
One difference it found and does not change: a release that frees nothing resets
too_longin the plain scan, while the bitmap path and the reference keep it (noop_releases_preserve_too_long_watermark). That only costs the next long request its search; the slots given are the same. The test does not comparetoo_longfor that reason.How it was tested
9caee9d6cargo clippy -p darner-gpu --all-targets --locked -- -D warnings: clean.cargo test -p darner-gpu --lib --locked descriptor::slots: 5 passed, 0 failed, 1 ignored; the new testplain_scan_matches_the_referenceis among them (21.9 s for the five).darner-gpuwith all targets, and the unit tests named above. Not run: clippy over the whole workspace, clippy with--all-features,cargo test --workspace.release_batchon the plain path is not exercised.Checklist
main.docs/asset-policy.md.Checked for overlap
descriptor/slots.rs).plain_allocorDARNER_SLOTS_BITMAP.🤖 Generated with Claude Code