fix: placed views of one texture share a shape whatever their padding words hold, and ownerless view entries are capped #382
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!382
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-382"
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?
@Skyfrye on GitHub · 2026-11-26 14:22 UTC · original
Skyfrye:nep/placed-view-shapes→main· +454 −11 · 4 files · 2 commits · closed without mergingChange
The title leaves some words of a placed view's two descriptions unwritten:
A placed view is named in its record by its shape (both descriptions without the address). So one view of one texture made a new shape each time it was written. The 4,194,304 shapes fill in about half an hour of play, and after that every placed view becomes a view-table entry that nothing frees.
TaynanGT/Vice-Tay found and fixed this (its PR #27). It measured 34.9 million such entries and 16.7 GB at 70 minutes. With the fix:
Our
descriptor.rshas the same code (SHAPES,shape_of,Views::shape,Views::entry).What this PR does:
placed_resource_wordszeroes words 1 and 13 of the resource description.placed_view_wordszeroes the view words the view's dimension does not use, from the D3D12 SRV and UAV layouts. Three things are always kept: an unknown dimension (whole), a view of a buffer that names a texture dimension (whole, since the host reads the buffer member of those), and words 10 to 15 (the address and the console's words).Views::ownerlesskeeps them oldest first. PastVICTORY_OWNERLESS_VIEWS(default 1,048,576; 0 keeps all), the oldest is freed under a new generation, so records naming it read stale, and the heap pass is told, as for a released resource.VICTORY_PLACED_FILLER=1(until now the texture key only) keeps the filler of both descriptions as the title left it, as before. WithVICTORY_VIEW_INLINE=0the cap defaults to 0 (all kept): in that mode every constant buffer view is such an entry, and that switch is there to give the old behaviour.Linked issue: none.
Verification
Windows 11 26300, Rust 1.98.1 (MSVC), on upstream
mainatb5a9d10(no file of this PR changed up to369bfa4), fromthird_party/victory:The failure is
spans_say_the_next_start_and_the_lowest_level_viewed, which fails the same way onmain.New tests:
placed_view_words_follow_the_d3d12_layout: checks the per-dimension tables against thewindowscrate's D3D12 structs (offset_of!and the last field's size).placed_views_of_one_texture_share_a_shape_whatever_their_filler: covers every SRV dimension 0-12 and UAV dimension 0-9, and flips every view word but the address. A padding word changes nothing (one shape); a used word makes another shape. For the resource description, words 1 and 13 give one shape and every other word two.ownerless_entries_are_capped.The shape test fails without the change, at its first check. One existing test,
views_at_new_addresses_add_no_entries, had non-zero filler words in its resource description; they are now 0.In the world, my copy of the game: one run of 600 s with screen captures every 15 s, Series X,
VICTORY_INDIRECT_RAW=3. This PR was stacked with #354 (VICTORY_TEXTURE_AUTO_MIP_CLAMP=auto), #381,VICTORY_STAGE_POOL_MB=2048, and the open #278, #279, #291, #292, #307 and #360-#362, onmainat8ed1109.main; the figures for that are Vice-Tay's.Oracle and test data
No game file. The counts come from my own run of my copy of the game.
Checklist
E_NOTIMPL), never a fake success. (Nothing unimplemented here.)f07e54a2,ce914907,d3626d25), after JMAN730/project-flamingob1e0cd1dand avatarmanz PR #206, GPL-3.0; credited in the commit and THIRD_PARTY.md.AI assistance:
🤖 Generated with Claude Code
github-bot referenced this pull request2026-11-26 18:56:44 +00:00
github-bot referenced this pull request2026-11-26 20:51:00 +00:00
Pull request closed