File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
crates/rustc_codegen_spirv/src Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,15 @@ pub(crate) fn provide(providers: &mut Providers) {
6969 // <https://github.com/rust-lang/rust/commit/eaaa03faf77b157907894a4207d8378ecaec7b45>
7070 arg. make_direct_deprecated ( ) ;
7171
72+ // FIXME(eddyb) detect `#[rust_gpu::vector::v1]` more specifically,
73+ // to avoid affecting anything should actually be passed as a pair.
74+ if let PassMode :: Pair ( ..) = arg. mode {
75+ // HACK(eddyb) this avoids breaking e.g. `&[T]` pairs.
76+ if let TyKind :: Adt ( ..) = arg. layout . ty . kind ( ) {
77+ arg. mode = PassMode :: Direct ( ArgAttributes :: new ( ) ) ;
78+ }
79+ }
80+
7281 // Avoid pointlessly passing ZSTs, just like the official Rust ABI.
7382 if arg. layout . is_zst ( ) {
7483 arg. mode = PassMode :: Ignore ;
You can’t perform that action at this time.
0 commit comments