Merge upstream main (8e79c80) into shader/per-lane-phi

main now has CI (clippy with -D warnings, then the workspace's tests) and
three new tests that call `resource::track`, which this branch gives a
fourth argument. No textual conflict, but the test target did not build:
those three calls (emit/lower.rs, twice in emit/mod.rs) now structure the
program first and pass it, as this branch's other callers do. Both of
CI's clippy commands are clean on the result.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
r4.andClaude Fable 5.2 committed 2026-11-24 11:10:23 +02:00
commit e09dbb6dae
28 files changed
+1308 -143

No files matched your search

+8
View File
@@ -16,6 +16,7 @@ pub const ROOT_CBV_SPACE: u32 = 1;
/// `ShaderFlags` bits (metadata) and their `SFI0` feature bits.
pub(crate) mod flags {
pub const RAW_BUFFERS: u64 = 1 << 4;
pub const STENCIL_REF: u64 = 1 << 11;
pub const TYPED_UAV_LOADS: u64 = 1 << 13;
pub const WAVE_OPS: u64 = 1 << 19;
pub const INT64: u64 = 1 << 20;
@@ -483,6 +484,10 @@ impl Shader {
} else {
None
};
// A pixel shader with an SV_StencilRef output (as DXC collects it).
if self.pixel && self.outputs.iter().any(|o| o.kind == 20) {
self.flags |= flags::STENCIL_REF;
}
// Entry properties: shader flags (tag 0), thread-group size (4),
// wave size (11).
let mut props = Vec::new();
@@ -561,6 +566,9 @@ impl Shader {
dxil.extend(&bitcode);
let mut features = 0u64;
if self.flags & flags::STENCIL_REF != 0 {
features |= 0x200;
}
if self.flags & flags::TYPED_UAV_LOADS != 0 {
features |= 0x800;
}