rt draw test: read the one-sample words as 4-byte chunks

Clippy (manual_chunks_exact... as_chunks) refused chunks_exact(4) in
every_device_draws_the_sample_count_of_its_state under --cfg m2v_gpu and
--cfg m2v_cpu_icd (check 49876). The words are read as as_chunks::<4>().
This commit is contained in:
Anees Iqbal committed 2026-11-18 21:05:54 -08:00
1 parent 9332ab4239
commit ac1896537f
1 file changed
+3 -2
+3 -2
View File
@@ -2404,8 +2404,9 @@ define internal void @_GLOBAL__sub_I_() section "air.static_init" {
draw(encoder.draw_primitives(PrimitiveType::Triangle, 0, 3, 1, 0));
encoder.end_encoding();
run(name, &command_buffer);
let words: Vec<u32> = (read(&flat, 4).chunks_exact(4))
.map(|word| u32::from_le_bytes([word[0], word[1], word[2], word[3]]))
let bytes = read(&flat, 4);
let words: Vec<u32> = (bytes.as_chunks::<4>().0.iter())
.map(|&word| u32::from_le_bytes(word))
.collect();
assert_eq!(words, [1; (SIDE * SIDE) as usize], "{name}: one sample");