@@ -425,7 +425,6 @@ pub struct BuilderSpirv<'tcx> {
425425 debug_file_cache : RefCell < FxHashMap < DebugFileKey , DebugFileSpirv < ' tcx > > > ,
426426
427427 enabled_capabilities : FxHashSet < Capability > ,
428- enabled_extensions : FxHashSet < Symbol > ,
429428}
430429
431430impl < ' tcx > BuilderSpirv < ' tcx > {
@@ -443,7 +442,6 @@ impl<'tcx> BuilderSpirv<'tcx> {
443442 builder. module_mut ( ) . header . as_mut ( ) . unwrap ( ) . generator = 0x001B_0000 ;
444443
445444 let mut enabled_capabilities = FxHashSet :: default ( ) ;
446- let mut enabled_extensions = FxHashSet :: default ( ) ;
447445
448446 fn add_cap (
449447 builder : & mut Builder ,
@@ -455,11 +453,10 @@ impl<'tcx> BuilderSpirv<'tcx> {
455453 builder. capability ( cap) ;
456454 enabled_capabilities. insert ( cap) ;
457455 }
458- fn add_ext ( builder : & mut Builder , enabled_extensions : & mut FxHashSet < Symbol > , ext : Symbol ) {
456+ fn add_ext ( builder : & mut Builder , ext : Symbol ) {
459457 // This should be the only callsite of Builder::extension (aside from tests), to make
460458 // sure the hashset stays in sync.
461459 builder. extension ( ext. as_str ( ) ) ;
462- enabled_extensions. insert ( ext) ;
463460 }
464461
465462 for feature in features {
@@ -468,19 +465,15 @@ impl<'tcx> BuilderSpirv<'tcx> {
468465 add_cap ( & mut builder, & mut enabled_capabilities, cap) ;
469466 }
470467 TargetFeature :: Extension ( ext) => {
471- add_ext ( & mut builder, & mut enabled_extensions , ext) ;
468+ add_ext ( & mut builder, ext) ;
472469 }
473470 }
474471 }
475472
476473 add_cap ( & mut builder, & mut enabled_capabilities, Capability :: Shader ) ;
477474 if memory_model == MemoryModel :: Vulkan {
478475 if version < ( 1 , 5 ) {
479- add_ext (
480- & mut builder,
481- & mut enabled_extensions,
482- sym. spv_khr_vulkan_memory_model ,
483- ) ;
476+ add_ext ( & mut builder, sym. spv_khr_vulkan_memory_model ) ;
484477 }
485478 add_cap (
486479 & mut builder,
@@ -502,7 +495,6 @@ impl<'tcx> BuilderSpirv<'tcx> {
502495 id_to_const : Default :: default ( ) ,
503496 debug_file_cache : Default :: default ( ) ,
504497 enabled_capabilities,
505- enabled_extensions,
506498 }
507499 }
508500
@@ -541,10 +533,6 @@ impl<'tcx> BuilderSpirv<'tcx> {
541533 self . enabled_capabilities . contains ( & capability)
542534 }
543535
544- pub fn has_extension ( & self , extension : Symbol ) -> bool {
545- self . enabled_extensions . contains ( & extension)
546- }
547-
548536 pub fn select_function_by_id ( & self , id : Word ) -> BuilderCursor {
549537 let mut builder = self . builder . borrow_mut ( ) ;
550538 for ( index, func) in builder. module_ref ( ) . functions . iter ( ) . enumerate ( ) {
0 commit comments