Shader forms: sizes of views nothing reads, ordered sections, wave sums off the beaten path, counters

- An image or structured buffer whose descriptor is read for its size
  alone (the puddle passes, a water simulation step).
- The record count of a structured buffer is asked of the raw view the
  host makes of it: as a structured view's it was in bytes on AMD.
- Primitive-ordered pixel shading becomes rasterizer ordered views (the
  hair cards' layers).
- A 16-bit wave sum where not every lane runs, on 64-lane waves, bit for
  bit as the console's tree.
- "Some lane is left" of a mask operation as a number; scalars parked in a
  VGPR used before; a one-channel store into a counter texture (the
  upscaler).
- translate --list prints a hash of every emitted module.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-24 22:02:52 -06:00
1 parent eb50022824
commit 5686c41b47
10 files changed
+941 -31

No files matched your search

@@ -63,6 +63,8 @@ pub const ALL: u32 = MODULE | FIRST;
pub(crate) struct Usage {
/// A wave or quad operation.
pub wave_ops: bool,
/// A rasterizer ordered view.
pub rovs: bool,
/// A 64-bit integer, as a result or an operand.
pub int64: bool,
/// A typed load of several components from a UAV.
@@ -388,7 +390,7 @@ impl Module {
}
/// An integer constant's width and value (the bits of that width).
fn int_k(&self, v: V) -> Option<(u32, u64)> {
pub(crate) fn int_k(&self, v: V) -> Option<(u32, u64)> {
let V::Const(i) = v else { return None };
let (ty, Const::Int(x)) = &self.consts[i as usize] else {
return None;
@@ -1009,6 +1011,8 @@ impl Module {
Some((_, 0)) => u.heap_views = true,
_ => u.heap_samplers = true,
}
} else if name == "annotateHandle" {
u.rovs |= annotation(V::Inst(i)).is_some_and(|(kind, _)| kind & 0x2000 != 0);
} else if name.starts_with("atomic") && name.ends_with(".i64") {
u.atomic64 = true;
} else if name.starts_with("textureLoad") || name.starts_with("bufferLoad") {