Skip to content
  • Brian Ho's avatar
    anv: Properly fetch partial results in vkGetQueryPoolResults · af92ce50
    Brian Ho authored
    
    
    Currently, fetching the partial results (VK_QUERY_RESULT_PARTIAL_BIT)
    of an unavailable occlusion query via vkGetQueryPoolResults can
    return invalid values. anv returns slot.end - slot.begin, but in the
    case of unavailable queries, slot.end is still at the initial value
    of 0. If slot.begin is non-zero, the occlusion count underflows to
    a value that is likely outside the acceptable range of the partial
    result.
    
    This commit fixes vkGetQueryPoolResults by always returning 0 if the
    query is unavailable and the VK_QUERY_RESULT_PARTIAL_BIT is set.
    
    Cc: <mesa-stable@lists.freedesktop.org>
    Reviewed-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
    Part-of: <mesa/mesa!3586>
    af92ce50