• Timothy Arceri's avatar
    nir: fix condition propagation when src has a swizzle · 769ae9fb
    Timothy Arceri authored
    We cannot use nir_build_alu() to create the new alu as it has no
    way to know how many components of the src we will use. This
    results in it guessing the max number of components from one of
    its inputs.
    
    Fixes the following CTS tests:
    
    dEQP-VK.spirv_assembly.instruction.graphics.selection_block_order.out_of_order_frag
    dEQP-VK.spirv_assembly.instruction.graphics.selection_block_order.out_of_order_geom
    dEQP-VK.spirv_assembly.instruction.graphics.selection_block_order.out_of_order_tessc
    dEQP-VK.spirv_assembly.instruction.graphics.selection_block_order.out_of_order_vert
    
    Fixes: 2975422c ("nir: propagates if condition evaluation down some alu chains")
    Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
    769ae9fb
nir_opt_if.c 20 KB