diff --git a/src/freedreno/ir3/ir3_compiler.c b/src/freedreno/ir3/ir3_compiler.c index eac61f06682..0cfbefb77b7 100644 --- a/src/freedreno/ir3/ir3_compiler.c +++ b/src/freedreno/ir3/ir3_compiler.c @@ -328,7 +328,8 @@ ir3_compiler_create(struct fd_device *dev, const struct fd_dev_id *dev_id, compiler->nir_options = nir_options; } - ir3_disk_cache_init(compiler); + if (!options->disable_cache) + ir3_disk_cache_init(compiler); return compiler; } diff --git a/src/freedreno/ir3/ir3_compiler.h b/src/freedreno/ir3/ir3_compiler.h index 65239119ac6..cebd3e45a50 100644 --- a/src/freedreno/ir3/ir3_compiler.h +++ b/src/freedreno/ir3/ir3_compiler.h @@ -198,6 +198,11 @@ struct ir3_compiler_options { * constants for it can be pre-baked when compiling the shader. */ bool push_ubo_with_preamble; + + /* If true, disable the shader cache. The driver is then responsible for + * caching. + */ + bool disable_cache; }; void ir3_compiler_destroy(struct ir3_compiler *compiler);