mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
ac/llvm: accept primitives whose face culling determinant is Inf or NaN
Based on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13299/diffs Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13380>
This commit is contained in:
parent
efaab0ec50
commit
5ee2965283
1 changed files with 8 additions and 0 deletions
|
|
@ -109,6 +109,14 @@ static LLVMValueRef ac_cull_face(struct ac_llvm_context *ctx, LLVMValueRef pos[3
|
|||
} else if (cull_zero_area) {
|
||||
accepted = LLVMBuildFCmp(builder, LLVMRealONE, det, ctx->f32_0, "");
|
||||
}
|
||||
|
||||
if (accepted) {
|
||||
/* Don't reject NaN and +/-infinity, these are tricky.
|
||||
* Just trust fixed-function HW to handle these cases correctly.
|
||||
*/
|
||||
accepted = LLVMBuildOr(builder, accepted, ac_build_is_inf_or_nan(ctx, det), "");
|
||||
}
|
||||
|
||||
return accepted;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue