radv: Support shader compilation without LLVM dependencies
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11319>
This commit is contained in:
parent
02ee0a0a7f
commit
d0ec3582af
|
@ -33,20 +33,22 @@
|
|||
#include "util/mesa-sha1.h"
|
||||
#include "util/u_atomic.h"
|
||||
#include "radv_debug.h"
|
||||
#include "radv_llvm_helper.h"
|
||||
#include "radv_private.h"
|
||||
#include "radv_shader_args.h"
|
||||
|
||||
#include "util/debug.h"
|
||||
#include "ac_binary.h"
|
||||
#include "ac_exp_param.h"
|
||||
#include "ac_llvm_util.h"
|
||||
#include "ac_nir.h"
|
||||
#include "ac_rtld.h"
|
||||
#include "aco_interface.h"
|
||||
#include "sid.h"
|
||||
#include "vk_format.h"
|
||||
|
||||
#ifdef LLVM_AVAILABLE
|
||||
#include "ac_llvm_util.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
radv_get_nir_options(struct radv_physical_device *device)
|
||||
{
|
||||
|
@ -1587,11 +1589,15 @@ shader_variant_compile(struct radv_device *device, struct vk_shader_module *modu
|
|||
shader_count >= 2,
|
||||
shader_count >= 2 ? shaders[shader_count - 2]->info.stage : MESA_SHADER_VERTEX);
|
||||
|
||||
#ifdef LLVM_AVAILABLE
|
||||
if (radv_use_llvm_for_stage(device, stage) || options->dump_shader || options->record_ir)
|
||||
ac_init_llvm_once();
|
||||
|
||||
if (radv_use_llvm_for_stage(device, stage)) {
|
||||
llvm_compile_shader(device, shader_count, shaders, &binary, &args);
|
||||
#else
|
||||
if (false) {
|
||||
#endif
|
||||
} else {
|
||||
aco_compile_shader(shader_count, shaders, &binary, &args);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue