From: Axel Davy Date: Sun, 23 Sep 2018 14:18:55 +0000 (+0200) Subject: radeonsi: NaN should pass kill_if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d495bec25bd7584de4e988c2b4528c1996bc1d0;p=mesa.git radeonsi: NaN should pass kill_if Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105333 Fixes: https://github.com/iXit/Mesa-3D/issues/314 For this application, NaN is passed to KILL_IF and is expected to pass. v2: Explain in the code why UGE is used. Signed-off-by: Axel Davy Reviewed-by: Marek Olšák CC: --- diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c index f54d025aec0..a768b449047 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c @@ -60,7 +60,8 @@ static void kil_emit(const struct lp_build_tgsi_action *action, for (i = 0; i < TGSI_NUM_CHANNELS; i++) { LLVMValueRef value = lp_build_emit_fetch(bld_base, inst, 0, i); - conds[i] = LLVMBuildFCmp(builder, LLVMRealOGE, value, + /* UGE because NaN shouldn't get killed */ + conds[i] = LLVMBuildFCmp(builder, LLVMRealUGE, value, ctx->ac.f32_0, ""); }