[Mesa-dev] [PATCH] gallivm: Lower TGSI_OPCODE_MUL to fmul by default
Tom Stellard
tom at stellard.net
Thu Dec 6 11:56:21 PST 2012
From: Tom Stellard <thomas.stellard at amd.com>
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 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 cc4bd2e..8159beb 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.*/
--
1.7.3.4
More information about the mesa-dev
mailing list