Module: Mesa Branch: main Commit: f575b0d7b51ef53abdba79f686bdc403e0257a3f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f575b0d7b51ef53abdba79f686bdc403e0257a3f
Author: Juan A. Suarez Romero <[email protected]> Date: Tue May 10 17:21:58 2022 +0200 v3d: add hook to get on-disk shader cache This allows to support at least one binary format in GL_ARB_get_program_binary extension. Signed-off-by: Juan A. Suarez Romero <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16433> --- docs/features.txt | 2 +- src/gallium/drivers/v3d/v3d_screen.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt index 75bec8c1e57..156eb3f6a04 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -143,7 +143,7 @@ GL 4.0, GLSL 4.00 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, llvmpipe, virg GL 4.1, GLSL 4.10 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, llvmpipe, virgl, zink, d3d12 GL_ARB_ES2_compatibility DONE (freedreno, i965, nv50, softpipe, v3d, vc4, panfrost, lima) - GL_ARB_get_program_binary DONE (freedreno, 0 or 1 binary formats) + GL_ARB_get_program_binary DONE (freedreno, v3d, 0 or 1 binary formats) GL_ARB_separate_shader_objects DONE (all drivers) GL_ARB_shader_precision DONE (i965/gen7+, all drivers that support GLSL 4.10) GL_ARB_vertex_attrib_64bit DONE (i965/gen7+, softpipe, ) diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index 8ef201cee6b..43e12ca471d 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -826,6 +826,14 @@ v3d_screen_get_compatible_tlb_format(struct pipe_screen *screen, } } +static struct disk_cache * +v3d_screen_get_disk_shader_cache(struct pipe_screen *pscreen) +{ + struct v3d_screen *screen = v3d_screen(pscreen); + + return screen->disk_cache; +} + struct pipe_screen * v3d_screen_create(int fd, const struct pipe_screen_config *config, struct renderonly *ro) @@ -892,6 +900,7 @@ v3d_screen_create(int fd, const struct pipe_screen_config *config, pscreen->get_vendor = v3d_screen_get_vendor; pscreen->get_device_vendor = v3d_screen_get_vendor; pscreen->get_compiler_options = v3d_screen_get_compiler_options; + pscreen->get_disk_shader_cache = v3d_screen_get_disk_shader_cache; pscreen->query_dmabuf_modifiers = v3d_screen_query_dmabuf_modifiers; pscreen->is_dmabuf_modifier_supported = v3d_screen_is_dmabuf_modifier_supported;
