summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-12-06 11:56:21 -0800
committerTom Stellard <[email protected]>2012-12-10 19:22:37 -0500
commitffe1794e0c7efc46e7a5056ac222dd081cae4020 (patch)
tree88c56bf12efd7183e52db334755944b65feb8d93 /src/gallium/auxiliary/gallivm
parent8000e7b4b6e2866b42de19448cbf3412cce1f26c (diff)
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
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c5
1 files changed, 3 insertions, 2 deletions
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.*/