[Mesa-dev] [PATCH 09/20] radeonsi: get llvm types from ac

Timothy Arceri tarceri at itsqueeze.com
Fri Nov 10 03:13:43 UTC 2017


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

diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
index 9ec5a876f3..59d02605e9 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
@@ -163,29 +163,29 @@ out:
 }
 
 LLVMTypeRef tgsi2llvmtype(struct lp_build_tgsi_context *bld_base,
 			  enum tgsi_opcode_type type)
 {
 	struct si_shader_context *ctx = si_shader_context(bld_base);
 
 	switch (type) {
 	case TGSI_TYPE_UNSIGNED:
 	case TGSI_TYPE_SIGNED:
-		return ctx->i32;
+		return ctx->ac.i32;
 	case TGSI_TYPE_UNSIGNED64:
 	case TGSI_TYPE_SIGNED64:
-		return ctx->i64;
+		return ctx->ac.i64;
 	case TGSI_TYPE_DOUBLE:
-		return LLVMDoubleTypeInContext(ctx->ac.context);
+		return ctx->ac.f64;
 	case TGSI_TYPE_UNTYPED:
 	case TGSI_TYPE_FLOAT:
-		return ctx->f32;
+		return ctx->ac.f32;
 	default: break;
 	}
 	return 0;
 }
 
 LLVMValueRef bitcast(struct lp_build_tgsi_context *bld_base,
 		     enum tgsi_opcode_type type, LLVMValueRef value)
 {
 	struct si_shader_context *ctx = si_shader_context(bld_base);
 	LLVMTypeRef dst_type = tgsi2llvmtype(bld_base, type);
-- 
2.14.3



More information about the mesa-dev mailing list