[Mesa-dev] [PATCH 01/10] gallivm: supply correct opcode info to emit functions
Marek Olšák
maraeo at gmail.com
Sat Oct 10 18:29:41 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
This is useful only when emit functions use it.
The new radeonsi min/max opcode implementation requires this.
---
src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
index c4ae304..c50d83e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
@@ -114,12 +114,17 @@ lp_build_emit_llvm(
struct lp_build_emit_data * emit_data)
{
struct lp_build_tgsi_action * action = &bld_base->op_actions[tgsi_opcode];
+ const struct tgsi_opcode_info *old_info = emit_data->info;
/* XXX: Assert that this is a componentwise or replicate instruction */
lp_build_action_set_dst_type(emit_data, bld_base, tgsi_opcode);
emit_data->chan = 0;
+
+ /* Set and restore the opcode info. */
+ emit_data->info = tgsi_get_opcode_info(tgsi_opcode);
assert(action->emit);
action->emit(action, bld_base, emit_data);
+ emit_data->info = old_info;
return emit_data->output[0];
}
--
2.1.4
More information about the mesa-dev
mailing list