[Mesa-dev] [PATCH 09/17] ac: add i32_0 convenience member to ac_llvm_context

Connor Abbott connora at valvesoftware.com
Fri Jun 9 23:47:30 UTC 2017


From: Connor Abbott <cwabbott0 at gmail.com>

To match si_shader_context.

Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
 src/amd/common/ac_llvm_build.c | 2 ++
 src/amd/common/ac_llvm_build.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 237e929..c411880 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -62,6 +62,8 @@ ac_llvm_context_init(struct ac_llvm_context *ctx, LLVMContextRef context)
 	ctx->v4f32 = LLVMVectorType(ctx->f32, 4);
 	ctx->v16i8 = LLVMVectorType(ctx->i8, 16);
 
+        ctx->i32_0 = LLVMConstInt(ctx->i32, 0, 0);
+
 	ctx->range_md_kind = LLVMGetMDKindIDInContext(ctx->context,
 						     "range", 5);
 
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index ebb78fb..bde0aa8 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -46,6 +46,8 @@ struct ac_llvm_context {
 	LLVMTypeRef v4f32;
 	LLVMTypeRef v16i8;
 
+        LLVMValueRef i32_0;
+
 	unsigned range_md_kind;
 	unsigned invariant_load_md_kind;
 	unsigned uniform_md_kind;
-- 
2.9.4



More information about the mesa-dev mailing list