summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-11-28 22:28:31 +1100
committerTimothy Arceri <[email protected]>2018-01-17 23:43:28 +1100
commita34262aed77dc358c29b492139796a9847dd37d1 (patch)
treeaf1493136c5b0d53d94f4a1f06e1178f5922a6e7 /src
parent9eebc55cc206d7400cc33e5faa52b51a1b4b5b8b (diff)
st/glsl_to_tgsi: add st_get_program_binary_driver_sha1() helper
This will be used by ARB_get_program_binary. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_shader_cache.c6
-rw-r--r--src/mesa/state_tracker/st_shader_cache.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_shader_cache.c b/src/mesa/state_tracker/st_shader_cache.c
index 62d62f76117..a971b0d7ee7 100644
--- a/src/mesa/state_tracker/st_shader_cache.c
+++ b/src/mesa/state_tracker/st_shader_cache.c
@@ -30,6 +30,12 @@
#include "program/ir_to_mesa.h"
#include "util/u_memory.h"
+void
+st_get_program_binary_driver_sha1(struct gl_context *ctx, uint8_t *sha1)
+{
+ disk_cache_compute_key(ctx->Cache, NULL, 0, sha1);
+}
+
static void
write_stream_out_to_cache(struct blob *blob,
struct pipe_shader_state *tgsi)
diff --git a/src/mesa/state_tracker/st_shader_cache.h b/src/mesa/state_tracker/st_shader_cache.h
index 358c6ecef88..488035c7ed5 100644
--- a/src/mesa/state_tracker/st_shader_cache.h
+++ b/src/mesa/state_tracker/st_shader_cache.h
@@ -33,6 +33,9 @@ extern "C" {
#endif
void
+st_get_program_binary_driver_sha1(struct gl_context *ctx, uint8_t *sha1);
+
+void
st_serialise_tgsi_program(struct gl_context *ctx, struct gl_program *prog);
void