@@ -450,10 +450,9 @@ impl Builder<'_, '_> {
450450 let lower_bits = self . emit ( ) . bit_reverse ( u32, None , higher) . unwrap ( ) ;
451451
452452 let higher_bits = self . emit ( ) . u_convert ( uint, None , higher_bits) . unwrap ( ) ;
453- let shift = self . constant_u32 ( self . span ( ) , 32 ) . def ( self ) ;
454453 let higher_bits = self
455454 . emit ( )
456- . shift_left_logical ( uint, None , higher_bits, shift )
455+ . shift_left_logical ( uint, None , higher_bits, u32_32 )
457456 . unwrap ( ) ;
458457 let lower_bits = self . emit ( ) . u_convert ( uint, None , lower_bits) . unwrap ( ) ;
459458
@@ -501,7 +500,7 @@ impl Builder<'_, '_> {
501500 . unwrap ( )
502501 } else {
503502 // rust is always unsigned, so FindUMsb
504- let bla = self
503+ let msb_bit = self
505504 . emit ( )
506505 . ext_inst ( u32, None , glsl, GLOp :: FindUMsb as u32 , [ Operand :: IdRef (
507506 arg,
@@ -510,7 +509,7 @@ impl Builder<'_, '_> {
510509 // the glsl op returns the Msb bit, not the amount of leading zeros of this u32
511510 // leading zeros = 31 - Msb bit
512511 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 ( )
514513 }
515514 } ;
516515
0 commit comments