@@ -367,14 +367,20 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> {
367
367
SpirvType :: Float ( inst. operands [ 0 ] . unwrap_literal_bit32 ( ) ) . def ( self . span ( ) , self )
368
368
}
369
369
Op :: TypeStruct => {
370
- self . err ( "OpTypeStruct in asm! is not supported yet " ) ;
370
+ self . err ( "` OpTypeStruct` in asm! is not supported" ) ;
371
371
return ;
372
372
}
373
- Op :: TypeVector => SpirvType :: Vector {
374
- element : inst. operands [ 0 ] . unwrap_id_ref ( ) ,
375
- count : inst. operands [ 1 ] . unwrap_literal_bit32 ( ) ,
373
+ Op :: TypeVector => {
374
+ self . struct_err (
375
+ "`OpTypeVector` in asm! is not supported, since `#[spirv(vector)]` structs can \
376
+ create different vector types due to varying size and alignment",
377
+ )
378
+ . with_note (
379
+ "pass `glam::VecN` as parameters and use `typeof{foo}` or `typeof*{foo}` (pointer to type) to resolve vector type" ,
380
+ )
381
+ . emit ( ) ;
382
+ return ;
376
383
}
377
- . def ( self . span ( ) , self ) ,
378
384
Op :: TypeMatrix => SpirvType :: Matrix {
379
385
element : inst. operands [ 0 ] . unwrap_id_ref ( ) ,
380
386
count : inst. operands [ 1 ] . unwrap_literal_bit32 ( ) ,
@@ -762,12 +768,6 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> {
762
768
}
763
769
. def ( DUMMY_SP , cx) ,
764
770
765
- TyPat :: Vector4 ( pat) => SpirvType :: Vector {
766
- element : subst_ty_pat ( cx, pat, ty_vars, leftover_operands) ?,
767
- count : 4 ,
768
- }
769
- . def ( DUMMY_SP , cx) ,
770
-
771
771
TyPat :: SampledImage ( pat) => SpirvType :: SampledImage {
772
772
image_type : subst_ty_pat ( cx, pat, ty_vars, leftover_operands) ?,
773
773
}
0 commit comments