Skip to content
  • Arcady Goldmints-Orlov's avatar
    nir/spirv/glsl450: increase asin(x) precision · b38d3cdc
    Arcady Goldmints-Orlov authored
    
    
    asin(x) is now implemented using a piecewise approximation, which
    improves the precision for |x| < 0.5
    Previously, we were using a polynomial approximation for both the
    asin() and acos() functions. Unfortunately, for asin(), this polynomial
    does not have enough precision to satisfy the Vulkan CTS requiremenents,
    which define the asin() precision based on the precision of
    atan2(x, sqrt(1.0 - x*x)). The piecewise approximation gives the needed
    precision in the problematic range.
    
    v2: Skip the piecewise approximation for acos
    
    Closes: #1843
    
    Acked-by: default avatarFrancisco Jerez <currojerez@riseup.net>
    Part-of: <mesa!3809>
    b38d3cdc