diff options
author | Dave Airlie <airlied@redhat.com> | 2020-09-29 08:35:20 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-09-30 16:54:10 +1000 |
commit | b0504ed682f7df16ec108016b09ad6ede1c290a4 (patch) | |
tree | ec17fe6d96b6bc1f7508927d7a48471e748d38ab /src/gallium/drivers/llvmpipe | |
parent | 760ba65733d7915a61eaaebd073ce7c06cafec2e (diff) |
llvmpipe: use an alternate env var to enable clover.
This can be used outside debug contexts.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_debug.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_screen.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_screen.h | 1 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_debug.h b/src/gallium/drivers/llvmpipe/lp_debug.h index 41047fbc754..d76b9be7544 100644 --- a/src/gallium/drivers/llvmpipe/lp_debug.h +++ b/src/gallium/drivers/llvmpipe/lp_debug.h @@ -46,8 +46,7 @@ #define DEBUG_FS 0x8000 #define DEBUG_CS 0x10000 #define DEBUG_TGSI_IR 0x20000 -#define DEBUG_CL 0x40000 -#define DEBUG_CACHE_STATS 0x80000 +#define DEBUG_CACHE_STATS 0x40000 /* Performance flags. These are active even on release builds. */ diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 218d80e5c48..848a48f54e0 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -74,7 +74,6 @@ static const struct debug_named_value lp_debug_flags[] = { { "fs", DEBUG_FS, NULL }, { "cs", DEBUG_CS, NULL }, { "tgsi_ir", DEBUG_TGSI_IR, NULL }, - { "cl", DEBUG_CL, NULL }, { "cache_stats", DEBUG_CACHE_STATS, NULL }, DEBUG_NAMED_VALUE_END }; @@ -357,7 +356,7 @@ llvmpipe_get_shader_param(struct pipe_screen *screen, switch(shader) { case PIPE_SHADER_COMPUTE: - if ((LP_DEBUG & DEBUG_CL) && param == PIPE_SHADER_CAP_SUPPORTED_IRS) + if ((lscreen->allow_cl) && param == PIPE_SHADER_CAP_SUPPORTED_IRS) return (1 << PIPE_SHADER_IR_TGSI) | (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_NIR_SERIALIZED); /* fallthrough */ case PIPE_SHADER_FRAGMENT: @@ -914,6 +913,7 @@ llvmpipe_create_screen(struct sw_winsys *winsys) screen->base.get_disk_shader_cache = lp_get_disk_shader_cache; llvmpipe_init_screen_resource_funcs(&screen->base); + screen->allow_cl = !!getenv("LP_CL"); screen->use_tgsi = (LP_DEBUG & DEBUG_TGSI_IR); screen->num_threads = util_cpu_caps.nr_cpus > 1 ? util_cpu_caps.nr_cpus : 0; #ifdef EMBEDDED_DEVICE diff --git a/src/gallium/drivers/llvmpipe/lp_screen.h b/src/gallium/drivers/llvmpipe/lp_screen.h index 6b3798e4d7a..a790c199cd9 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.h +++ b/src/gallium/drivers/llvmpipe/lp_screen.h @@ -62,6 +62,7 @@ struct llvmpipe_screen mtx_t cs_mutex; bool use_tgsi; + bool allow_cl; struct disk_cache *disk_shader_cache; unsigned num_disk_shader_cache_hits; |