From: Tom Stellard Date: Thu, 6 Dec 2012 19:56:21 +0000 (-0800) Subject: gallivm: Lower TGSI_OPCODE_MUL to fmul by default X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ffe1794e0c7efc46e7a5056ac222dd081cae4020;p=mesa.git 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 --- 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.*/