mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
radv: remove RADV_DEBUG=nothreadllvm
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10429>
This commit is contained in:
parent
a30899f5e0
commit
bba6be03f9
6 changed files with 31 additions and 56 deletions
|
|
@ -597,8 +597,6 @@ RADV driver environment variables
|
|||
disable out-of-order rasterization
|
||||
``notccompatcmask``
|
||||
disable TC-compat CMASK for MSAA surfaces
|
||||
``nothreadllvm``
|
||||
disable LLVM threaded compilation
|
||||
``noumr``
|
||||
disable UMR dumps during GPU hang detection (only with RADV_DEBUG=hang)
|
||||
``novrsflatshading``
|
||||
|
|
|
|||
|
|
@ -48,21 +48,20 @@ enum {
|
|||
RADV_DEBUG_ERRORS = 1ull << 17,
|
||||
RADV_DEBUG_STARTUP = 1ull << 18,
|
||||
RADV_DEBUG_CHECKIR = 1ull << 19,
|
||||
RADV_DEBUG_NOTHREADLLVM = 1ull << 20,
|
||||
RADV_DEBUG_NOBINNING = 1ull << 21,
|
||||
RADV_DEBUG_NO_NGG = 1ull << 22,
|
||||
RADV_DEBUG_DUMP_META_SHADERS = 1ull << 23,
|
||||
RADV_DEBUG_NO_MEMORY_CACHE = 1ull << 24,
|
||||
RADV_DEBUG_DISCARD_TO_DEMOTE = 1ull << 25,
|
||||
RADV_DEBUG_LLVM = 1ull << 26,
|
||||
RADV_DEBUG_FORCE_COMPRESS = 1ull << 27,
|
||||
RADV_DEBUG_HANG = 1ull << 28,
|
||||
RADV_DEBUG_IMG = 1ull << 29,
|
||||
RADV_DEBUG_NO_UMR = 1ull << 30,
|
||||
RADV_DEBUG_INVARIANT_GEOM = 1ull << 31,
|
||||
RADV_DEBUG_NO_DISPLAY_DCC = 1ull << 32,
|
||||
RADV_DEBUG_NO_TC_COMPAT_CMASK = 1ull << 33,
|
||||
RADV_DEBUG_NO_VRS_FLAT_SHADING = 1ull << 34,
|
||||
RADV_DEBUG_NOBINNING = 1ull << 20,
|
||||
RADV_DEBUG_NO_NGG = 1ull << 21,
|
||||
RADV_DEBUG_DUMP_META_SHADERS = 1ull << 22,
|
||||
RADV_DEBUG_NO_MEMORY_CACHE = 1ull << 23,
|
||||
RADV_DEBUG_DISCARD_TO_DEMOTE = 1ull << 24,
|
||||
RADV_DEBUG_LLVM = 1ull << 25,
|
||||
RADV_DEBUG_FORCE_COMPRESS = 1ull << 26,
|
||||
RADV_DEBUG_HANG = 1ull << 27,
|
||||
RADV_DEBUG_IMG = 1ull << 28,
|
||||
RADV_DEBUG_NO_UMR = 1ull << 29,
|
||||
RADV_DEBUG_INVARIANT_GEOM = 1ull << 30,
|
||||
RADV_DEBUG_NO_DISPLAY_DCC = 1ull << 31,
|
||||
RADV_DEBUG_NO_TC_COMPAT_CMASK = 1ull << 32,
|
||||
RADV_DEBUG_NO_VRS_FLAT_SHADING = 1ull << 33,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
|
|||
|
|
@ -772,7 +772,6 @@ static const struct debug_control radv_debug_options[] = {
|
|||
{"errors", RADV_DEBUG_ERRORS},
|
||||
{"startup", RADV_DEBUG_STARTUP},
|
||||
{"checkir", RADV_DEBUG_CHECKIR},
|
||||
{"nothreadllvm", RADV_DEBUG_NOTHREADLLVM},
|
||||
{"nobinning", RADV_DEBUG_NOBINNING},
|
||||
{"nongg", RADV_DEBUG_NO_NGG},
|
||||
{"metashaders", RADV_DEBUG_DUMP_META_SHADERS},
|
||||
|
|
|
|||
|
|
@ -106,38 +106,24 @@ radv_compile_to_elf(struct ac_llvm_compiler *info, LLVMModuleRef module, char **
|
|||
}
|
||||
|
||||
bool
|
||||
radv_init_llvm_compiler(struct ac_llvm_compiler *info, bool thread_compiler,
|
||||
enum radeon_family family, enum ac_target_machine_options tm_options,
|
||||
unsigned wave_size)
|
||||
radv_init_llvm_compiler(struct ac_llvm_compiler *info, enum radeon_family family,
|
||||
enum ac_target_machine_options tm_options, unsigned wave_size)
|
||||
{
|
||||
if (thread_compiler) {
|
||||
for (auto &I : radv_llvm_per_thread_list) {
|
||||
if (I.is_same(family, tm_options, wave_size)) {
|
||||
*info = I.llvm_info;
|
||||
return true;
|
||||
}
|
||||
for (auto &I : radv_llvm_per_thread_list) {
|
||||
if (I.is_same(family, tm_options, wave_size)) {
|
||||
*info = I.llvm_info;
|
||||
return true;
|
||||
}
|
||||
|
||||
radv_llvm_per_thread_list.emplace_back(family, tm_options, wave_size);
|
||||
radv_llvm_per_thread_info &tinfo = radv_llvm_per_thread_list.back();
|
||||
|
||||
if (!tinfo.init()) {
|
||||
radv_llvm_per_thread_list.pop_back();
|
||||
return false;
|
||||
}
|
||||
|
||||
*info = tinfo.llvm_info;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!ac_init_llvm_compiler(info, family, tm_options))
|
||||
radv_llvm_per_thread_list.emplace_back(family, tm_options, wave_size);
|
||||
radv_llvm_per_thread_info &tinfo = radv_llvm_per_thread_list.back();
|
||||
|
||||
if (!tinfo.init()) {
|
||||
radv_llvm_per_thread_list.pop_back();
|
||||
return false;
|
||||
}
|
||||
|
||||
*info = tinfo.llvm_info;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
radv_destroy_llvm_compiler(struct ac_llvm_compiler *info, bool thread_compiler)
|
||||
{
|
||||
if (!thread_compiler)
|
||||
ac_destroy_llvm_compiler(info);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3400,15 +3400,12 @@ llvm_compile_shader(struct radv_device *device, unsigned shader_count,
|
|||
{
|
||||
enum ac_target_machine_options tm_options = 0;
|
||||
struct ac_llvm_compiler ac_llvm;
|
||||
bool thread_compiler;
|
||||
|
||||
tm_options |= AC_TM_SUPPORTS_SPILL;
|
||||
if (args->options->check_ir)
|
||||
tm_options |= AC_TM_CHECK_IR;
|
||||
|
||||
thread_compiler = !(device->instance->debug_flags & RADV_DEBUG_NOTHREADLLVM);
|
||||
|
||||
radv_init_llvm_compiler(&ac_llvm, thread_compiler, args->options->family, tm_options,
|
||||
radv_init_llvm_compiler(&ac_llvm, args->options->family, tm_options,
|
||||
args->shader_info->wave_size);
|
||||
|
||||
if (args->is_gs_copy_shader) {
|
||||
|
|
@ -3416,6 +3413,4 @@ llvm_compile_shader(struct radv_device *device, unsigned shader_count,
|
|||
} else {
|
||||
radv_compile_nir_shader(&ac_llvm, binary, args, shaders, shader_count);
|
||||
}
|
||||
|
||||
radv_destroy_llvm_compiler(&ac_llvm, thread_compiler);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,10 +29,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool radv_init_llvm_compiler(struct ac_llvm_compiler *info, bool thread_compiler,
|
||||
enum radeon_family family, enum ac_target_machine_options tm_options,
|
||||
unsigned wave_size);
|
||||
void radv_destroy_llvm_compiler(struct ac_llvm_compiler *info, bool thread_compiler);
|
||||
bool radv_init_llvm_compiler(struct ac_llvm_compiler *info, enum radeon_family family,
|
||||
enum ac_target_machine_options tm_options, unsigned wave_size);
|
||||
|
||||
bool radv_compile_to_elf(struct ac_llvm_compiler *info, LLVMModuleRef module, char **pelf_buffer,
|
||||
size_t *pelf_size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue