ac: add ac_build_s_endpgm
authorMarek Olšák <marek.olsak@amd.com>
Mon, 30 Dec 2019 19:08:09 +0000 (14:08 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 8 Jan 2020 21:03:48 +0000 (16:03 -0500)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/amd/llvm/ac_llvm_build.c
src/amd/llvm/ac_llvm_build.h

index b62b81999d34cd8629d1c0310952232b257c2960..79831260066a83e5bdd8789bc6d0da23b1c5a35a 100644 (file)
@@ -4889,3 +4889,9 @@ ac_build_main(const struct ac_shader_args *args,
        return main_function;
 }
 
+void ac_build_s_endpgm(struct ac_llvm_context *ctx)
+{
+       LLVMTypeRef calltype = LLVMFunctionType(ctx->voidt, NULL, 0, false);
+       LLVMValueRef code = LLVMConstInlineAsm(calltype, "s_endpgm", "", true, false);
+       LLVMBuildCall(ctx->builder, code, NULL, 0, "");
+}
index af774ab092f0aa5a3d036e1b001cd7d927c72929..627433efd5ddb83f26b66344ad601fdbff73f595 100644 (file)
@@ -786,6 +786,7 @@ LLVMValueRef ac_build_main(const struct ac_shader_args *args,
                           enum ac_llvm_calling_convention convention,
                           const char *name, LLVMTypeRef ret_type,
                           LLVMModuleRef module);
+void ac_build_s_endpgm(struct ac_llvm_context *ctx);
 
 #ifdef __cplusplus
 }