@@ -450,10 +450,9 @@ impl Builder<'_, '_> {
450
450
let lower_bits = self . emit ( ) . bit_reverse ( u32, None , higher) . unwrap ( ) ;
451
451
452
452
let higher_bits = self . emit ( ) . u_convert ( uint, None , higher_bits) . unwrap ( ) ;
453
- let shift = self . constant_u32 ( self . span ( ) , 32 ) . def ( self ) ;
454
453
let higher_bits = self
455
454
. emit ( )
456
- . shift_left_logical ( uint, None , higher_bits, shift )
455
+ . shift_left_logical ( uint, None , higher_bits, u32_32 )
457
456
. unwrap ( ) ;
458
457
let lower_bits = self . emit ( ) . u_convert ( uint, None , lower_bits) . unwrap ( ) ;
459
458
@@ -501,7 +500,7 @@ impl Builder<'_, '_> {
501
500
. unwrap ( )
502
501
} else {
503
502
// rust is always unsigned, so FindUMsb
504
- let bla = self
503
+ let msb_bit = self
505
504
. emit ( )
506
505
. ext_inst ( u32, None , glsl, GLOp :: FindUMsb as u32 , [ Operand :: IdRef (
507
506
arg,
@@ -510,7 +509,7 @@ impl Builder<'_, '_> {
510
509
// the glsl op returns the Msb bit, not the amount of leading zeros of this u32
511
510
// leading zeros = 31 - Msb bit
512
511
let u32_31 = self . constant_u32 ( self . span ( ) , 31 ) . def ( self ) ;
513
- self . emit ( ) . i_sub ( u32, None , u32_31, bla ) . unwrap ( )
512
+ self . emit ( ) . i_sub ( u32, None , u32_31, msb_bit ) . unwrap ( )
514
513
}
515
514
} ;
516
515
0 commit comments