Skip to content
  • Timothy Arceri's avatar
    glsl: calculate number of operands in an expression once · e2e2c5ab
    Timothy Arceri authored
    
    
    Extra validation is added to ir_validate to make sure this is
    always updated to the correct numer of operands, as passes like
    lower_instructions modify the instructions directly rather then
    generating a new one.
    
    The reduction in time is so small that it is not really
    measurable. However callgrind was reporting this function as
    being called just under 34 million times while compiling the
    Deus Ex shaders (just pre-linking was profiled) with 0.20%
    spent in this function.
    
    v2:
     - make num_operands a unit8_t
     - fix unsigned/signed mismatches
    
    Reviewed-by: default avatarThomas Helland <thomashelland90@gmail.com>
    e2e2c5ab