Skip to content
  • Roland Scheidegger's avatar
    llvmpipe: fix issues with depth clamp · 08496218
    Roland Scheidegger authored
    
    
    We only did depth clamp when the value was written from the fs.
    This is very wrong both for d3d10 and GL, and only passed the
    corresponding piglit test due to pure luck (it no longer does
    with the enhanced test).
    Also, interpolation clamped values to 1.0 always, which can legitimately
    happen if depth clip is disabled, so fix that as well (untested).
    There is one unresolved issue left, d3d10 always does depth clamping,
    whereas GL does not (but does [0,1] clamp instead for fs depth outputs)
    - this information isn't in any gallium state object, leave it as-is
    for now (though it looks like llvmpipe misses the [0,1] clamp as well).
    This (with the previous patch) fixes piglit depth-clamp-range test.
    
    Reviewed-by: default avatarJose Fonseca <jfonseca@vmware.com>
    08496218