Skip to content
  • Iago Toral's avatar
    v3dv: add a heuristic for double-buffer mode · ad1961a4
    Iago Toral authored and Marge Bot's avatar Marge Bot committed
    
    
    For this we add a scoring system that evaluates various aspects of
    the draw calls in a job.
    
    If the cost of the geometry side of the pipeline is too high, then
    we may pay too high a price in double-buffer mode because with smaller
    tile size may will probably have more vertex shader invocations in the
    render and binning stages.
    
    On the other hand, if rendering cost is not high enough, we may not
    have enough rendering work to hide the latency of tile stores in
    double-buffer mode.
    
    Also, because we need to make a decision after we know all the draw
    calls in a job, but the double-buffer enable bit comes in the
    TILE_BINNING_MODE_CFG that needs to be emitted first in the binning
    command list before the draw calls are recorded, if we decide to
    enable it we need to rewrite that packet and we need to size the
    tile state properly to account for the extra tiles. For this
    purpose we delay tile state setup for render pass jobs until we are
    finishing a job.
    
    Reviewed-by: default avatarAlejandro Piñeiro <apinheiro@igalia.com>
    Part-of: <mesa/mesa!17854>
    ad1961a4