@@ -80,6 +80,7 @@ pub enum SpirvType {
8080 SampledImage {
8181 image_type : Word ,
8282 } ,
83+ AccelerationStructureKhr ,
8384}
8485
8586impl SpirvType {
@@ -247,6 +248,7 @@ impl SpirvType {
247248 access_qualifier,
248249 ) ,
249250 Self :: Sampler => cx. emit_global ( ) . type_sampler ( ) ,
251+ Self :: AccelerationStructureKhr => cx. emit_global ( ) . type_acceleration_structure_khr ( ) ,
250252 Self :: SampledImage { image_type } => cx. emit_global ( ) . type_sampled_image ( image_type) ,
251253 } ;
252254 cx. type_cache . def ( result, self ) ;
@@ -320,7 +322,8 @@ impl SpirvType {
320322 Self :: Void
321323 | Self :: Opaque { .. }
322324 | Self :: RuntimeArray { .. }
323- | Self :: Function { .. } => return None ,
325+ | Self :: Function { .. }
326+ | Self :: AccelerationStructureKhr => return None ,
324327
325328 Self :: Bool => Size :: from_bytes ( 1 ) ,
326329 Self :: Integer ( width, _) | Self :: Float ( width) => Size :: from_bits ( width) ,
@@ -340,9 +343,10 @@ impl SpirvType {
340343 pub fn alignof < ' tcx > ( & self , cx : & CodegenCx < ' tcx > ) -> Align {
341344 match * self {
342345 // Types that have no concept of size or alignment.
343- Self :: Void | Self :: Opaque { .. } | Self :: Function { .. } => {
344- Align :: from_bytes ( 0 ) . unwrap ( )
345- }
346+ Self :: Void
347+ | Self :: Opaque { .. }
348+ | Self :: Function { .. }
349+ | Self :: AccelerationStructureKhr => Align :: from_bytes ( 0 ) . unwrap ( ) ,
346350
347351 Self :: Bool => Align :: from_bytes ( 1 ) . unwrap ( ) ,
348352 Self :: Integer ( width, _) | Self :: Float ( width) => Align :: from_bits ( width as u64 ) . unwrap ( ) ,
@@ -499,6 +503,9 @@ impl fmt::Debug for SpirvTypePrinter<'_, '_> {
499503 . field ( "id" , & self . id )
500504 . field ( "image_type" , & self . cx . debug_type ( image_type) )
501505 . finish ( ) ,
506+ SpirvType :: AccelerationStructureKhr => {
507+ f. debug_struct ( "AccelerationStructureKhr" ) . finish ( )
508+ }
502509 } ;
503510 {
504511 let mut debug_stack = DEBUG_STACK . lock ( ) . unwrap ( ) ;
@@ -654,6 +661,7 @@ impl SpirvTypePrinter<'_, '_> {
654661 . debug_struct ( "SampledImage" )
655662 . field ( "image_type" , & self . cx . debug_type ( image_type) )
656663 . finish ( ) ,
664+ SpirvType :: AccelerationStructureKhr => f. write_str ( "AccelerationStructureKhr" ) ,
657665 }
658666 }
659667}
0 commit comments