summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/etnaviv/etnaviv_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_screen.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_screen.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 269089868ed..1637eaa3f5f 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -74,6 +74,7 @@ static const struct debug_named_value debug_options[] = {
{"no_singlebuffer",ETNA_DBG_NO_SINGLEBUF, "Disable single buffer feature"},
{"nir", ETNA_DBG_NIR, "use new NIR compiler"},
{"deqp", ETNA_DBG_DEQP, "Hacks to run dEQP GLES3 tests"}, /* needs MESA_GLES_VERSION_OVERRIDE=3.0 */
+ {"nocache", ETNA_DBG_NOCACHE, "Disable shader cache"},
DEBUG_NAMED_VALUE_END
};
@@ -883,6 +884,15 @@ etna_get_compiler_options(struct pipe_screen *pscreen,
return &etna_screen(pscreen)->options;
}
+static struct disk_cache *
+etna_get_disk_shader_cache(struct pipe_screen *pscreen)
+{
+ struct etna_screen *screen = etna_screen(pscreen);
+ struct etna_compiler *compiler = screen->compiler;
+
+ return compiler->disk_cache;
+}
+
struct pipe_screen *
etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu,
struct renderonly *ro)
@@ -1027,6 +1037,7 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu,
pscreen->get_paramf = etna_screen_get_paramf;
pscreen->get_shader_param = etna_screen_get_shader_param;
pscreen->get_compiler_options = etna_get_compiler_options;
+ pscreen->get_disk_shader_cache = etna_get_disk_shader_cache;
pscreen->get_name = etna_screen_get_name;
pscreen->get_vendor = etna_screen_get_vendor;
@@ -1037,7 +1048,7 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu,
pscreen->is_format_supported = etna_screen_is_format_supported;
pscreen->query_dmabuf_modifiers = etna_screen_query_dmabuf_modifiers;
- screen->compiler = etna_compiler_create();
+ screen->compiler = etna_compiler_create(etna_screen_get_name(pscreen));
if (!screen->compiler)
goto fail;