Mesa (master): radv: pass the NIR compiler options to ac_compile_llvm_module()
Samuel Pitoiset
hakzsam at kemper.freedesktop.org
Thu Mar 15 16:22:37 UTC 2018
Module: Mesa
Branch: master
Commit: 50fcca328cafb5374c2ca19079b7ef2288c0c840
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50fcca328cafb5374c2ca19079b7ef2288c0c840
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Wed Mar 14 10:23:22 2018 +0100
radv: pass the NIR compiler options to ac_compile_llvm_module()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
src/amd/vulkan/radv_nir_to_llvm.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index d4c99539aa..2c3b3fcc32 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -3224,7 +3224,8 @@ static void ac_compile_llvm_module(LLVMTargetMachineRef tm,
struct ac_shader_config *config,
struct radv_shader_variant_info *shader_info,
gl_shader_stage stage,
- bool dump_shader, bool supports_spill)
+ bool dump_shader,
+ const struct radv_nir_compiler_options *options)
{
if (dump_shader)
ac_dump_module(llvm_module);
@@ -3238,7 +3239,7 @@ static void ac_compile_llvm_module(LLVMTargetMachineRef tm,
if (dump_shader)
fprintf(stderr, "disasm:\n%s\n", binary->disasm_string);
- ac_shader_binary_read_config(binary, config, 0, supports_spill);
+ ac_shader_binary_read_config(binary, config, 0, options->supports_spill);
LLVMContextRef ctx = LLVMGetModuleContext(llvm_module);
LLVMDisposeModule(llvm_module);
@@ -3353,7 +3354,9 @@ radv_compile_nir_shader(LLVMTargetMachineRef tm,
LLVMModuleRef llvm_module = ac_translate_nir_to_llvm(tm, nir, nir_count, shader_info,
options, dump_shader);
- ac_compile_llvm_module(tm, llvm_module, binary, config, shader_info, nir[0]->info.stage, dump_shader, options->supports_spill);
+ ac_compile_llvm_module(tm, llvm_module, binary, config, shader_info,
+ nir[0]->info.stage, dump_shader, options);
+
for (int i = 0; i < nir_count; ++i)
ac_fill_shader_info(shader_info, nir[i], options);
@@ -3457,6 +3460,5 @@ radv_compile_gs_copy_shader(LLVMTargetMachineRef tm,
ac_llvm_finalize_module(&ctx);
ac_compile_llvm_module(tm, ctx.ac.module, binary, config, shader_info,
- MESA_SHADER_VERTEX,
- dump_shader, options->supports_spill);
+ MESA_SHADER_VERTEX, dump_shader, options);
}
More information about the mesa-commit
mailing list