radeon/llvm: Fix lowering TGSI_OPCODE_SSG
authorTom Stellard <thomas.stellard@amd.com>
Wed, 17 Oct 2012 20:19:11 +0000 (20:19 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 19 Oct 2012 21:25:00 +0000 (21:25 +0000)
src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c

index 57ec372d097e1095e4d6355287852b1f41d31a39..ee5bc00ab274de23e743a57e1f0f01e933901dc0 100644 (file)
@@ -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), "");