Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Commit 44ae441

Browse files
khyperiaeddyb
authored andcommitted
Revert no-longer-needed OpTypeArray support
1 parent f9c7829 commit 44ae441

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

crates/rustc_codegen_spirv/src/builder/spirv_asm.rs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::Builder;
2-
use crate::builder_spirv::{BuilderCursor, SpirvValue, SpirvValueExt};
2+
use crate::builder_spirv::{BuilderCursor, SpirvValue};
33
use crate::codegen_cx::CodegenCx;
44
use crate::spirv_type::SpirvType;
55
use rspirv::dr;
@@ -304,26 +304,8 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> {
304304
}
305305
.def(self.span(), self),
306306
Op::TypeArray => {
307-
let count = inst.operands[1].unwrap_id_ref();
308-
let get_count_ty = || -> Option<Word> {
309-
let emit = self.emit();
310-
let func = &emit.module_ref().functions[emit.selected_function()?];
311-
let insts = &func.blocks[emit.selected_block()?].instructions;
312-
let inst = insts.iter().find(|i| i.result_id == Some(count))?;
313-
inst.result_type
314-
};
315-
let count_ty = match get_count_ty() {
316-
Some(ty) => ty,
317-
None => {
318-
self.err("Unable to find constant for OpTypeArray count");
319-
return;
320-
}
321-
};
322-
SpirvType::Array {
323-
element: inst.operands[0].unwrap_id_ref(),
324-
count: count.with_type(count_ty),
325-
}
326-
.def(self.span(), self)
307+
self.err("OpTypeArray in asm! is not supported yet");
308+
return;
327309
}
328310
Op::TypeRuntimeArray => SpirvType::RuntimeArray {
329311
element: inst.operands[0].unwrap_id_ref(),

0 commit comments

Comments
 (0)