[Mesa-dev] [PATCH 08/11] radeonsi: don't use bld.elem_type

Marek Olšák maraeo at gmail.com
Fri Sep 29 14:49:52 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
index 972b26f..563b305 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c
@@ -421,48 +421,48 @@ static void emit_frac(const struct lp_build_tgsi_action *action,
 	emit_data->output[emit_data->chan] = LLVMBuildFSub(ctx->ac.builder,
 			emit_data->args[0], floor, "");
 }
 
 static void emit_f2i(const struct lp_build_tgsi_action *action,
 		     struct lp_build_tgsi_context *bld_base,
 		     struct lp_build_emit_data *emit_data)
 {
 	struct si_shader_context *ctx = si_shader_context(bld_base);
 	emit_data->output[emit_data->chan] = LLVMBuildFPToSI(ctx->ac.builder,
-			emit_data->args[0], bld_base->int_bld.elem_type, "");
+			emit_data->args[0], ctx->i32, "");
 }
 
 static void emit_f2u(const struct lp_build_tgsi_action *action,
 		     struct lp_build_tgsi_context *bld_base,
 		     struct lp_build_emit_data *emit_data)
 {
 	struct si_shader_context *ctx = si_shader_context(bld_base);
 	emit_data->output[emit_data->chan] = LLVMBuildFPToUI(ctx->ac.builder,
-			emit_data->args[0], bld_base->uint_bld.elem_type, "");
+			emit_data->args[0], ctx->i32, "");
 }
 
 static void emit_i2f(const struct lp_build_tgsi_action *action,
 		     struct lp_build_tgsi_context *bld_base,
 		     struct lp_build_emit_data *emit_data)
 {
 	struct si_shader_context *ctx = si_shader_context(bld_base);
 	emit_data->output[emit_data->chan] = LLVMBuildSIToFP(ctx->ac.builder,
-			emit_data->args[0], bld_base->base.elem_type, "");
+			emit_data->args[0], ctx->f32, "");
 }
 
 static void emit_u2f(const struct lp_build_tgsi_action *action,
 		     struct lp_build_tgsi_context *bld_base,
 		     struct lp_build_emit_data *emit_data)
 {
 	struct si_shader_context *ctx = si_shader_context(bld_base);
 	emit_data->output[emit_data->chan] = LLVMBuildUIToFP(ctx->ac.builder,
-			emit_data->args[0], bld_base->base.elem_type, "");
+			emit_data->args[0], ctx->f32, "");
 }
 
 static void
 build_tgsi_intrinsic_nomem(const struct lp_build_tgsi_action *action,
 			   struct lp_build_tgsi_context *bld_base,
 			   struct lp_build_emit_data *emit_data)
 {
 	struct si_shader_context *ctx = si_shader_context(bld_base);
 	emit_data->output[emit_data->chan] =
 		lp_build_intrinsic(ctx->ac.builder, action->intr_name,
-- 
2.7.4



More information about the mesa-dev mailing list