From ffe1794e0c7efc46e7a5056ac222dd081cae4020 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 6 Dec 2012 11:56:21 -0800 Subject: gallivm: Lower TGSI_OPCODE_MUL to fmul by default This fixes a number of crashes on r600g due to the fact that lp_build_mul assumes vector types when optimizing mul to bit shifts. This bug was uncovered by 0ad1fefd6951aa47ab58a41dc9ee73083cbcf85c --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index cc4bd2e1647..8159bebc89b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c @@ -580,8 +580,9 @@ mul_emit( struct lp_build_tgsi_context * bld_base, struct lp_build_emit_data * emit_data) { - emit_data->output[emit_data->chan] = lp_build_mul(&bld_base->base, - emit_data->args[0], emit_data->args[1]); + emit_data->output[emit_data->chan] = LLVMBuildFMul( + bld_base->base.gallivm->builder, + emit_data->args[0], emit_data->args[1], ""); } /*.TGSI_OPCODE_DIV.*/ -- cgit v1.2.3