diff options
author | Samuel Pitoiset <[email protected]> | 2020-03-12 14:49:55 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-13 10:22:13 +0000 |
commit | 2d295ab3f35acd796826d6f06f798d8618b1d814 (patch) | |
tree | 4169981f01577974c6b0e94bb829ddcef013d7d5 /src/amd/vulkan/radv_shader.c | |
parent | 4d991c2de46794a5a7c10110677d55a498893586 (diff) |
radv: add llvm_compiler_shader() helper
To match aco_compile_shader().
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4163>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4163>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r-- | src/amd/vulkan/radv_shader.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 37c85ea95f4..30e46340520 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -1119,37 +1119,12 @@ shader_variant_compile(struct radv_device *device, if (device->physical_device->use_aco) { aco_compile_shader(shader_count, shaders, &binary, &args); - binary->info = *info; } else { - enum ac_target_machine_options tm_options = 0; - struct ac_llvm_compiler ac_llvm; - bool thread_compiler; - - tm_options |= AC_TM_SUPPORTS_SPILL; - if (options->check_ir) - tm_options |= AC_TM_CHECK_IR; - if (device->instance->debug_flags & RADV_DEBUG_NO_LOAD_STORE_OPT) - tm_options |= AC_TM_NO_LOAD_STORE_OPT; - - thread_compiler = !(device->instance->debug_flags & RADV_DEBUG_NOTHREADLLVM); - radv_init_llvm_compiler(&ac_llvm, - thread_compiler, - chip_family, tm_options, - info->wave_size); - - if (gs_copy_shader) { - assert(shader_count == 1); - radv_compile_gs_copy_shader(&ac_llvm, *shaders, &binary, - &args); - } else { - radv_compile_nir_shader(&ac_llvm, &binary, &args, - shaders, shader_count); - } - - binary->info = *info; - radv_destroy_llvm_compiler(&ac_llvm, thread_compiler); + llvm_compile_shader(device, shader_count, shaders, &binary, &args); } + binary->info = *info; + struct radv_shader_variant *variant = radv_shader_variant_create(device, binary, keep_shader_info); if (!variant) { |