Writes through views picked from the heap come back (VICTORY_PICKED_WRITES)

Off by default. A shader that stores through a view it picks by an index (37
compute programs of the title, 82a2ad6d07417d36 one of them) writes buffers
nobody declared. With a submission that has one, the buffers found written
that way are declared and landed as any; of the other buffers the heap shows
unordered views of 32 MB a frame are compared on the card, in turn, and one
that changed undeclared is found. Found late is not landed late.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-24 23:09:03 -06:00
1 parent c11b92e9ac
commit 424013a59c
8 files changed
+523 -11

No files matched your search

+20 -1
View File
@@ -126,6 +126,9 @@ pub(crate) struct Translated {
/// Whether the shader's code can store to buffer memory ([`stores`]);
/// true when its code is not known.
pub(crate) stores: bool,
/// Whether it stores through a view it picks from the heap by an index,
/// once asked (`crate::picked`).
pub(crate) picks: std::sync::atomic::AtomicU8,
}
#[cfg(windows)]
@@ -172,6 +175,17 @@ impl Shader {
}
}
#[cfg(windows)]
impl Shader {
/// The console programs of the container; `None` if they are not known.
pub(crate) fn programs(&self) -> Option<Vec<victory_shader::NativeProgram>> {
use victory_shader::{Container, FourCC};
let c = Container::parse(&self.container).ok()?;
let part = c.part(FourCC::DXIL).or(c.part(FourCC::ACCC))?;
victory_shader::native_programs(part.data).ok()
}
}
#[cfg(windows)]
fn translate(container: &[u8]) -> Result<Translated, String> {
use victory_shader::{Container, FourCC, HwStage};
@@ -194,7 +208,12 @@ fn translate(container: &[u8]) -> Result<Translated, String> {
})
.map(|p| p.used)
.unwrap_or_default();
Ok(Translated { host, used, stores })
Ok(Translated {
host,
used,
stores,
picks: Default::default(),
})
}
/// The compute pipelines of the console's ray-tracing structure builder