From: Nicolai Hähnle Date: Thu, 18 May 2017 20:02:48 +0000 (+0200) Subject: ac: add ac_llvm_context::{i,f}32_{0,1} X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=331a574732be0658ac5c5e417f9c48518f4a4280;p=mesa.git ac: add ac_llvm_context::{i,f}32_{0,1} Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Dave Airlie --- diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index ec69cf093ad..5dd7bc1fd6b 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -66,6 +66,11 @@ 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, false); + ctx->i32_1 = LLVMConstInt(ctx->i32, 1, false); + ctx->f32_0 = LLVMConstReal(ctx->f32, 0.0); + ctx->f32_1 = LLVMConstReal(ctx->f32, 1.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 a6b73722252..78909928223 100644 --- a/src/amd/common/ac_llvm_build.h +++ b/src/amd/common/ac_llvm_build.h @@ -50,6 +50,11 @@ struct ac_llvm_context { LLVMTypeRef v4f32; LLVMTypeRef v16i8; + LLVMValueRef i32_0; + LLVMValueRef i32_1; + LLVMValueRef f32_0; + LLVMValueRef f32_1; + unsigned range_md_kind; unsigned invariant_load_md_kind; unsigned uniform_md_kind;