ir3: Support disabling the pipeline cache

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16147>
This commit is contained in:
Connor Abbott 2022-02-01 20:59:22 +01:00 committed by Marge Bot
parent c7a6293635
commit ea646ac9af
2 changed files with 7 additions and 1 deletions

View file

@ -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;
}

View file

@ -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);