From: Tom Stellard Date: Wed, 17 Oct 2012 20:19:11 +0000 (+0000) Subject: radeon/llvm: Fix lowering TGSI_OPCODE_SSG X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd8af8a3dc86299a82dcddaa59e7fc49336a2345;p=mesa.git radeon/llvm: Fix lowering TGSI_OPCODE_SSG --- diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c index 57ec372d097..ee5bc00ab27 100644 --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c @@ -875,7 +875,7 @@ static void emit_ssg( cmp = LLVMBuildICmp(builder, LLVMIntSGE, val, bld_base->int_bld.zero, ""); val = LLVMBuildSelect(builder, cmp, val, LLVMConstInt(bld_base->int_bld.elem_type, -1, true), ""); } else { // float SSG - cmp = LLVMBuildFCmp(builder, LLVMRealUGT, emit_data->args[0], bld_base->int_bld.zero, ""); + cmp = LLVMBuildFCmp(builder, LLVMRealUGT, emit_data->args[0], bld_base->base.zero, ""); val = LLVMBuildSelect(builder, cmp, bld_base->base.one, emit_data->args[0], ""); cmp = LLVMBuildFCmp(builder, LLVMRealUGE, val, bld_base->base.zero, ""); val = LLVMBuildSelect(builder, cmp, val, LLVMConstReal(bld_base->base.elem_type, -1), "");