Skip to content
  • Matthew McClure's avatar
    llvmpipe: clamp fragment shader depth write to the current viewport depth range. · 0319ea9f
    Matthew McClure authored and Jose Fonseca's avatar Jose Fonseca committed
    
    
    With this patch, generate_fs_loop will clamp any fragment shader depth writes
    to the viewport's min and max depth values. Viewport selection is determined
    by the geometry shader output for the viewport array index. If no index is
    specified, then the default viewport index is zero. Semantics for this path
    can be found in draw_clamp_viewport_idx and lp_clamp_viewport_idx.
    
    lp_jit_viewport was created to store viewport information visible to JIT code,
    and is validated when the LP_NEW_VIEWPORT dirty flag is set.
    
    lp_rast_shader_inputs is responsible for passing the viewport_index through
    the rasterizer stage to fragment stage (via lp_jit_thread_data).
    
    Reviewed-by: default avatarRoland Scheidegger <sroland@vmware.com>
    Reviewed-by: default avatarJosé Fonseca <jfonseca@vmware.com>
    0319ea9f