From: Daniel Schürmann Date: Fri, 12 Jun 2020 16:55:00 +0000 (+0100) Subject: radv: introduce RADV_DEBUG=llvm option X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b78f64507e9edf315208147811479146947270fe;p=mesa.git radv: introduce RADV_DEBUG=llvm option This option enables the LLVM compiler backend to be used for shader compilation Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/docs/envvars.rst b/docs/envvars.rst index 5c9e851da8b..bebc1e1a48d 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -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`` diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index 63605035815..2935f6a79a7 100644 --- a/src/amd/vulkan/radv_debug.h +++ b/src/amd/vulkan/radv_debug.h @@ -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 { diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 534fd5fd47a..88f21692235 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -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");