@ -2302,16 +2302,11 @@ void vrend_set_viewport_states(struct vrend_context *ctx,
ctx - > sub - > vps [ idx ] . near_val = near_val ;
ctx - > sub - > vps [ idx ] . near_val = near_val ;
ctx - > sub - > vps [ idx ] . far_val = far_val ;
ctx - > sub - > vps [ idx ] . far_val = far_val ;
if ( vrend_state . use_gles ) {
if ( idx & & has_feature ( feat_viewport_array ) )
if ( near_val < 0.0f | | far_val < 0.0f | |
if ( vrend_state . use_gles ) {
near_val > 1.0f | | far_val > 1.0f | | idx ) {
glDepthRangeIndexedfOES ( idx , ctx - > sub - > vps [ idx ] . near_val , ctx - > sub - > vps [ idx ] . far_val ) ;
report_gles_warn ( ctx , GLES_WARN_DEPTH_RANGE ) ;
} else
}
glDepthRangeIndexed ( idx , ctx - > sub - > vps [ idx ] . near_val , ctx - > sub - > vps [ idx ] . far_val ) ;
/* Best effort despite the warning, gles will clamp. */
glDepthRangef ( ctx - > sub - > vps [ idx ] . near_val , ctx - > sub - > vps [ idx ] . far_val ) ;
} else if ( idx & & has_feature ( feat_viewport_array ) )
glDepthRangeIndexed ( idx , ctx - > sub - > vps [ idx ] . near_val , ctx - > sub - > vps [ idx ] . far_val ) ;
else
else
glDepthRange ( ctx - > sub - > vps [ idx ] . near_val , ctx - > sub - > vps [ idx ] . far_val ) ;
glDepthRange ( ctx - > sub - > vps [ idx ] . near_val , ctx - > sub - > vps [ idx ] . far_val ) ;
}
}