rt test: the reflection guard's subjects hold their descriptors boxed, as clippy's large_enum_variant asks

Job m3-max-80136: clippy under m2v_cpu_icd and m2v_gpu flagged the Subject enum's variants'
size difference. Verified: cargo fmt; clippy follows as a job.
This commit is contained in:
Anees Iqbal committed 2026-12-02 14:24:14 -08:00
1 parent 480d162ce8
commit aea3a53ea1
1 file changed
+18 -11
@@ -36,9 +36,9 @@ mod on_device {
/// A pipeline the test makes.
enum Subject {
Compute(&'static str, ComputePipelineDescriptor),
Render(&'static str, RenderPipelineDescriptor),
Tile(&'static str, TileRenderPipelineDescriptor),
Compute(&'static str, Box<ComputePipelineDescriptor>),
Render(&'static str, Box<RenderPipelineDescriptor>),
Tile(&'static str, Box<TileRenderPipelineDescriptor>),
}
/// The library of `bitcode`'s assembly, or None where `llvm-as` is missing.
@@ -65,8 +65,10 @@ mod on_device {
}
/// The kernel `entry` of `library`.
fn kernel(library: &Library, entry: &str) -> ComputePipelineDescriptor {
ComputePipelineDescriptor::new(StageSource::Function(function(library, entry)))
fn kernel(library: &Library, entry: &str) -> Box<ComputePipelineDescriptor> {
Box::new(ComputePipelineDescriptor::new(StageSource::Function(
function(library, entry),
)))
}
/// Every subject, or None where `llvm-as` is missing.
@@ -98,7 +100,9 @@ mod on_device {
folded.specialized = true;
all.push(Subject::Compute(
"fold_config specialized",
ComputePipelineDescriptor::new(StageSource::Function(folded)),
Box::new(ComputePipelineDescriptor::new(StageSource::Function(
folded,
))),
));
let examples = examples()?;
let one = render_descriptor(&examples, "colored_fragment", PixelFormat::RGBA8Unorm);
@@ -113,10 +117,13 @@ mod on_device {
fragment.specialized = true;
let mut specialized = one.clone();
specialized.fragment = Some(StageSource::Function(fragment));
all.push(Subject::Render("colored, one attachment", one));
all.push(Subject::Render("colored, two attachments", two));
all.push(Subject::Render("colored, indirect", indirect));
all.push(Subject::Render("absent_read specialized", specialized));
all.push(Subject::Render("colored, one attachment", Box::new(one)));
all.push(Subject::Render("colored, two attachments", Box::new(two)));
all.push(Subject::Render("colored, indirect", Box::new(indirect)));
all.push(Subject::Render(
"absent_read specialized",
Box::new(specialized),
));
let mut tile = TileRenderPipelineDescriptor::new(StageSource::Function(function(
&engine("k10ts_tile_grid")?,
"k10ts_tile_grid",
@@ -130,7 +137,7 @@ mod on_device {
*slot = Some(format);
}
tile.threadgroup_size_matches_tile_size = true;
all.push(Subject::Tile("k10ts_tile_grid", tile));
all.push(Subject::Tile("k10ts_tile_grid", Box::new(tile)));
Some(all)
}