@@ -425,7 +425,6 @@ pub struct BuilderSpirv<'tcx> {
425
425
debug_file_cache : RefCell < FxHashMap < DebugFileKey , DebugFileSpirv < ' tcx > > > ,
426
426
427
427
enabled_capabilities : FxHashSet < Capability > ,
428
- enabled_extensions : FxHashSet < Symbol > ,
429
428
}
430
429
431
430
impl < ' tcx > BuilderSpirv < ' tcx > {
@@ -443,7 +442,6 @@ impl<'tcx> BuilderSpirv<'tcx> {
443
442
builder. module_mut ( ) . header . as_mut ( ) . unwrap ( ) . generator = 0x001B_0000 ;
444
443
445
444
let mut enabled_capabilities = FxHashSet :: default ( ) ;
446
- let mut enabled_extensions = FxHashSet :: default ( ) ;
447
445
448
446
fn add_cap (
449
447
builder : & mut Builder ,
@@ -455,11 +453,10 @@ impl<'tcx> BuilderSpirv<'tcx> {
455
453
builder. capability ( cap) ;
456
454
enabled_capabilities. insert ( cap) ;
457
455
}
458
- fn add_ext ( builder : & mut Builder , enabled_extensions : & mut FxHashSet < Symbol > , ext : Symbol ) {
456
+ fn add_ext ( builder : & mut Builder , ext : Symbol ) {
459
457
// This should be the only callsite of Builder::extension (aside from tests), to make
460
458
// sure the hashset stays in sync.
461
459
builder. extension ( ext. as_str ( ) ) ;
462
- enabled_extensions. insert ( ext) ;
463
460
}
464
461
465
462
for feature in features {
@@ -468,19 +465,15 @@ impl<'tcx> BuilderSpirv<'tcx> {
468
465
add_cap ( & mut builder, & mut enabled_capabilities, cap) ;
469
466
}
470
467
TargetFeature :: Extension ( ext) => {
471
- add_ext ( & mut builder, & mut enabled_extensions , ext) ;
468
+ add_ext ( & mut builder, ext) ;
472
469
}
473
470
}
474
471
}
475
472
476
473
add_cap ( & mut builder, & mut enabled_capabilities, Capability :: Shader ) ;
477
474
if memory_model == MemoryModel :: Vulkan {
478
475
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 ) ;
484
477
}
485
478
add_cap (
486
479
& mut builder,
@@ -502,7 +495,6 @@ impl<'tcx> BuilderSpirv<'tcx> {
502
495
id_to_const : Default :: default ( ) ,
503
496
debug_file_cache : Default :: default ( ) ,
504
497
enabled_capabilities,
505
- enabled_extensions,
506
498
}
507
499
}
508
500
@@ -541,10 +533,6 @@ impl<'tcx> BuilderSpirv<'tcx> {
541
533
self . enabled_capabilities . contains ( & capability)
542
534
}
543
535
544
- pub fn has_extension ( & self , extension : Symbol ) -> bool {
545
- self . enabled_extensions . contains ( & extension)
546
- }
547
-
548
536
pub fn select_function_by_id ( & self , id : Word ) -> BuilderCursor {
549
537
let mut builder = self . builder . borrow_mut ( ) ;
550
538
for ( index, func) in builder. module_ref ( ) . functions . iter ( ) . enumerate ( ) {
0 commit comments