File tree Expand file tree Collapse file tree
crates/rustc_codegen_spirv/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,17 +193,20 @@ impl SpirvValue {
193193 original_ptr_ty,
194194 bitcast_result_id,
195195 } => {
196- cx. zombie_with_span (
197- bitcast_result_id,
198- span,
199- & format ! (
200- "cannot cast between pointer types\
201- \n from `{}`\
202- \n to `{}`",
203- cx. debug_type( original_ptr_ty) ,
204- cx. debug_type( self . ty)
205- ) ,
206- ) ;
196+ // If physical poitners are supported, defer the error until after storage class inferrence.
197+ if !cx. builder . has_capability ( Capability :: PhysicalStorageBufferAddresses ) {
198+ cx. zombie_with_span (
199+ bitcast_result_id,
200+ span,
201+ & format ! (
202+ "cannot cast between pointer types\
203+ \n from `{}`\
204+ \n to `{}`",
205+ cx. debug_type( original_ptr_ty) ,
206+ cx. debug_type( self . ty)
207+ ) ,
208+ ) ;
209+ }
207210
208211 bitcast_result_id
209212 }
You can’t perform that action at this time.
0 commit comments