VICTORY_POOL_SMALL=0: pooled textures at 64 KiB multiples (off); diagnostics: a pooled texture read past its piece is said
Ported from Belobug/VIctory-Belobug-AMD c278f0d. That fork places pooled textures of 64 KiB and less at 64 KiB multiples by default (4 KiB multiples only with VICTORY_POOL_SMALL=1): its two device losses with the pool on the night of 2026-11-25 faulted in 256x256 block-compressed textures with 7 levels placed at a 4 KiB multiple that is no 64 KiB one, whose descriptor base lay 0xa000 into the piece and whose first level ended 0x2000 past it, read by the card the moment the slot was made. Not proven to be the cause. Here the switch keeps its name and meaning, with our default: unset or 1, 4 KiB multiples where the host allows it, as before; VICTORY_POOL_SMALL=0, 64 KiB multiples (at most 60 KiB more card memory per small texture). Also an A/B switch in diag builds (VICTORY_AB). Diag builds with the address book say loudly when a pooled texture's first level lies past the end of its piece (`where_the_card_reads`, `book::address`), and where the first levels of the first 40 lie. The fork's test of a placed texture's reference to its heap is left out (a measurement of the host; the fork weakened it in 4cd2d13). Off by default: changes where pooled textures lie and how much card memory they take. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
13dca45ac6
commit
185bc4cc84
2 files changed
+112
-2
No files matched your search
@@ -242,6 +242,17 @@ fn viewable(format: i32) -> Option<i32> {
|
||||
})
|
||||
}
|
||||
|
||||
/// The address of `texture` as its descriptor has it (its first level's),
|
||||
/// if the book is kept.
|
||||
pub(crate) fn address(texture: &ID3D12Resource) -> Option<u64> {
|
||||
if !on() {
|
||||
return None;
|
||||
}
|
||||
// SAFETY: a live resource.
|
||||
let desc = unsafe { texture.GetDesc() };
|
||||
texture_address(texture, &desc)
|
||||
}
|
||||
|
||||
/// The address of a texture: the base its descriptor has.
|
||||
fn texture_address(texture: &ID3D12Resource, desc: &D3D12_RESOURCE_DESC) -> Option<u64> {
|
||||
struct Slot(ID3D12DescriptorHeap, usize);
|
||||
|
||||
Reference in new issue
Block a user