File tree 1 file changed +14
-11
lines changed
crates/rustc_codegen_spirv/src
1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -193,17 +193,20 @@ impl SpirvValue {
193
193
original_ptr_ty,
194
194
bitcast_result_id,
195
195
} => {
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
+ }
207
210
208
211
bitcast_result_id
209
212
}
You can’t perform that action at this time.
0 commit comments