Mesa (master): gallivm: Lower TGSI_OPCODE_MUL to fmul by default
Tom Stellard
tstellar at kemper.freedesktop.org
Tue Dec 11 00:50:03 UTC 2012
Module: Mesa
Branch: master
Commit: ffe1794e0c7efc46e7a5056ac222dd081cae4020
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ffe1794e0c7efc46e7a5056ac222dd081cae4020
Author: Tom Stellard <thomas.stellard at amd.com>
Date: Thu Dec 6 11:56:21 2012 -0800
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 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.*/
More information about the mesa-commit
mailing list