radv: introduce RADV_DEBUG=llvm option
This option enables the LLVM compiler backend to be used for shader compilation Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5445>
This commit is contained in:
parent
37e7a5e746
commit
b78f64507e
|
@ -510,6 +510,8 @@ RADV driver environment variables
|
|||
``RADV_DEBUG``
|
||||
a comma-separated list of named flags, which do various things:
|
||||
|
||||
``llvm``
|
||||
enable LLVM compiler backend
|
||||
``allbos``
|
||||
force all allocated buffers to be referenced in submissions
|
||||
``allentrypoints``
|
||||
|
|
|
@ -57,6 +57,7 @@ enum {
|
|||
RADV_DEBUG_DUMP_META_SHADERS = 0x4000000,
|
||||
RADV_DEBUG_NO_MEMORY_CACHE = 0x8000000,
|
||||
RADV_DEBUG_DISCARD_TO_DEMOTE = 0x10000000,
|
||||
RADV_DEBUG_LLVM = 0x20000000,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
|
@ -507,6 +507,7 @@ static const struct debug_control radv_debug_options[] = {
|
|||
{"allentrypoints", RADV_DEBUG_ALL_ENTRYPOINTS},
|
||||
{"metashaders", RADV_DEBUG_DUMP_META_SHADERS},
|
||||
{"nomemorycache", RADV_DEBUG_NO_MEMORY_CACHE},
|
||||
{"llvm", RADV_DEBUG_LLVM},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
|
@ -677,6 +678,10 @@ VkResult radv_CreateInstance(
|
|||
instance->perftest_flags = parse_debug_string(getenv("RADV_PERFTEST"),
|
||||
radv_perftest_options);
|
||||
|
||||
if (instance->debug_flags & RADV_DEBUG_LLVM) {
|
||||
instance->perftest_flags &= ~RADV_PERFTEST_ACO;
|
||||
}
|
||||
|
||||
if (instance->perftest_flags & RADV_PERFTEST_ACO)
|
||||
fprintf(stderr, "WARNING: Experimental compiler backend enabled. Here be dragons! Incorrect rendering, GPU hangs and/or resets are likely\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue